Class: ActiveScaffold::DataStructures::ActionColumns
- Includes:
- Configurable
- Defined in:
- lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb
Overview
A set of columns. These structures can be nested for organization.
Defined Under Namespace
Modules: AfterConfiguration
Instance Attribute Summary collapse
-
#action ⇒ Object
this lets us refer back to the action responsible for this link, if it exists.
-
#collapsed ⇒ Object
Whether this column set is collapsed by default in contexts where collapsing is supported.
- #label ⇒ Object
Instance Method Summary collapse
-
#add_subgroup(label, &proc) ⇒ Object
nests a subgroup in the column set.
- #include?(item) ⇒ Boolean
Methods included from Configurable
Methods inherited from Set
#add, #each, #empty?, #exclude, #find_by_name, #find_by_names, #initialize, #length
Constructor Details
This class inherits a constructor from ActiveScaffold::DataStructures::Set
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#action ⇒ Object
this lets us refer back to the action responsible for this link, if it exists. the immediate need here is to get the crud_type so we can dynamically filter columns from the set.
8 9 10 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb', line 8 def action @action end |
#collapsed ⇒ Object
Whether this column set is collapsed by default in contexts where collapsing is supported
17 18 19 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb', line 17 def collapsed @collapsed end |
#label ⇒ Object
12 13 14 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb', line 12 def label as_(@label) if @label end |
Instance Method Details
#add_subgroup(label, &proc) ⇒ Object
nests a subgroup in the column set
20 21 22 23 24 25 26 27 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb', line 20 def add_subgroup(label, &proc) columns = ActiveScaffold::DataStructures::ActionColumns.new columns.label = label columns.action = self.action columns.configure &proc self.exclude columns.collect_columns self.add columns end |
#include?(item) ⇒ Boolean
29 30 31 32 33 34 35 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/data_structures/action_columns.rb', line 29 def include?(item) @set.each do |c| return true if !c.is_a? Symbol and c.include? item return true if c == item.to_sym end return false end |