Yehuda Katz
cf4978313b
Make sure evalled method knows where it came from
2009-12-29 01:04:32 -08:00
Jeremy Kemper
f79caa49fb
Complain if there's no such middleware
2009-12-28 20:24:28 -08:00
Jeremy Kemper
9a650a6547
Silence some trivial warnings: shadowed local vars, indentation mismatches
2009-12-28 17:36:08 -08:00
Jeremy Kemper
7c4fb93ac3
Ruby 1.9: string is not enumerable, so #exclude? is not available
2009-12-27 15:38:00 -08:00
Jeremy Kemper
3a79117c77
Typo
2009-12-27 15:27:18 -08:00
David Heinemeier Hansson
438a8c3ec7
Require the enumberable extension from active support because we use #exclude?
2009-12-27 15:23:30 -08:00
David Heinemeier Hansson
95762cbbb3
Added shorthand for match 'products/overview' that expands to match 'products/overview', :to => 'products#overview', :as => 'products_overview'
2009-12-27 14:13:03 -08:00
Joshua Peek
feb7382047
AD::Cascade that supports X-Cascade
2009-12-26 13:28:06 -06:00
Joshua Peek
673fa7f066
rack-mount 0.4
2009-12-26 13:25:36 -06:00
David Heinemeier Hansson
7f5d44bac5
The controller key shouldnt be part of the mapping if its not used
2009-12-25 10:14:44 -08:00
David Heinemeier Hansson
38af368360
Merge
2009-12-24 15:24:57 -08:00
David Heinemeier Hansson
2b7256a42e
Extract Mapping class from monster match method
2009-12-24 15:23:39 -08:00
Sam Ruby
aa3565f3a6
Allow named_routes to be used with root, and with new DSL short-form.
...
The real use case it to make all of the following act the same:
root 'store#index', :as => 'store'
match '/' => 'store#index', :as => 'store'
match '/', :to => 'store#index', :as => 'store'
The test case provided deviates from this in order to demonstrate all three
forms in a single set of test routes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-12-23 20:55:21 -08:00
Jeremy Kemper
4d3602a8c4
Routing: fix that route shorthand shouldn't ignore other options. Raise if :as option is given to root method since its name is always 'root'
2009-12-23 17:42:30 -08:00
Jeremy Kemper
94bb331635
Shift more responsibility from application class to its singleton instance. Treat instantiation and boot as separate steps. Use app.config rather than app.configuration.
2009-12-23 17:11:17 -08:00
David Heinemeier Hansson
e7ef57dd0d
Merge
2009-12-22 17:31:29 -08:00
David Heinemeier Hansson
fe5f660413
Dont encourage __FILE__ bullshit
2009-12-22 17:25:34 -08:00
Joshua Peek
b1aee9f4ee
All AD modules are "deferrable"
2009-12-22 17:11:21 -06:00
Joshua Peek
df7faef68e
Referer and user agent are in Rack::Request
2009-12-22 16:09:41 -06:00
Joshua Peek
a1bf2f96ce
AD::StatusCodes support is now part of rack
2009-12-22 16:08:03 -06:00
Joshua Peek
715dd10961
Less annoying RoutingError message
2009-12-21 17:34:53 -06:00
David Heinemeier Hansson
3ff9e9ee14
Its now possible to use match 'stuff' => 'what#stuff' instead of using the :to for simple routes
2009-12-20 20:37:36 -08:00
Joshua Peek
15f95621d5
We don't need AD parse_config
2009-12-20 21:11:42 -06:00
Yehuda Katz
17f66473bc
AC::Head now doesn't have an unfulfilled Rendering dependency, and instead works just fine standalone (which means that ConditionalGet also doesn't have a Rendering dependency)
2009-12-20 18:50:54 -08:00
David Heinemeier Hansson
eeda059818
Just a little tidying
2009-12-20 18:37:09 -08:00
David Heinemeier Hansson
cf9d6a95e8
Added ActionDispatch::Request#authorization to access the http authentication header regardless of its proxy hiding [DHH]
2009-12-20 18:30:50 -08:00
Yehuda Katz
e48b4c2dd0
:to => redirect() can take a String using 1.9-style interpolation or proc that takes the path parameters as a Hash
2009-12-20 14:07:32 -08:00
Joshua Peek
2419fae092
Pending tests for AD Response
2009-12-17 22:10:37 -06:00
Joshua Peek
7217d64f61
Use AbstractController error constants
2009-12-16 16:11:42 -06:00
Joshua Peek
5f8e48cbd2
Move route reloading into railties
2009-12-14 17:54:41 -06:00
Joshua Peek
ec99eca013
Fix loading plugin and engine route sets
2009-12-14 16:51:13 -06:00
Joshua Peek
2130566acf
Fix warnings in AD::Response
2009-12-14 15:47:52 -06:00
Joshua Peek
018dafe574
Allow autoloads to opt out of eager loading
2009-12-12 18:41:26 -06:00
Joshua Peek
ee395fe626
TestProcess belongs in AD
2009-12-12 18:09:44 -06:00
Joshua Peek
2297eaed5b
"new" and "edit" name routes always need to be prepend to the
...
named_route [#3561 state:resolved]
2009-12-11 12:46:50 -06:00
Joshua Peek
61e9f2023b
Use rackmounts recognize api and don't piggyback recognize_path on
...
top of rack call
2009-12-11 00:11:16 -06:00
Joshua Peek
588225f885
Remove fancy method not allowed resource exceptions since they are
...
too much of a hack
2009-12-11 00:01:22 -06:00
Joshua Peek
2f90d70049
Kill RouteSet#recognize
2009-12-10 23:45:04 -06:00
Joshua Peek
d1191507bc
Cleanup generate_extras build/parse mess
2009-12-10 22:57:07 -06:00
Joshua Peek
1b82590c36
Reduce usage of interpret_status. It should also return a integer
...
not a string.
2009-12-10 22:02:50 -06:00
Joshua Peek
ec5434c3c2
Check block arity passed to routes draw so you don't need to use
...
|map|
2009-12-09 20:46:32 -06:00
Joshua Peek
511cef296b
Tack format onto resource routes
2009-12-08 17:19:49 -06:00
Joshua Peek
ce5f27b04b
Remove double scoping blocks and just use one
2009-12-08 16:13:00 -06:00
Joshua Peek
c4df6332a4
Seperate scope level for nesting resources
2009-12-08 16:06:46 -06:00
Joshua Peek
33658ea1ae
Don't use name prefix by itself unless as is an empty string
2009-12-08 15:50:44 -06:00
Joshua Peek
3d91d7f0a2
Routes added under resource collection should be prefixed with
...
resource collection name
2009-12-08 15:31:56 -06:00
Joshua Peek
1fc58a889d
Fixed named prefix scope in resource member and collection actions
2009-12-07 20:57:01 -06:00
Joshua Peek
0c34e3f41a
Ignore name_prefix unless there is an explicit name
2009-12-07 20:11:57 -06:00
Joshua Peek
81d7227c9b
Move base mapper methods into Base module so plugins can easily
...
extend the mapper
2009-12-07 19:59:23 -06:00
Joshua Peek
e86a82c52c
Move name_prefix merging into Scoping concern
2009-12-07 19:50:13 -06:00