Class: Jets::Router::Resources::Options
- Defined in:
- lib/jets/router/resources/options.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Jets::Router::Resources::Base
Instance Method Details
#build(action) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/jets/router/resources/options.rb', line 3 def build(action) controller = @options[:singular_resource] ? @name.to_s.pluralize : @name = @options.merge(to: "#{controller}##{action}") # important to create a copy of the options # remove special options from getting to create_route. For some reason .slice! doesnt work .delete(:only) .delete(:except) [:from_scope] = true # flag to drop the prefix later in Route#compute_path end |