Class: MagicGrid::FilterOnlyColumn
- Defined in:
- lib/magic_grid/column.rb
Instance Attribute Summary collapse
-
#custom_sql ⇒ Object
readonly
Returns the value of attribute custom_sql.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Column
Instance Method Summary collapse
-
#initialize(name, collection = nil) ⇒ FilterOnlyColumn
constructor
A new instance of FilterOnlyColumn.
Methods inherited from Column
columns_for_collection, hash_string, #html_classes, #id, #label, #reader, searchable_column, #sortable?
Constructor Details
#initialize(name, collection = nil) ⇒ FilterOnlyColumn
Returns a new instance of FilterOnlyColumn.
92 93 94 95 96 97 98 99 100 |
# File 'lib/magic_grid/column.rb', line 92 def initialize(name, collection = nil) @order = Order::Unordered @name = name if collection @custom_sql = collection.quote_column_name(name) else @custom_sql = name end end |
Instance Attribute Details
#custom_sql ⇒ Object (readonly)
Returns the value of attribute custom_sql.
91 92 93 |
# File 'lib/magic_grid/column.rb', line 91 def custom_sql @custom_sql end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
91 92 93 |
# File 'lib/magic_grid/column.rb', line 91 def name @name end |