Class: ArFinderForm::Builder
- Defined in:
- lib/ar_finder_form/builder.rb
Constant Summary
Constants inherited from Table
Instance Attribute Summary collapse
-
#client_class ⇒ Object
readonly
Returns the value of attribute client_class.
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#model_class ⇒ Object
readonly
Returns the value of attribute model_class.
Attributes inherited from Table
Instance Method Summary collapse
- #build(context) ⇒ Object
-
#initialize(client_class, model_class) ⇒ Builder
constructor
A new instance of Builder.
- #root_table ⇒ Object
Methods inherited from Table
#build_methods, #column, #join, #model_column_for, #name, #table_name
Constructor Details
#initialize(client_class, model_class) ⇒ Builder
Returns a new instance of Builder.
7 8 9 10 |
# File 'lib/ar_finder_form/builder.rb', line 7 def initialize(client_class, model_class) super(model_class) @client_class = client_class end |
Instance Attribute Details
#client_class ⇒ Object (readonly)
Returns the value of attribute client_class.
5 6 7 |
# File 'lib/ar_finder_form/builder.rb', line 5 def client_class @client_class end |
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
6 7 8 |
# File 'lib/ar_finder_form/builder.rb', line 6 def columns @columns end |
#model_class ⇒ Object (readonly)
Returns the value of attribute model_class.
5 6 7 |
# File 'lib/ar_finder_form/builder.rb', line 5 def model_class @model_class end |
Instance Method Details
#build(context) ⇒ Object
16 17 18 19 |
# File 'lib/ar_finder_form/builder.rb', line 16 def build(context) context.single_table = joined_tables.empty? super(context) end |
#root_table ⇒ Object
12 13 14 |
# File 'lib/ar_finder_form/builder.rb', line 12 def root_table self end |