Class: EasyModel::SearchForm
- Inherits:
-
Object
- Object
- EasyModel::SearchForm
- Includes:
- Column
- Defined in:
- lib/easy_model/search_form.rb
Overview
検索フォームの基本クラス.
詳細
ActiveRecord::Relation と同じインタフェースのメソッドをインスタンスメソッドとして持つ. 派生クラスは ActiveRecord::Relation を返す scoped メソッドを定義しなければならない. scoped メソッドの戻り値には all や exists? などの処理が delegate される.
Instance Method Summary collapse
-
#scoped ⇒ Object
ActiveRecord::Relation を返す.
Methods included from Column
Instance Method Details
#scoped ⇒ Object
ActiveRecord::Relation を返す.
詳細
このメソッドは派生クラスによって上書きされることを前提としている.
戻り値
ActiveRecord::Relation.
37 38 39 |
# File 'lib/easy_model/search_form.rb', line 37 def scoped raise NotImplementedError, 'Must define `scoped` method.' end |