Module: ListFor::HelperMethods
- Defined in:
- lib/list_for/helper_methods.rb
Instance Method Summary collapse
Instance Method Details
#list_for(*args, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/list_for/helper_methods.rb', line 9 def list_for(*args, &block) = args. [:records] = args.first [:template] = "list_for/list_for" [:templates_folder] = "list_for" [:record_variable] = "records" [:variable] = "list" ListFor::Base.new(self, , &block).render end |
#list_for_options(options = {}, parameters = {}) ⇒ Object
3 4 5 6 7 |
# File 'lib/list_for/helper_methods.rb', line 3 def (={}, parameters={}) = {} .each_pair { |k, v| [k] = (v.is_a?(Proc) ? v.call(parameters) : v)} end |