Class: ActiveScaffold::Config::AdvancedSearch
- Defined in:
- lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb
Constant Summary collapse
- @@link =
ActiveScaffold::DataStructures::ActionLink.new('show_advanced_search', :label => 'Advanced Search', :type => :table, :security_method => :advanced_search_authorized?)
- @@full_text_search =
true
Instance Attribute Summary collapse
-
#full_text_search ⇒ Object
writeonly
Sets the attribute full_text_search.
-
#link ⇒ Object
Returns the value of attribute link.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #column_objects ⇒ Object
- #columns ⇒ Object
- #columns=(val) ⇒ Object
- #full_text_search? ⇒ Boolean
-
#initialize(core_config) ⇒ AdvancedSearch
constructor
A new instance of AdvancedSearch.
Methods inherited from Base
#crud_type, #formats, #formats=, inherited
Methods included from ActiveScaffold::Configurable
Constructor Details
#initialize(core_config) ⇒ AdvancedSearch
Returns a new instance of AdvancedSearch.
7 8 9 10 11 12 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 7 def initialize(core_config) @core = core_config @full_text_search = self.class.full_text_search? @link = self.class.link.clone end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#full_text_search=(value) ⇒ Object (writeonly)
Sets the attribute full_text_search
25 26 27 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 25 def full_text_search=(value) @full_text_search = value end |
#link ⇒ Object
Returns the value of attribute link.
17 18 19 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 17 def link @link end |
Class Method Details
.full_text_search? ⇒ Boolean
20 21 22 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 20 def self.full_text_search? @@full_text_search end |
Instance Method Details
#column_objects ⇒ Object
42 43 44 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 42 def column_objects @column_objects ||= @core.columns.select { |c| self.columns.include?(c.name) } end |
#columns ⇒ Object
30 31 32 33 34 35 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 30 def columns unless @columns self.columns = @core.columns.collect { |c| c.name if c.searchable? && c.column && (c.column.text? || (c.column.type == :integer) || (c.column.type == :boolean)) }.compact - [:id] end @columns end |
#columns=(val) ⇒ Object
37 38 39 40 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 37 def columns=(val) @columns = ActiveScaffold::DataStructures::ActionColumns.new(*val) @columns.action = self end |
#full_text_search? ⇒ Boolean
26 27 28 |
# File 'lib/six-updater-web/vendor/plugins/activescaffold_advanced_search/lib/config/advanced_search.rb', line 26 def full_text_search? @full_text_search end |