Module: Nester::Helper::ClassMethods
- Defined in:
- lib/nester.rb
Instance Method Summary collapse
Instance Method Details
#nest(model, options = {}) ⇒ Object
88 89 90 91 92 93 94 95 96 97 |
# File 'lib/nester.rb', line 88 def nest(model, = {}) [:under] = [*[:under]] # convert item to single item array [:namespace] = [*[:namespace]] [:model] = model [:singular_name] = [:model].to_s [:plural_name] = [:singular_name].pluralize build_named_route_methods() end |