Joshua Peek
e38ea982ff
Unused RouteSet#url_for is hogging a good method name
2010-03-09 20:57:43 -06:00
Joshua Peek
7db80f87e9
Move AC::UrlRewriter onto route set
2010-03-09 20:50:35 -06:00
Jeremy Kemper
a87683fb38
Disprefer JSONGem decoder since it only decodes JSON objects
2010-03-09 11:06:54 -08:00
Justin Ko
ea4f8ef33f
Reinstate dom_id in controllers.
...
[#3040 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-09 10:49:36 -08:00
wycats
9444ac9312
Refactor the RouteSet so it uses a Generator object instead of one huge method.
2010-03-09 10:20:56 -08:00
wycats
de79525d04
Get rid of the instance-level URL rewriter
2010-03-09 10:20:56 -08:00
Jeremy Kemper
c507e16dba
Reinstate default_url_options and remove url_options= writer
2010-03-08 21:40:45 -08:00
Jeremy Kemper
514d3a47f4
Remove outdated, distracting commented code
2010-03-08 21:40:18 -08:00
wycats
e4558e0dbf
Now that class_attribute creates an instance method, remove it to avoid deprecation warnings ;)
2010-03-08 18:48:58 -08:00
Carlhuda
056042eb82
Simplify the action endpoint:
...
* Remove ActionEndpoint in favor of passing a block to MiddlewareStack
* Always create a Request; the performance win of RackDelegation is around
the response; the Request object hit is limited to a single object allocation
* #dispatch takes a Request
2010-03-08 16:50:00 -08:00
Carlhuda
146a5305d5
Add memoizing to AD::Request
2010-03-08 16:50:00 -08:00
Jeremy Kemper
60bbf16bfd
class_attribute gets instance methods which delegate to but may override their class values as you'd expect. Disable instance writer methods with :instance_writer => false.
2010-03-08 16:20:54 -08:00
Carlos Antonio da Silva
47d252f992
Fix associations to call :destroy or :delete based on the right :dependent option
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-03-09 00:11:34 +01:00
Carl Lerche
8e9d9232b0
Require 'active_support/core_ext/hash/except' in the router.
2010-03-08 14:36:05 -08:00
José Valim
8f082ff421
Clean LookupContext API.
2010-03-08 23:25:16 +01:00
Carl Lerche
01f0e47663
Move request forgery protection configuration to the AC config object
...
This is an interim solution pending revisiting the rails
framework configuration situation.
2010-03-08 14:02:41 -08:00
Carlhuda
0045f37681
Whoops. We meant to switch from returning to tap, not vice versa
2010-03-08 12:30:51 -08:00
Carlhuda
f38e2e0335
Add support for mount RackApp, :at => "/sprockets" with a shorthand of mount Sprockets => "/sprockets".
...
This is different from the match syntax in that it cannot be used for controller/action and it does not
assume an anchor at the end of the match.
For instance, in the above example, if the client asked for "/sprockets/foo.js", the Sprockets app would
have a SCRIPT_NAME of "/sprockets" and PATH_INFO of "/foo.js".
2010-03-08 12:26:18 -08:00
José Valim
7942e90960
Merge master.
2010-03-08 21:06:26 +01:00
José Valim
36eb1a686c
Bring AM up to date with new rendering stack.
2010-03-08 20:57:33 +01:00
Carlhuda
ae93789d9a
Move middlewares to the Application level. If you want to modify the middleware, either use Rails.application.config.middleware or modify it in an initializer (if you need to set it relative to user-specified middleware).
2010-03-08 11:40:51 -08:00
José Valim
bdf5096816
Move details to lookup_context and make resolvers use the cache key.
2010-03-08 20:39:15 +01:00
José Valim
67a6725bf9
Move ViewPaths module to its own file.
2010-03-08 16:50:10 +01:00
José Valim
68cda695da
Speed up performance in resolvers by adding fallbacks just when required.
2010-03-08 16:32:40 +01:00
José Valim
44ebab96da
Rename Template::Lookup to LookupContext.
2010-03-08 15:19:03 +01:00
José Valim
ea68fe59c6
More refactoring on the views side of rendering.
2010-03-08 14:46:57 +01:00
José Valim
0a85380966
Finally moved the find template logic to the views.
2010-03-08 11:32:01 +01:00
wycats
79b0b5082c
Aliasing class_eval makes JRuby ornery.
2010-03-07 22:34:39 -08:00
wycats
54a69c31ed
Typo in config.action_dispatch
2010-03-07 21:27:40 -08:00
José Valim
34b2180451
More refactoring. Split _normalize_args and _normalize_options concerns.
2010-03-08 03:23:23 +01:00
José Valim
4bae77a89b
More cleanup on the layouts side.
2010-03-08 02:58:16 +01:00
José Valim
ffd8d753f1
Move layout lookup to views.
2010-03-08 02:04:18 +01:00
Jan De Poorter
dfc7ff6429
Make sure nested singular resources get the correct name
...
[#3911 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-07 14:36:26 -08:00
Jeremy Kemper
aa758b9388
Update generated Gemfile to use http://rubygems.org , unicorn instead of mongrel, and nokogiri instead of hpricot
2010-03-07 12:41:54 -08:00
Jeremy Kemper
4a89467f7c
If RAILS_PATH isn't set, make a dummy doc task
2010-03-07 12:39:53 -08:00
Jeremy Kemper
ee580d0cc3
rake doc:rails complains loudly if there's no path to generate docs from
2010-03-07 12:06:48 -08:00
José Valim
c7564d74e8
Added template lookup responsible to hold all information used in template lookup.
2010-03-07 19:41:58 +01:00
Joshua Peek
e00bc711d8
Bump rack-mount requirement to 0.6
2010-03-07 11:09:50 -06:00
wycats
39d6f9e112
Make many parts of Rails lazy. In order to facilitate this,
...
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.
With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.
TODO: rename base_hook
2010-03-07 06:24:30 -08:00
José Valim
6e0443fd43
First take on ViewPaths clean up.
2010-03-07 12:49:27 +01:00
Aaron Patterson
a424f199a9
drying up more code in associations.rb
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-06 21:41:13 -08:00
Aaron Patterson
939291e8f2
deleting repeated code
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-06 21:33:29 -08:00
Stefan Penner
4bc2cbc3cf
Load RAILS_VERSION relative to the gemspec file.
2010-03-06 21:33:28 -08:00
Aaron Patterson
3789539916
converting inject to each and map
...
[#4119 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-06 20:31:50 -08:00
Aaron Patterson
45c36ea096
refactoring build_where
...
Signed-off-by: wycats <wycats@gmail.com >
2010-03-06 13:25:12 -08:00
José Valim
028e54c63d
Add mailers to paths in case someone wants to access it directly and ensures deep nesting works in controllers.
2010-03-06 19:25:55 +01:00
Stijn Mathysen
67512b9489
Removed the + sign as an accepted character from the parameterize method, as a + sign is interpreted by the browser as a space, possibly resulting in a "ArgumentError: illegal character in key"
...
[#4080 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-05 14:11:21 -08:00
Santiago Pastorino
e472f76e4c
Adds disable option to date_helpers generated hidden fields when html_options specifies it. ht by Marc Schütz
...
[#3807 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-03-05 13:49:04 -08:00
Jeremy Kemper
8fc97d198e
Allow deprecation messages with or without a final period.
2010-03-05 12:35:42 -08:00
Jeremy Kemper
a82cf0a932
Tweak default_url_options deprecation warning
2010-03-05 12:17:23 -08:00