Class: ActionController::Resources::Resource
- Inherits:
-
Object
- Object
- ActionController::Resources::Resource
- Defined in:
- lib/i18n_routing_rails2.rb
Instance Method Summary collapse
-
#initialize(entities, options) ⇒ Resource
constructor
A new instance of Resource.
- #mkd_initialize ⇒ Object
- #nesting_name_prefix ⇒ Object
- #nesting_path_prefix ⇒ Object
Constructor Details
#initialize(entities, options) ⇒ Resource
Returns a new instance of Resource.
126 127 128 129 130 131 |
# File 'lib/i18n_routing_rails2.rb', line 126 def initialize(entities, ) @real_path = .delete(:real_path) @real_path = @real_path.to_s.singularize if @real_path mkd_initialize(entities, ) end |
Instance Method Details
#mkd_initialize ⇒ Object
125 |
# File 'lib/i18n_routing_rails2.rb', line 125 alias_method :mkd_initialize, :initialize |
#nesting_name_prefix ⇒ Object
133 134 135 |
# File 'lib/i18n_routing_rails2.rb', line 133 def nesting_name_prefix @real_path ? "#{shallow_name_prefix}#{@real_path}_" : "#{shallow_name_prefix}#{singular}_" end |
#nesting_path_prefix ⇒ Object
137 138 139 |
# File 'lib/i18n_routing_rails2.rb', line 137 def nesting_path_prefix @nesting_path_prefix ||= (@real_path ? "#{shallow_path_prefix}/#{path_segment}/:#{@real_path}_id" : "#{shallow_path_prefix}/#{path_segment}/:#{singular}_id") end |