Bryan Helmkamp
d988507dca
Fix Ruby warning: method redefined; discarding old breakpoint
2009-11-09 12:57:04 -05:00
Bryan Helmkamp
6fdd60e65c
Fix Ruby warning: instance variable @loaded not initialized
2009-11-09 12:57:04 -05:00
Bryan Helmkamp
1a93e93d1b
Fix some Ruby warnings: `*' interpreted as argument prefix
2009-11-09 12:57:04 -05:00
Chris Hapgood
d36f8a2bf2
Share ActionView::TestCase's output_buffer with view for concat support.
...
[#3467 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-07 00:15:11 +01:00
Chris Hapgood
df9a47e4b8
Make some assertions in the ActionView::TestCase tests actually do something.
...
[#3468 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-11-06 23:59:45 +01:00
Eloy Duran
6b2291f330
Define autosave association callbacks when using accepts_nested_attributes_for.
...
This way we don't define all the validation methods for all associations by
default, but only when needed.
[#3355 state:resolved]
2009-11-06 23:53:33 +01:00
Chris Hapgood
c3ef028b81
Fix OrderedHash#replace
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-11-05 21:16:06 +13:00
Matias Flores
4ae03b2d5a
Fix chars.reverse for multibyte decomposed strings
...
[#597 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-11-02 17:59:40 -08:00
José Valim
7ba80252a5
Make polymorphic_url work with symbols again and refactor it [ #1384 status:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-28 14:15:16 -05:00
José Valim
f5f7c40f3a
Fix nested attributes error messages which is broken in 2.3.4. It still copies the message from child to parent, but does the lookup in the child, not in the parent, avoiding error messages duplication (as happened in 2.3.3). [ #3147 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-28 13:44:24 -05:00
Yehuda Katz
fdf356d74b
Fixed HTTP digest to properly return 401 when the Authorization header has no nonce specified, or the Authorization header specifies Basic auth [ #2968 state:resolved]
2009-10-21 12:04:59 -07:00
Mike Gunderloy
9edfdef2a7
Fix bad assumption in BacktraceCleaner test [ #3249 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-10-18 17:23:28 -02:00
Travis Briggs
eb30c69544
Ensure number_to_human_size does not strip zeros from the end [ #1763 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-10-17 13:37:46 +13:00
Michael Koziarski
459749c30c
Backport the xss_safe? method for plugin authors targetting 2.3 and master
2009-10-15 17:19:24 +13:00
George Ogata
e10b0ddc7b
Make IntegrationTest::Runner propagate method_missing to ancestors.
...
Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-15 11:02:02 +13:00
Jeffrey Hardy
bbaf3a04f5
CookieJar#delete should return the key's value, consistent with a Hash
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-14 11:51:11 -07:00
Jeremy Kemper
7454d1874c
Mark html safety
2009-10-09 18:37:38 -07:00
Pratik Naik
c23706b787
Add a :limit option to specify the maximum number of records that can be processed by accepts_nested_attributes_for
...
Conflicts:
activerecord/lib/active_record/nested_attributes.rb
2009-10-09 16:11:22 +01:00
Pratik Naik
4010b49de8
Store entire options hash in the class var rather than just the reject_if proc for the nested attributes
...
Conflicts:
activerecord/lib/active_record/nested_attributes.rb
activerecord/test/cases/nested_attributes_test.rb
2009-10-09 15:47:31 +01:00
Pratik Naik
c47c5af1c8
Mute log info coming from the local_cache strategy
2009-10-09 15:12:01 +01:00
Pratik Naik
48b30608a4
Ensure MessageVerifier raises appropriate exception on tampered data
2009-10-09 02:26:37 +01:00
Michael Koziarski
95b7e4f7d7
field_error_proc needs to return a safe string
2009-10-08 14:02:12 +13:00
Michael Koziarski
80da8eb43d
Merge the prerequisites for on-by-default XSS escaping into rails.
...
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)
Note, this does *not* give you on-by-default XSS escaping in 2.3 applications. To get that you'll need to install a plugin:
http://github.com/nzkoz/rails_xss
2009-10-08 13:59:21 +13:00
Pratik Naik
a69316b293
Use indifferent access attributes instead of stringifying them
2009-10-08 00:14:52 +01:00
Pratik Naik
e2127991a1
Allow accepts_nested_attributes_for :reject_if option accept symbols for using a method
2009-10-07 23:45:40 +01:00
pivotal
6f2c4991ef
Explicitly require ActionController's CGI extensions so they're properly loaded before the first request.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-08 09:56:23 +13:00
Bryan Helmkamp
0f14d7b6d3
Only load rake tasks from tasks/**/*.rake and lib/tasks/**/*.rake in plugins
...
Previously, it was **/tasks/**/*.rake, and that loaded some paths that shouldn't be like:
* vendor/plugins/admin_assistant/test_rails_app/lib/tasks/rspec.rake
* vendor/plugins/will_paginate/test/tasks.rake
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-08 09:53:33 +13:00
Jesse Proudman
58f14438a9
Running rake dev leaves ERB in environment.rb. The existing Rake task was just copying the file across. This patch modifies the Rake task to use the same ERB processing string used on database.yml, which cleans up the environment.rb file.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2009-10-07 08:44:59 +13:00
Pratik Naik
91b61a8d16
Monkey patch Rack::Lint to allow string subclass body
2009-10-06 15:55:56 +01:00
Jeffrey Hardy
f98302e46b
MessageVerifier#verify raises InvalidSignature if the signature is blank
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-10-05 13:39:10 -07:00
Joshua Peek
11cce5bde9
Coerce all out going body parts to Strings
2009-10-05 14:21:57 -05:00
Bryan Helmkamp
1d7412b135
Reduce specificity of logging test to avoid dependency on the system clock
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-29 17:10:01 -07:00
Chad Woolley
1901747001
reduce max size of fixture IDs to fix sqlite2 tests, because sqlite2 was getting negative and changing values for ID field. See http://www.sqlite.org/datatypes.html
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-29 02:53:45 -07:00
Chad Woolley
f95a7f896e
make mysql and postgresql rebuild databases on every CI build, to prevent breakages such as collation and character set changing
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-09-27 21:57:41 -07:00
Yehuda Katz
26f22a28e9
Merge branch '2-3-stable' of git@github.com:rails/rails into 2-3-stable
2009-09-27 21:57:30 -07:00
John Trupiano
f489b3341c
Introduce :almost keyword for distance_of_time_in_words. Make 1.75 days - 2 days return '2 days'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3266 state:committed]
2009-09-28 14:56:19 +13:00
Jay Pignata
b372b4c875
Enhancing distance_of_time_in_words to prefix year output with over and about depending upon how many months have elapsed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3106 state:committed]
2009-09-28 14:56:14 +13:00
Luciano G Panaro
14a6794a8e
Make has_one with :conditions hash scope build or creation of the associated object with those conditions
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3088 state:committed]
2009-09-28 14:51:14 +13:00
Gaspard Bucher
8371d6f0c1
Fixes a bug where layouts provided with an absolute path would not be found because they were prefixed by 'layouts'. This bug only appears if the path does not contain the word 'layouts'.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3207 state:committed]
2009-09-28 14:40:21 +13:00
Chad Woolley
4a11ca1c7e
include nokogiri gem, so activesupport nokogiri tests run
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-26 12:23:18 -05:00
Eloy Duran
b18248ff05
The DomAssertions now also strip surrounding whitespace inside tags.
2009-09-25 17:46:21 +02:00
Eloy Duran
deac481eb7
Made assert_dom_equal and assert_dom_not_equal ignore meaningless whitespace.
...
Also changed message of assert_dom_equal to be like assert_equal.
2009-09-25 17:05:30 +02:00
Eloy Duran
cddd4746f9
Rewrote ActionView::TestCase.
...
The test case now mimicks the template environment more closely, so it's
possible to use render, load helper dependencies.
This also fixes assert_select, and similar assertions. Because view tests
and helpers generally don't render full templates assert_select looks
first in rendered and then in output_buffer to find the rendered output.
2009-09-25 15:51:27 +02:00
Manfred Stienstra
c680f2372e
Prefix Internet Explorer's accepted mime types with sensible defaults.
2009-09-25 15:47:33 +02:00
Michael Gunderloy
6222ac1a91
Fix variable error in Nokogiri XmlMini code [ #3242 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-09-22 00:23:59 +01:00
Aaron Patterson
e18752868a
making nokogiri to hash less clever, more fast O_o
...
[#2243 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 11:53:09 -07:00
Jeremy Kemper
1488c6cc9e
Fix brittle content-type check. [ #1956 state:committed]
2009-09-17 11:39:59 -07:00
Justin Bailey
4f5cac53b7
Enable use of MySQL stored procedures by default.
...
[#3204 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:59:41 -07:00
Developer
179b4512d1
Allow Nokogiri XmlMini backend to process cdata elements
...
[#3219 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-09-17 10:30:08 -07:00
Jeremy Kemper
ff0377dea5
Fix failing dependencies test relying on . being in LOAD_PATH
2009-09-13 05:44:16 -07:00