Active Model Basic Model Allows implementing models similar to ActiveRecord::Base. Includes ActiveModel::API for the required interface for an object to interact with Action Pack and Action View, but can be extended with other functionalities. A minimal implementation could be: class Person include ActiveModel::Model attr_accessor :name, :age end person = Person.new(name: 'bob', age: '18') person.
3. Model に関する変更点 2013/10/03 シナジーマーケティング(株) 鈴木 圭 [Rails 4.0] 第3章 Model に関する変更点 3.1. attr_accessible から StrongParameters へ 3.2. 非推奨となった動的ファインダメソッド 3.3. scope には Proc オブジェクトの指定が必須 3.4. トランザクションの隔離レベルの指定 3.5. ActiveModel::Model モジュール 3.6. クエリ API の変更点 3.6.1. all が配列ではなく Relation を返す 3.6.2. pluck は複数カラムを指定可能 3.6.3. update_attributes は update のエイリアス 3.6.4. update_column の代わりに update_columns 3.6.5. none
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く