Commit Graph

4228 Commits

Author SHA1 Message Date
Carlos Galdino + Rafael Mendonça França
683fc4db00 Remove :disable_with in favor of 'data-disable-with' option from submit_tag, button_tag and button_to helpers. 2012-05-14 16:42:19 -03:00
Rafael Mendonça França
71931e2ef1 Remove :mouseover option from image_tag helper. 2012-05-13 19:55:44 -03:00
Rafael Mendonça França
2ef29ef9af Merge pull request #3237 from sakuro/data-url-scheme
Support data: url scheme

Conflicts:
	actionpack/lib/action_view/asset_paths.rb
2012-05-13 19:28:56 -03:00
Rafael Mendonça França
521e964411 Do not add :include_blank option if prompt is present 2012-05-13 01:00:31 -03:00
Rafael Mendonça França
3081856115 Only set :include_blank if the value of this options is not present 2012-05-13 01:00:31 -03:00
Rafael Mendonça França
94d84c5383 :include_blank should be true if the size option is nil 2012-05-13 01:00:31 -03:00
Rafael Mendonça França
a8cfaed338 Merge pull request #6225 from acapilleri/select_with_required_true_include_first_option_blank
HTML5 validation error with options_from_collection_for_select

Fixes #5908

Conflicts:
	actionpack/CHANGELOG.md
2012-05-13 01:00:01 -03:00
angelo giovanni capilleri
64af96bb9c Always include the options :include_blank if the select has a required attribute
and display size 1 and not multiple attribute,  Fixes #5908
2012-05-13 02:01:05 +02:00
angelo giovanni capilleri
47570d4f1f mispelling errors in render_text_test.rb and sqlite_specific_schema 2012-05-12 13:19:28 +02:00
Santiago Pastorino
36dd1857dc Remove useless load path modifications 2012-05-11 19:00:35 -03:00
Andrew White
9b4514c3b8 Copy literal route constraints to defaults - fixes #3571 and #6224. 2012-05-11 07:29:17 +01:00
Andrew White
09a48b2324 Don't ignore nil positional arguments for url helpers - fixes #6196. 2012-05-10 22:52:00 +01:00
Andrew White
e306ca3627 Refactor the handling of default_url_options in integration tests
This commit improves the handling of default_url_options in integration
tests by making behave closer to how a real application operates.

Specifically the following issues have been addressed:

* Options specified in routes.rb are used (fixes #546)
* Options specified in controllers are used
* Request parameters are recalled correctly
* Tests can override default_url_options directly
2012-05-10 20:42:57 +01:00
Andrew White
beea9f5d4e Refactor Generator class to not rely on in-place editing the controller 2012-05-09 11:53:15 +01:00
Nikita Beloglazov
e154823935 Fix bug when url_for changes controller. 2012-05-09 11:53:14 +01:00
Kunal Shah
c09a92fb9e Add failing test re #3436 which demonstrates content_type is not respected when using the :head method/shortcut 2012-05-08 03:11:46 -04:00
Jeremy Kemper
4d0e6db9ec Add passing tests for generating URLs with nested SCRIPT_NAMEs 2012-05-07 14:53:57 -07:00
José Valim
fef110d4a8 Merge pull request #5368 from andhapp/remove-max-stale
Minor test improvement
2012-05-07 07:35:42 -07:00
Jeremy Kemper
a29bc1cf7b Fix that optimized named routes should also work as singleton methods on the url_helpers module 2012-05-06 12:47:32 -07:00
Steven Soroka
ec4045c02f added an integration test that checks ActionController::UnknownFormat renders 406 :not_acceptable 2012-05-06 00:27:45 -05:00
Steven Soroka
3532200576 Raise a rescuable exception when Rails doesn't know what to do with the format, rather than responding with a head :not_acceptable (406) 2012-05-06 00:27:45 -05:00
Vasiliy Ermolovich
e0aadf12e3 check checkboxes with array of strings as :checked option 2012-05-05 20:34:06 +03:00
José Valim
7a093606f6 Merge pull request #4445 from nragaz/role_based_params_wrapping
specify a role for identifying accessible attributes when wrapping params
2012-05-04 21:45:32 +02:00
Alexey Vakhov
0d19a081ee Improve assert_template layout checking 2012-05-04 23:31:09 +04:00
Alexey Vakhov
4bd05a7bdc Fix assert_template :layout => nil assertion 2012-05-04 23:31:05 +04:00
Alexey Vakhov
df36c5f7ff Fix assert_template assertion with :layout option 2012-05-04 23:31:03 +04:00
Carlos Antonio da Silva
d03aa104e0 Force given path to http methods in mapper to skip canonical action checking
This fixes the following scenario:

    resources :contacts do
      post 'new', action: 'new', on: :collection, as: :new
    end

Where the /new path is not generated because it's considered a canonical
action, part of the normal resource actions:

    new_contacts POST   /contacts(.:format)          contacts#new

Fixes #2999
2012-05-04 15:17:04 -03:00
Vijay Dev
319db7b189 update invalid partial error message as per 04202a3f8d66c0675eac41fbf63309f4be356e81 2012-05-04 23:45:27 +05:30
Aaron Patterson
b13849de88 Merge branch 'master' into session
* master: (55 commits)
  extract deprecated dynamic methods
  Add some docs and changelog entry
  Allow overriding exception handling in threaded consumer
  Allow configuring a different queue consumer
  actually don't need to expand the aggregates at all
  #to_sym is unnecessary
  de-globalise method
  extract code from AR::Base
  clean up implementation of dynamic methods. use method compilation etc.
  Fix ActiveModel README example
  mention database mapping in getting started guide
  Remove vestiges of the http_only! config from configuring guide
  Remove content-length as well
  Make ActionController#head pass rack-link
  RouteSet: optimize routes generation when globbing is used
  Allows assert_redirected_to to accept a regular expression
  use extract_options!
  No need to force conversion to Symbol since case ensures it's already one.
  No need to work around 1.8 warnings anymore.
  Update command line guide
  ...
2012-05-04 10:14:10 -07:00
José Valim
5f62c86b50 Merge pull request #6148 from twinturbo/head-fix
Make ActionController#head pass rack-link
2012-05-03 22:52:08 -07:00
twinturbo
8edd21c66f Remove content-length as well 2012-05-03 17:24:05 -07:00
twinturbo
8eedd1a4a7 Make ActionController#head pass rack-link 2012-05-03 16:18:51 -07:00
Andy Lindeman
a544e00681 Allows assert_redirected_to to accept a regular expression 2012-05-03 09:16:38 -04:00
Aaron Patterson
5b360dbb9b testing session store behavior 2012-05-02 17:29:33 -07:00
Andrew White
5603050656 Reset the request parameters after a constraints check
A callable object passed as a constraint for a route may access the request
parameters as part of its check. This causes the combined parameters hash
to be cached in the environment hash. If the constraint fails then any subsequent
access of the request parameters will be against that stale hash.

To fix this we delete the cache after every call to `matches?`. This may have a
negative performance impact if the contraint wraps a large number of routes as the
parameters hash is built by merging GET, POST and path parameters.

Fixes #2510.
2012-05-02 23:58:40 +01:00
José Valim
b656134450 Merge pull request #6125 from ncri/master
Adding proc evaluation for action caching layout parameter
2012-05-02 13:40:16 -07:00
Nico
9a41edf0d9 added proc evaluation for action cache's layout parameter 2012-05-02 22:31:24 +02:00
Mark Turner
61ba0fe82c Enable ActionDispatch::Http::Headers to support fetch 2012-05-02 11:22:34 -07:00
Bogdan Gusiev
ce5c2b88fe ActionPack: remove tests for hash_for_* methods 2012-05-02 10:41:34 +03:00
Elliot Winkler
297359bcfd distance_of_time_in_words: Add/tweak comments to understand time intervals better 2012-04-30 11:29:36 -06:00
Elliot Winkler
d2f995eda9 distance_of_time_in_words: 45-60 days is about 2 months, not about 1 month 2012-04-30 11:19:49 -06:00
Jeremy Kemper
7d5146efad Merge pull request #5705 from lest/patch-3
split CDATA end token in cdata_section helper
2012-04-30 06:47:07 -07:00
José Valim
bca9a9e926 Merge pull request #6084 from brainopia/support_for_magic_domain_on_all_stores
Support cookie jar options for all cookie stores
2012-04-30 06:28:22 -07:00
José Valim
09de707f25 Merge pull request #6082 from brainopia/smarter_cookie_jar
Stream cookies only if needed
2012-04-30 06:27:01 -07:00
Sergey Nartimov
16df67b148 split CDATA end token in cdata_section helper 2012-04-30 16:08:06 +03:00
José Valim
02741121be Merge pull request #3726 from JanDupal/fix-date-helper-hidden
fix Helpers::DateHelper with :use_hidden - hide separators
2012-04-30 06:05:08 -07:00
brainopia
2d18dd3471 Dont stream back cookie value if it was set to the same value 2012-04-30 17:04:17 +04:00
brainopia
ff2667d21a Dont set cookie header for deletion of unexisting data 2012-04-30 17:04:17 +04:00
José Valim
81f6d7f2ad Merge pull request #6077 from dmitriy-kiriyenko/improve_signature_of_time_in_words_helper
Replace boolean argument with an options hash.
2012-04-30 00:38:57 -07:00
Dmitriy Kiriyenko
4a2d53a514 Replace boolean argument with an options hash.
This replaces `include_seconds` argument with an option key
`include_seconds => true` in options hash.

Also `time_ago_in_words` now passes options hash, including a `locale`
key, which makes in compatible with `distance_of_time_in_words`.
2012-04-30 10:26:11 +03:00