aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
Commit message (Collapse)AuthorAgeFilesLines
* Refactor resource action scope methodsAndrew White2010-10-081-38/+20
|
* avoid method call to compactAaron Patterson2010-10-041-4/+4
|
* Properly reload routes defined in class definitionPiotr Sarnacki2010-09-301-0/+1
| | | | | | | | | | | | | | | | | Sometimes it's easier to define routes inside Engine or Application class definition (e.g. one file applications). The problem with such case is that if there is a plugin that has config/routes.rb file, it will trigger routes reload on application. Since routes definition for application is not in config/routes.rb file routes_reloader will fail to reload application's routes properly. With this commit you can pass routes definition as a block to routes method, which will allow to properly reload it: class MyApp::Application < Rails::Application routes do resources :users end end
* Allow mounting engines at '/'Piotr Sarnacki2010-09-301-1/+1
| | | | | Without that commit script_name always become '/', which results in paths like //posts/1 instead of /posts/1
* Use .find here as it is simpler and faster.José Valim2010-09-301-1/+1
|
* avoid creating a block if possibleAaron Patterson2010-09-291-2/+2
|
* fixing regexp warningsAaron Patterson2010-09-291-1/+1
|
* Don't try to interpolate string if there's no interpolation point at all.Emilio Tagua2010-09-291-1/+1
|
* Ensure that named routes do not overwrite previously defined routes.José Valim2010-09-291-10/+13
|
* Avoid (@_var ||= nil) pattern by using initialize methods and ensuring ↵José Valim2010-09-291-1/+5
| | | | everyone calls super as expected.
* Merge remote branch 'miloops/warnings'José Valim2010-09-292-1/+2
|\
| * Use redefine_method instead define_method, it may be already defined.Emilio Tagua2010-09-281-1/+1
| |
| * Remove more warnings on variables.Emilio Tagua2010-09-281-0/+1
| |
| * Move uri parser to AS as URI.parser method to reuse it in AP and ARes.Emilio Tagua2010-09-271-8/+2
| |
* | Move uri parser to AS as URI.parser method to reuse it in AP and ARes.Emilio Tagua2010-09-281-8/+2
| |
* | Fix tests on 1.9.2.José Valim2010-09-281-5/+0
| |
* | Properly initialize variables inside the initialize method.José Valim2010-09-271-3/+8
|/
* Define @_routes inside method, makes more sense and will be initialized when ↵Emilio Tagua2010-09-272-2/+1
| | | | | | called anywhere. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove warning "URI.unescape is obsolete" from actionpack.Emilio Tagua2010-09-271-4/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Merge remote branch 'miloops/warnings'José Valim2010-09-273-12/+24
|\ | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/url_for.rb
| * Initialize @_routes if it doesn't exists.Emilio Tagua2010-09-271-0/+1
| |
| * Remove warning "too many arguments for format string" when interpolating ↵Emilio Tagua2010-09-271-1/+1
| | | | | | | | with empty hash.
| * Initialize @as before plural method is called.Emilio Tagua2010-09-271-0/+1
| |
| * Remove old method before redefining it.Emilio Tagua2010-09-271-0/+2
| |
| * Remove warning "URI.unescape is obsolete" from actionpack.Emilio Tagua2010-09-272-11/+19
| |
* | Convert unless/else into if/else.thedarkone2010-09-271-4/+4
| |
* | Hash#empty? is faster than Enumerable#any? when used on a Hash.thedarkone2010-09-271-1/+1
| |
* | options[:action] is very likely to be nil.thedarkone2010-09-271-1/+1
| |
* | No need to create a separate lambda for each call.thedarkone2010-09-271-15/+14
|/
* Refactor routing methods.Emilio Tagua2010-09-222-11/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Raise ArgumentError instead of normalizing controller name when there is a ↵Andrew White2010-09-181-1/+5
| | | | leading slash [#5651 state:resolved]
* Remove leading slash from controller [#5651 state:resolved]Andrew White2010-09-181-1/+1
|
* Add RouteSet#appendCarl Lerche2010-09-171-4/+12
| | | Allows specifying blocks to the routeset that will get appended after the RouteSet is drawn.
* Change app to main_app in mounted_helpersPiotr Sarnacki2010-09-081-1/+1
|
* Do not require passing :app to mounted helpers, it's actually useless and ↵Piotr Sarnacki2010-09-081-1/+1
| | | | not DRY
* Remove a few tests from old router that do not make sense with the new one.José Valim2010-09-051-21/+3
|
* Removed deprecated_mapper - we don't need it anymoreŁukasz Strzałkowski2010-09-051-525/+0
|
* Ported missing functionality from Rails 2.3.x, raise error on wrong regexps ↵Piotr Sarnacki2010-09-051-0/+9
| | | | in :constraints in routes
* raise error on invalid HTTP methods or :head passed with :via in routesPiotr Sarnacki2010-09-051-0/+9
|
* Implemented resources :foos, :except => :all optionPiotr Sarnacki2010-09-051-2/+11
|
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-052-15/+4
|
* Implemented RouteSet#default_scope, which allows to set the scope for the ↵Piotr Sarnacki2010-09-032-2/+12
| | | | entire routes object
* Use new ActiveModel::Naming.route_key in polymorphic_routesPiotr Sarnacki2010-09-031-11/+2
|
* Add short note on using url_for instead of directly calling named route in ↵Piotr Sarnacki2010-09-031-0/+3
| | | | polymorphic_url
* Add possibility to explicitly call engine's routes through ↵Piotr Sarnacki2010-09-031-1/+20
| | | | polymorphic_routes, for example: polymorphic_url([blog, @post])
* Move RoutesProxy to separate filePiotr Sarnacki2010-09-032-32/+35
|
* Added more tests for polymorphic_url with namespaced models and implemented ↵Piotr Sarnacki2010-09-031-5/+10
| | | | missing use cases
* This was used only to clear warning in ActionMailer tests, it shouldn't be ↵Piotr Sarnacki2010-09-031-5/+0
| | | | done like that
* Modified polymorphic_url to check for model's namespacePiotr Sarnacki2010-09-031-0/+4
| | | | | | | | | | | This change allows using namespaced models with polymorphic_url, in the way that you would use them without namespace. Let's say that you have Blog::Post model in namespaced Engine. When you use polymorphic_path with Blog::Post instances, like in form_for(@post), it will look for blog_posts_path named url helper. As we are inside Blog::Engine, it's annoying to always use the prefix. With this commit, blog_ prefix will be removed and posts_path will be called.
* Refactor RoutesProxy to avoid using _with_routes in helpersPiotr Sarnacki2010-09-032-1/+5
|