ドットインストール代表のライフハックブログ
jsTree is jquery plugin, that provides interactive trees. It is absolutely free, open source and distributed under the MIT license. jsTree is easily extendable, themable and configurable, it supports HTML & JSON data sources and AJAX loading. jsTree functions properly in either box-model (content-box or border-box), can be loaded as an AMD module, and has a built in mobile theme for responsive des
Ruby on Rails 7.2.1.1 RDOC_MAIN.md railties/RDOC_MAIN.md Last modified: 2024-10-15 20:45:32 +0000 Welcome to Rails What’s Rails? Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. Understanding the MVC pattern is key to understanding Rails. MVC divides your application into three laye
Project Euler † プログラムで解く数学の問題集です。 公式サイト 適当に和訳してます。我こそはと思う人はライセンスを確認した上で自由に書いてください。 ↑
Railsで論理削除を行う方法の1つとして、acts_as_paranoidというプラグインがあるので、Rails2.3で試してみた。なお、rails3用にはrails3_acts_as_paranoidがあるようです。 acts_as_paranoidとは? データベースのテーブルのカラムに deleted_at を作って、deleted_atに日付があれば論理削除された状態、deleted_at が null なら削除されていない状態というのを管理してくれるプラグイン。 install $ cd RAILS_ROOT $ ruby script/plugin install git://github.com/technoweenie/acts_as_paranoid.git データベースを作成 migrationを作成して、カラム名 deleted_at、属性 datetime を持つ
カテゴリー AFV(6) 飛行機(6) 山行部通信(6) 1/700長門1927(2) 日記(93) 銀河英雄伝説(29) 地球防衛軍(3) 宇宙世紀(7) 1/700ストラスブール(5) 1/700三景艦(11) 1/700コンテディカブール(10) 1/700ウエストヴァージニア(4) 1/700フォンデアタン(14) 1/700クイーンメリー(8) 1/700パリ(9) 1/700扶桑(11) 1/700アリゾナ(20) 1/700 竣工済み艦船(7) ミニスケールAFV(27) 模型(38) 鉄道(2) 洋書(38) 切手(2) 調理部通信(7) 飼育部だより(12) 和書(10) 資格(37) ゲーム(7) PCメモ(16) 1/700ノースカロライナ(2) 1/700アドミラル・グラーフ・シュペー(1) Ruby on Railsが2.0になってdefaultのDBがsqlit
EntryとTagというモデルがあって、Entryには複数のTagを付けることができ、あるTagが付いたEntryが複数あるとき。つまり、多対多の関係があるとします。このような場合データベース上は、entriesテーブルとtagsテーブルと、その関連を記録するtaggingsテーブルを用意しますね。taggingsテーブルに対応するtaggingモデルを用意します。 で、モデルを定義する時に、has_many :throughを使うと便利。 class Entry < ActiveRecord::Base has_many :taggings has_many :tags, :through=>:taggings end class Tag < ActiveRecord::Base has_many :taggings has_many :entries, :through=>:taggi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く