Module: Accountability::ProductsHelper
- Defined in:
- app/helpers/accountability/products_helper.rb
Instance Method Summary collapse
- #disable_category_field? ⇒ Boolean
- #schedule_options ⇒ Object
- #scope_options(scope) ⇒ Object
- #source_class_options ⇒ Object
Instance Method Details
#disable_category_field? ⇒ Boolean
17 18 19 |
# File 'app/helpers/accountability/products_helper.rb', line 17 def disable_category_field? @stage != 'initial' end |
#schedule_options ⇒ Object
8 9 10 11 |
# File 'app/helpers/accountability/products_helper.rb', line 8 def = Accountability::Product.schedules .keys.map { |schedule_name| [schedule_name.titleize, schedule_name] } end |
#scope_options(scope) ⇒ Object
13 14 15 |
# File 'app/helpers/accountability/products_helper.rb', line 13 def (scope) scope..map { |option| [option.to_s.titleize, option] } end |
#source_class_options ⇒ Object
3 4 5 6 |
# File 'app/helpers/accountability/products_helper.rb', line 3 def = Accountability::Offerable.collection.stringify_keys .keys.map { |offerable_name| [offerable_name.titleize, offerable_name] } end |