- 09 1月, 2010 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 07 1月, 2010 4 次提交
-
-
由 José Valim 提交于
This allows the following setup to work: # app/controllers/application_controller.rb class ApplicationController def default_url_options(options=nil) { :locale => I18n.locale } end end # From your views and controllers: I18n.locale #=> :en users_url #=> "/en/users" users_url(:pl) #=> "/pl/users" user_url(1) #=> "/en/users/1" user_url(:pl, 1) #=> "/pl/users/1" user_url(1, :locale => :pl) #=> "/pl/users/1" If you provide all expected parameters, it still works as previously. But if any parameter is missing, it tries to assign all possible ones with the hash returned in default_url_options or the one passed straight to the named route method. Beware that default_url_options in ApplicationController is not shared with ActionMailer, so you are required to always give the locale in your email views.
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 06 1月, 2010 2 次提交
-
-
由 José Valim 提交于
-
由 David Heinemeier Hansson 提交于
-
- 05 1月, 2010 1 次提交
-
-
由 Zach Brock 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
- 03 1月, 2010 2 次提交
-
-
由 José Valim 提交于
-
由 Carsten Gehling 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 25 12月, 2009 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 23 12月, 2009 1 次提交
-
-
由 Joshua Peek 提交于
-
- 16 11月, 2009 1 次提交
-
-
由 Will Read 提交于
[#3259 state:resolved] Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
- 10 11月, 2009 1 次提交
-
-
由 Bryan Helmkamp 提交于
-
- 22 10月, 2009 1 次提交
-
-
由 José Valim 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 18 10月, 2009 1 次提交
-
-
由 José Valim 提交于
-
- 16 10月, 2009 1 次提交
-
-
由 José Valim 提交于
-
- 15 10月, 2009 3 次提交
-
-
由 Michael Koziarski 提交于
-
由 Phil Darnowsky 提交于
ActionView::Helpers::UrlHelper#url_for used to escape the URLs it generated by default. This was most commonly seen when generating a path with multiple query parameters, e.g. url_for(:controller => :foo, :action => :bar, :this => 123, :that => 456) would return http://example.com/foo/bar?that=456&this=123 escaping an ampersand that shouldn't be escaped. This is both wrong and inconsistent with the behavior of ActionController#url_for, and is changed. Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
由 Yehuda Katz 提交于
By using config rather than hardcoded constants, we can evolve the configuration system over time (we'd just need to update the config method with more robust capabilities and all consumers would get the capabilities with no code changes)
-
- 09 10月, 2009 1 次提交
-
-
由 Joshua Peek 提交于
-
- 08 10月, 2009 2 次提交
-
-
由 Michael Koziarski 提交于
-
由 Michael Koziarski 提交于
This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
-
- 04 10月, 2009 1 次提交
-
-
由 Joshua Peek 提交于
-
- 28 9月, 2009 2 次提交
-
-
由 John Trupiano 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com> [#3266 state:committed]
-
由 Jay Pignata 提交于
Enhancing distance_of_time_in_words to prefix year output with over and about depending upon how many months have elapsed Signed-off-by: NMichael Koziarski <michael@koziarski.com> [#3106 state:committed]
-
- 14 9月, 2009 2 次提交
-
-
由 Joshua Peek 提交于
-
由 Joshua Peek 提交于
-
- 12 9月, 2009 1 次提交
-
-
由 Andrew France 提交于
Allow fields_for on a nested_attributes association to accept an explicit collection to be used. [#2648 state:resolved] Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
- 04 9月, 2009 2 次提交
-
-
由 Michael Koziarski 提交于
Addresses CVE-2009-3009
-
由 Sam Pohlenz 提交于
Don't raise exceptions for missing javascript_include_tag or stylesheet_link_tag sources unless the :cache or :concat options are given. [#2738 state:resolved] Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 27 8月, 2009 3 次提交
-
-
由 Akira Matsuda 提交于
[#2252 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
由 Jeremy Kemper 提交于
Broke CI. [#2252 state:open] This reverts commit adedf728.
-
由 Akira Matsuda 提交于
[#2252 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 16 8月, 2009 1 次提交
-
-
由 Yehuda Katz 提交于
* request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
-
- 10 8月, 2009 3 次提交
-
-
由 codeape 提交于
[#1249 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
由 Max Lapshin 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
由 Matt Duncan 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 09 8月, 2009 2 次提交
-
-
由 rizwanreza 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
由 Yehuda Katz 提交于
-