Module: SmartListing::Helper::ControllerExtensions
- Defined in:
- app/helpers/smart_listing/helper.rb
Instance Method Summary collapse
Instance Method Details
#smart_listing(name) ⇒ Object
16 17 18 |
# File 'app/helpers/smart_listing/helper.rb', line 16 def smart_listing name @smart_listings[name.to_sym] end |
#smart_listing_create(name, collection, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/helpers/smart_listing/helper.rb', line 4 def smart_listing_create name, collection, = {} name = name.to_sym list = SmartListing::Base.new(name, collection, ) list.setup(params, ) @smart_listings ||= {} @smart_listings[name] = list list.collection end |