Commit Graph

9221 Commits

Author SHA1 Message Date
Aaron Patterson
c63d17c2be push drawing once to it's own module 2012-08-09 14:50:27 -07:00
Aaron Patterson
1e8c0a29d0 refactor the before_setup hooks to a module 2012-08-09 14:50:26 -07:00
Aaron Patterson
0b29c7bb7b switch callbacks to minitest hooks 2012-08-09 14:50:26 -07:00
Aaron Patterson
6794e92b20 Merge pull request #7302 from homakov/default_headers
Introduce default_headers. closes #6311 #6515
2012-08-09 13:38:29 -07:00
Aaron Patterson
6a3d4695f0 initialize instance variables 2012-08-09 11:21:58 -07:00
Egor Homakov
98c18d0058 some tests 2012-08-09 17:12:11 +03:00
Egor Homakov
2a290f7f7c introduce default_headers config 2012-08-09 16:45:30 +03:00
Aaron Patterson
37a764b8e0 use a sized buffer to prevent the queue being too large 2012-08-08 17:41:50 -07:00
David Heinemeier Hansson
b540f4c1b8 Allow data attributes to be set as a first-level option for form_for, so you can write form_for @record, data: { behavior: 'autosave' } instead of form_for @record, html: { data: { behavior: 'autosave' } } *DHH* 2012-08-08 16:36:46 -05:00
David Heinemeier Hansson
4154bf012d Modernize the documentation for view caching somewhat 2012-08-08 11:25:22 -05:00
Rafael Mendonça França
5d1528740a Deprecate button_to_function and link_to_function helpers.
We recommend the use of Unobtrusive JavaScript instead. For example:

  link_to "Greeting", "#", :class => "nav_link"

  $(function() {
    $('.nav_link').click(function() {
      // Some complex code

      return false;
    });
  });

or

  link_to "Greeting", '#', onclick: "alert('Hello world!'); return false", class: "nav_link"

for simple cases.

This reverts commit 3acdd652e9fe99481c879c84c5807a84eb9ad724.
2012-08-07 20:57:42 -03:00
David Heinemeier Hansson
7dedfded4a Remove antiquated example code 2012-08-07 18:11:42 -05:00
David Heinemeier Hansson
42c308818b Remove outdated examples and feature highlights 2012-08-07 18:11:42 -05:00
David Heinemeier Hansson
666d3fd0c1 Revert "Merge pull request #7033 from kron4eg/master". Not a a fan at all of what this makes ERB files look like.
This reverts commit 46b8bceedd3e47169c50a04c93161424909c75fb, reversing
changes made to 2f58795e783150f2e1b1f6c64e305703f0061129.
2012-08-07 11:44:24 -05:00
Artiom Di
e82ffeaa0a Restoring the '%' trim mode for ERb templates, allowing for a leading percent sign on a line to indicate non-inserted Ruby code. 2012-08-07 12:37:56 +03:00
Prem Sichanugrist
0c4c7d94ed Rearrange example output of javascript_include_tag 2012-08-06 16:45:59 -04:00
Prem Sichanugrist
02c9654b9b Do not include application.js if it doesn't exists
Rails were including 'application.js' to the pack when using
`javascript_include_tag :all` even there's no application.js in the
public directory.
2012-08-06 16:45:10 -04:00
Rafael Mendonça França
5edfc46348 Don't use html_escape to test the escaping 2012-08-05 21:21:14 -03:00
Rafael Mendonça França
39f4f28993 Add CHANGELOG entry for 3c731a4ad62430100ba0b65bc966aa6dc6280c5f 2012-08-05 21:12:57 -03:00
Xavier Noria
447b6a4e67 removes usage of Object#in? from the code base (the method remains defined by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in

    5ea6b0df9a

we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.

In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
2012-08-06 00:30:02 +02:00
Andrew White
c5807728d5 Revert "polymorphic_url with an array generates a query string"
Passing options as the last value in an array doesn't work with form_for.
This reverts commit 61c8a4d926343903593a27080216af7e4ed81268.
2012-08-04 19:02:58 +01:00
Andrew White
4059423809 Revert "Refactor passing url options via array for polymorphic_url"
Passing options as the last value in an array doesn't work with form_for.
This reverts commit 6be564c7a087773cb0b51c54396cc190e4f5c983.
2012-08-04 19:02:57 +01:00
Bogdan Gusiev
9e03c6aab3 RouteSet: cleanup some unneeded compexity 2012-08-04 15:11:10 +03:00
Bogdan Gusiev
d89161e7cc Renamed _path_segments to _recall 2012-08-04 14:55:00 +03:00
Bogdan Gusiev
422b3d70d5 Simplify logical statement 2012-08-04 14:24:35 +03:00
Andrew White
067efad8af Merge branch 'polymorphic_url_builds_query_string_with_array' 2012-08-04 11:33:30 +01:00
Andrew White
6be564c7a0 Refactor passing url options via array for polymorphic_url
Rather than keep the url options in record_or_hash_or_array, extract it
and reverse merge with options as it may contain important private keys
like `:routing_type`.

Closes #7259
2012-08-04 11:24:53 +01:00
Vijay Dev
3d3fa165e4 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	activemodel/lib/active_model/secure_password.rb
	activerecord/lib/active_record/associations/collection_proxy.rb
2012-08-04 15:18:35 +05:30
Vijay Dev
b51201242a copy edits [ci skip] 2012-08-04 15:09:33 +05:30
Romain Tribes
61c8a4d926 polymorphic_url with an array generates a query string
Generating an URL with an array of records is now able to build a query
string if the last item of the array is a hash.
2012-08-04 10:04:05 +02:00
Santiago Pastorino
c8a613b978 Add test select_tag escapes prompt 2012-08-03 10:00:55 -03:00
Santiago Pastorino
8f8d8eb146 Use content_tag here instead of manually building HTML 2012-08-03 10:00:55 -03:00
Aaron Patterson
c391919180 make sure the body finishes rendering before checking response closure 2012-08-03 00:27:39 -04:00
Armand du Plessis
c62abed8ca Collapsed dual checks (one for content headers and one for content) into a single check.
Rails includes a single character body to a head(:no_content) response to work around an old Safari bug where headers were ignored if no body sent.

This patch brings the behavior slightly closer to spec if :no_content/204 is explicity requested via a head only response.

Status comparison done on symbolic and numeric values

Not returning any content when responding with head and limited to a status code that explicitly states no content will be returned - 100..199, 204, 205, 304.
2012-08-02 16:01:08 -07:00
Rafael Mendonça França
6e523766d8 Merge pull request #7240 from steveklabnik/fix_2301
Fix for digest authentication bug - issue #2301 in rails/rails
2012-08-02 13:50:54 -07:00
Steve Klabnik
6beaafd0c4 Changelog entry for Digest Auth fix (#2301) 2012-08-02 16:46:41 -04:00
Xavier Noria
077372b20d load active_support/deprecation in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
4aee8dd486 load active_support/core_ext/module/delegation in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
5e1b92044c load active_support/core_ext/class/attribute in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
64bc8447c2 load active_support/concern in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
47396a9db8 load active_support/dependencies/autoload in active_support/rails 2012-08-02 21:59:23 +02:00
Xavier Noria
5ea6b0df9a load active_support/core_ext/object/inclusion in active_support/rails 2012-08-02 21:59:22 +02:00
Xavier Noria
8f58d6e507 load active_support/core_ext/object/blank in active_support/rails 2012-08-02 21:59:22 +02:00
Xavier Noria
1a7b2e8fad defines a private require-hub active_support/rails
This is a private place to put those AS features that are used
by every component. Nowadays we cherry-pick individual files
wherever they are used, but that it is not worth the effort
for stuff that is going to be loaded for sure sooner or later,
like blank?, autoload, concern, etc.
2012-08-02 21:59:22 +02:00
José Valim
7a7ec74c1c Check validity of options[:as] just once 2012-08-02 21:49:31 +02:00
Arthur Smith
b3e2abc4b1 Fix for digest authentication bug - issue #2301 in rails/rails 2012-08-02 15:24:08 -04:00
kennyj
a8d68d89e3 Improve error handling when using partial name with hyphen. Fix #7079 2012-08-03 02:05:47 +09:00
Rafael Mendonça França
ddd804e818 Merge pull request #7204 from frodsan/update_conventions
Follow code conventions in metal/live
2012-07-31 18:40:10 -07:00
Santiago Pastorino
b6ab441772 html_escape should escape single quotes
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content
Closes #7215
2012-07-31 22:26:52 -03:00
Francesco Rodriguez
cbcfbdd078 fix punctuation in #resources and #match documentation [ci skip] 2012-07-31 14:16:46 -05:00