aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/formatter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove AD::Journey::Formatter#verify_required_parts!Viktar Basharymau2014-05-231-5/+0
| | | | | Nobody uses this private method, maybe it is a leftover from some old refactoring. Let's delete it.
* Merge pull request #15254 from DNNX/formatter-refactoring-3Rafael Mendonça França2014-05-221-4/+4
|\ | | | | Rename `stack` to `queue`
| * Rename `stack` to `queue`Viktar Basharymau2014-05-221-4/+4
| | | | | | | | | | | | | | Because it is used as a queue (FIFO), not as a stack (LIFO). * http://en.wikipedia.org/wiki/Stack_(abstract_data_type) * http://en.wikipedia.org/wiki/Queue_(data_structure)
* | Merge pull request #15252 from DNNX/formatter-refactoring-2Rafael Mendonça França2014-05-221-1/+1
|\ \ | | | | | | Remove unnecessary `Hash#to_a` call
| * | Remove unnecessary `Hash#to_a` callViktar Basharymau2014-05-221-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inspired by https://github.com/rails/rails/commit/931ee4186b877856b212b0085cd7bd7f6a4aea67 ```ruby def stat(num) start = GC.stat(:total_allocated_object) num.times { yield } total_obj_count = GC.stat(:total_allocated_object) - start puts "#{total_obj_count / num} allocations per call" end h = { 'x' => 'y' } stat(100) { h. each { |pair| pair } } stat(100) { h.to_a.each { |pair| pair } } __END__ 1 allocations per call 2 allocations per call ```
* / Use `break` instead of `next` in AD::Journey::Formatter#match_routeViktar Basharymau2014-05-221-1/+1
|/ | | | | | The array is sorted in descending order, so there is no point in iterating further if we met a negative item - all the rest will be negative too.
* do not mutate parameters, let the caller do mutationsAaron Patterson2014-05-211-0/+6
|
* we don't use this parameter for anything, so rmAaron Patterson2014-05-201-1/+1
|
* Replace map.flatten(1) with flat_mapErik Michaels-Ober2014-02-281-2/+2
|
* Show full route constraints in error messageAndrew White2014-01-051-2/+2
| | | | | | | | When an optimized helper fails to generate, show the full route constraints in the error message. Previously it would only show the contraints that were required as part of the path. Fixes #13592
* Skip Rack applications and redirects when generating urlsAndrew White2013-07-161-1/+5
| | | | | | | | | | When generating an unnamed url (i.e. using `url_for` with an options hash) we should skip anything other than standard Rails routes otherwise it will match the first mounted application or redirect and generate a url with query parameters rather than raising an error if the options hash doesn't match any defined routes. Fixes #8018
* rails -> Rails [ci skip]Prathamesh Sonpatki2013-05-091-1/+1
|
* Mark unused variables and make some style fixesAgis Anastasopoulos2013-04-081-1/+1
| | | | It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
* Raise correct exception now Journey is integrated.Andrew White2013-01-151-1/+6
| | | | | | | Now that Journey has been integrated into ActionDispatch we can raise the exception ActionController::UrlGenerationError directly rather than raising the internal Journey::Router::RoutingError and then have ActionDispatch::Routing::RouteSet#generate re-raise the exception.
* remove another unnecessary dupGosha Arinich2013-01-021-5/+3
|
* remove unnecessary #dupGosha Arinich2013-01-021-2/+1
|
* update AD::Journey to follow Rails coding conventionsFrancesco Rodriguez2012-12-201-84/+82
|
* :nodoc: Journey because is not part of the public API [ci skip]Francesco Rodriguez2012-12-191-6/+5
|
* Integrate Journey into Action DispatchAndrew White2012-12-191-0/+147
Move the Journey code underneath the ActionDispatch namespace so that we don't pollute the global namespace with names that may be used for models. Fixes rails/journey#49.