| 181 | | # comments_url(@article) |
|---|
| 182 | | # comment_url(@article, @comment) |
|---|
| 183 | | # |
|---|
| 184 | | # comments_url(:article_id => @article) |
|---|
| 185 | | # comment_url(:article_id => @article, :id => @comment) |
|---|
| | 202 | # article_comments_url(@article) |
|---|
| | 203 | # article_comment_url(@article, @comment) |
|---|
| | 204 | # |
|---|
| | 205 | # article_comments_url(:article_id => @article) |
|---|
| | 206 | # article_comment_url(:article_id => @article, :id => @comment) |
|---|
| 238 | | # - a singular name is given to map.resource. The default controller name is taken from the singular name. |
|---|
| 239 | | # - To specify a custom plural name, use the :plural option. There is no :singular option |
|---|
| 240 | | # - No default index, new, or create routes are created for the singleton resource controller. |
|---|
| | 259 | # - A singular name is given to map.resource. The default controller name is taken from the singular name. |
|---|
| | 260 | # - There is no <tt>:collection</tt> option as there is only the singleton resource. |
|---|
| | 261 | # - There is no <tt>:singular</tt> option as the singular name is passed to map.resource. |
|---|
| | 262 | # - No default index route is created for the singleton resource controller. |
|---|
| 327 | | map.named_route("#{resource.name_prefix}#{action}_#{resource.plural}", "#{resource.path};#{action}", action_options) |
|---|
| 328 | | map.named_route("formatted_#{resource.name_prefix}#{action}_#{resource.plural}", "#{resource.path}.:format;#{action}", action_options) |
|---|
| | 349 | |
|---|
| | 350 | unless resource.old_name_prefix.blank? |
|---|
| | 351 | map.deprecated_named_route("#{action}_#{resource.name_prefix}#{resource.plural}", "#{resource.old_name_prefix}#{action}_#{resource.plural}") |
|---|
| | 352 | map.deprecated_named_route("formatted_#{action}_#{resource.name_prefix}#{resource.plural}", "formatted_#{resource.old_name_prefix}#{action}_#{resource.plural}") |
|---|
| | 353 | end |
|---|
| | 354 | |
|---|
| | 355 | if resource.deprecate_name_prefix? |
|---|
| | 356 | map.deprecated_named_route("#{action}_#{resource.name_prefix}#{resource.plural}", "#{action}_#{resource.plural}") |
|---|
| | 357 | map.deprecated_named_route("formatted_#{action}_#{resource.name_prefix}#{resource.plural}", "formatted_#{action}_#{resource.plural}") |
|---|
| | 358 | end |
|---|
| | 359 | |
|---|
| | 360 | map.named_route("#{action}_#{resource.name_prefix}#{resource.plural}", "#{resource.path}#{resource.action_separator}#{action}", action_options) |
|---|
| | 361 | map.connect("#{resource.path};#{action}", action_options) |
|---|
| | 362 | map.connect("#{resource.path}.:format;#{action}", action_options) |
|---|
| | 363 | map.named_route("formatted_#{action}_#{resource.name_prefix}#{resource.plural}", "#{resource.path}#{resource.action_separator}#{action}.:format", action_options) |
|---|
| 354 | | map.named_route("#{resource.name_prefix}new_#{resource.singular}", resource.new_path, action_options) |
|---|
| 355 | | map.named_route("formatted_#{resource.name_prefix}new_#{resource.singular}", "#{resource.new_path}.:format", action_options) |
|---|
| | 394 | |
|---|
| | 395 | unless resource.old_name_prefix.blank? |
|---|
| | 396 | map.deprecated_named_route("new_#{resource.name_prefix}#{resource.singular}", "#{resource.old_name_prefix}new_#{resource.singular}") |
|---|
| | 397 | map.deprecated_named_route("formatted_new_#{resource.name_prefix}#{resource.singular}", "formatted_#{resource.old_name_prefix}new_#{resource.singular}") |
|---|
| | 398 | end |
|---|
| | 399 | |
|---|
| | 400 | if resource.deprecate_name_prefix? |
|---|
| | 401 | map.deprecated_named_route("new_#{resource.name_prefix}#{resource.singular}", "new_#{resource.singular}") |
|---|
| | 402 | map.deprecated_named_route("formatted_new_#{resource.name_prefix}#{resource.singular}", "formatted_new_#{resource.singular}") |
|---|
| | 403 | end |
|---|
| | 404 | |
|---|
| | 405 | map.named_route("new_#{resource.name_prefix}#{resource.singular}", resource.new_path, action_options) |
|---|
| | 406 | map.named_route("formatted_new_#{resource.name_prefix}#{resource.singular}", "#{resource.new_path}.:format", action_options) |
|---|
| | 407 | |
|---|
| 357 | | map.named_route("#{resource.name_prefix}#{action}_new_#{resource.singular}", "#{resource.new_path};#{action}", action_options) |
|---|
| 358 | | map.named_route("formatted_#{resource.name_prefix}#{action}_new_#{resource.singular}", "#{resource.new_path}.:format;#{action}", action_options) |
|---|
| | 409 | |
|---|
| | 410 | unless resource.old_name_prefix.blank? |
|---|
| | 411 | map.deprecated_named_route("#{action}_new_#{resource.name_prefix}#{resource.singular}", "#{resource.old_name_prefix}#{action}_new_#{resource.singular}") |
|---|
| | 412 | map.deprecated_named_route("formatted_#{action}_new_#{resource.name_prefix}#{resource.singular}", "formatted_#{resource.old_name_prefix}#{action}_new_#{resource.singular}") |
|---|
| | 413 | end |
|---|
| | 414 | |
|---|
| | 415 | if resource.deprecate_name_prefix? |
|---|
| | 416 | map.deprecated_named_route("#{action}_new_#{resource.name_prefix}#{resource.singular}", "#{action}_new_#{resource.singular}") |
|---|
| | 417 | map.deprecated_named_route("formatted_#{action}_new_#{resource.name_prefix}#{resource.singular}", "formatted_#{action}_new_#{resource.singular}") |
|---|
| | 418 | end |
|---|
| | 419 | |
|---|
| | 420 | map.named_route("#{action}_new_#{resource.name_prefix}#{resource.singular}", "#{resource.new_path}#{resource.action_separator}#{action}", action_options) |
|---|
| | 421 | map.connect("#{resource.new_path};#{action}", action_options) |
|---|
| | 422 | map.connect("#{resource.new_path}.:format;#{action}", action_options) |
|---|
| | 423 | map.named_route("formatted_#{action}_new_#{resource.name_prefix}#{resource.singular}", "#{resource.new_path}#{resource.action_separator}#{action}.:format", action_options) |
|---|
| | 424 | |
|---|
| 368 | | map.named_route("#{resource.name_prefix}#{action}_#{resource.singular}", "#{resource.member_path};#{action}", action_options) |
|---|
| 369 | | map.named_route("formatted_#{resource.name_prefix}#{action}_#{resource.singular}", "#{resource.member_path}.:format;#{action}",action_options) |
|---|
| | 434 | |
|---|
| | 435 | unless resource.old_name_prefix.blank? |
|---|
| | 436 | map.deprecated_named_route("#{action}_#{resource.name_prefix}#{resource.singular}", "#{resource.old_name_prefix}#{action}_#{resource.singular}") |
|---|
| | 437 | map.deprecated_named_route("formatted_#{action}_#{resource.name_prefix}#{resource.singular}", "formatted_#{resource.old_name_prefix}#{action}_#{resource.singular}") |
|---|
| | 438 | end |
|---|
| | 439 | |
|---|
| | 440 | if resource.deprecate_name_prefix? |
|---|
| | 441 | map.deprecated_named_route("#{action}_#{resource.name_prefix}#{resource.singular}", "#{action}_#{resource.singular}") |
|---|
| | 442 | map.deprecated_named_route("formatted_#{action}_#{resource.name_prefix}#{resource.singular}", "formatted_#{action}_#{resource.singular}") |
|---|
| | 443 | end |
|---|
| | 444 | |
|---|
| | 445 | map.named_route("#{action}_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}#{resource.action_separator}#{action}", action_options) |
|---|
| | 446 | map.connect("#{resource.member_path};#{action}", action_options) |
|---|
| | 447 | map.connect("#{resource.member_path}.:format;#{action}", action_options) |
|---|
| | 448 | map.named_route("formatted_#{action}_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}#{resource.action_separator}#{action}.:format", action_options) |
|---|
| | 449 | |
|---|