Commit Graph

27177 Commits

Author SHA1 Message Date
Michael Koziarski
ebc5a19ba2 Merge pull request #5278 from rafaelfranca/fix-build-3-2
[3-2-stable] Fix build
2012-03-04 18:04:47 -08:00
Rafael Mendonça França
2a6b7e5a0c Now all the models need to explicitly declare the accessible attributes 2012-03-04 22:37:16 -03:00
Rafael Mendonça França
f604a6368b Only add the whitelist_attributes option if ActiveRecord is present
Conflicts:

	railties/test/generators/app_generator_test.rb
	railties/test/isolation/abstract_unit.rb
2012-03-04 22:37:04 -03:00
Michael Koziarski
06a3a8a458 Whitelist all attribute assignment by default.
Change the default for newly generated applications to whitelist all attribute assignment.  Also update the generated model classes so users are reminded of the importance of attr_accessible.
2012-03-05 11:12:01 +13:00
Carlos Antonio da Silva
864d755177 Only run binary type cast test with encode! on Ruby 1.9 2012-03-04 16:35:35 +01:00
Lars Kanis
f6d478adcd fix associations when using per class databases
would get ConnectionNotEstablished error because it always tried to use
ActiveRecord::Base's connection, even though it should be using the connection
of the model whose context we're operating in
2012-03-04 16:16:07 +01:00
Vijay Dev
23ca13a877 CSS fix for guides. Closing #5028 [ci skip]
In Ubuntu Chrome, in the last lines of code blocks, the underscore isn't
visible. Increasing the line height slightly seems to fix this. This
problem doesn't exist in Firefox even on Ubuntu. Too lazy to test in
any other OS-browser combo :)
2012-03-03 23:49:37 +05:30
Santiago Pastorino
520571ac8a Turn off verbose mode of rack-cache, we still have X-Rack-Cache to check that info
Closes #5245
2012-03-03 00:29:02 -02:00
Aaron Patterson
af02291871 only log an error if there is a logger. fixes #5226
Conflicts:

	activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
2012-03-02 10:28:06 -08:00
Santiago Pastorino
8674823350 Add CHANGELOG entry 2012-03-02 14:34:23 -02:00
Carlos Antonio da Silva
5fd360133a Stop SafeBuffer#clone_empty from issuing warnings
Logic in clone_empty method was dealing with old @dirty variable, which
has changed by @html_safe in this commit:
139963c99a

This was issuing a "not initialized variable" warning - related to:
https://github.com/rails/rails/pull/5237

The logic applied by this method is already handled by the [] override,
so there is no need to reset the variable here.
2012-03-02 16:05:46 +01:00
Piotr Sarnacki
1a71e84ad8 Fix #5238, rendered_format is not set when template is not rendered 2012-03-02 12:50:36 -02:00
Xavier Noria
bbe7dac223 revert setting NOT NULL constraints in add_timestamps
Commit 3dbedd2 added NOT NULL constraints both to table
creation and modification. For creation the new default
makes sense, but the generic situation for changing a
table is that there exist records. Those records have
no creation or modification timestamps, and in the
general case you don't even know them, so when updating
a table these constraints are not going to work. See
a bug report for this use case in #3334.
2012-03-01 16:16:31 -08:00
Aaron Patterson
c2897901de Merge branch '3-2-2' into 3-2-stable
* 3-2-2:
  bumping to 3.2.2
  Ensure [] respects the status of the buffer.
  Merge pull request #4834 from sskirby/fix_usage_of_psql_in_db_test_prepare
  Merge pull request #5084 from johndouthat/patch-1
  updating RAILS_VERSION
  delete vulnerable AS::SafeBuffer#[]
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options
2012-03-01 09:51:51 -08:00
Aaron Patterson
01b470f526 bumping to 3.2.2 2012-03-01 09:16:28 -08:00
Aaron Patterson
c60c1c0812 Merge branch '3-2-stable-security' into 3-2-2
* 3-2-stable-security:
  Ensure [] respects the status of the buffer.
  delete vulnerable AS::SafeBuffer#[]
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options
2012-03-01 09:05:34 -08:00
José Valim
55ac1b9d88 Ensure [] respects the status of the buffer. 2012-02-29 16:13:29 -08:00
Aaron Patterson
5bb5780f7b Merge pull request #5206 from kennyj/fix_5173-32
[3-2-stable] Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931
2012-02-29 11:53:32 -08:00
kennyj
f1f2e8c80b Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931. 2012-02-29 01:23:37 +09:00
Aaron Patterson
72ae0b4b07 call binmode on the tempfile for Ruby 1.8 compatibility 2012-02-27 11:57:18 -08:00
Aaron Patterson
210c33f352 Merge pull request #5190 from rafaelfranca/fix-393-3-2-stable
[3-2-stable] Add a new line after the textarea opening tag.
2012-02-27 11:12:59 -08:00
Aaron Patterson
b543f8f88c Merge pull request #5179 from RalphShnelvar/Binary_mode_Window_bug
Binary mode window bug
2012-02-27 10:10:34 -08:00
Rafael Mendonça França
2b4e7a784e Add a new line after the textarea opening tag.
Closes #393
2012-02-27 13:57:32 -03:00
Rafael Mendonça França
663904f869 Revert "No need to pass options which is never used"
Options is needed for some Rails extensions to determine when
referential integrity should be disabled

This reverts commit bcb466c543.

Fixes #5052
2012-02-26 12:08:44 -08:00
Andrew White
b8c4f2d545 Adding tests for non-optional glob parameters 2012-02-26 00:21:08 +00:00
Ralph Shnelvar
06dc8ed289 Fixing Windows asset tag helper test failure
In asset_tag_helper_test.rb there is an assert on the number of bytes in a
concatenated file.  This test failed because Windows converts \n to \r\n as
the default for "w".  This is different than in *nix systems where there is
no conversion done.

THe test that failed was test_caching_stylesheet_link_tag_when_caching_on

Using bin mode fixes this behavior on windows and makes no change on the
*nix systems.
2012-02-25 15:35:29 -07:00
Justin Woodbridge
b229bc70e5 Fix typo in match :to docs 2012-02-25 21:54:59 +05:30
Noah Hendrix
e1f799a42f Fixed typo in composed_of example with Money#<=>, was comparing amount itself instead of other_money.amount 2012-02-25 21:54:38 +05:30
Santiago Pastorino
0a1357b6fb Merge pull request #5170 from arunagw/3-2-stable
assert => assert_equal
2012-02-25 07:45:45 -08:00
Arun Agrawal
a9b1397f5f assert => assert_equal 2012-02-25 21:11:01 +05:30
Xavier Noria
8125304f20 Merge pull request #5166 from arunagw/3-2-stable
3 2 stable
2012-02-25 04:42:22 -08:00
Arun Agrawal
0bfcd4ffff Checking headers in a better way. as doing here
406ece4729
2012-02-25 17:58:19 +05:30
Xavier Noria
5661dab5fe Merge pull request #5164 from arunagw/build_fix_ruby187-p358
Build fix ruby187 p358
2012-02-25 03:43:38 -08:00
Arun Agrawal
99fa8e5e94 Build fix for ruby187-p358 2012-02-25 17:02:48 +05:30
Aaron Patterson
ecff25cda6 Merge pull request #4834 from sskirby/fix_usage_of_psql_in_db_test_prepare
Fix usage of psql in db:test:prepare
2012-02-23 11:03:49 -08:00
Aaron Patterson
6dbf6f39f9 Merge pull request #4834 from sskirby/fix_usage_of_psql_in_db_test_prepare
Fix usage of psql in db:test:prepare
2012-02-23 11:00:09 -08:00
José Valim
419040f203 Avoid inspecting the whole route set, closes #1525 2012-02-23 12:50:49 +01:00
Aaron Patterson
c5c3274b65 Merge pull request #5087 from pwnall/no_view_logger
Remove reference to config.action_view.logger from Rails configuration guide
2012-02-22 15:59:23 -08:00
Aaron Patterson
93f1667e91 Merge pull request #5084 from johndouthat/patch-1
Remove reference to rails_legacy_mapper, which isn't compatible with 3.2...
2012-02-22 15:57:49 -08:00
Aaron Patterson
fadad9fcef Merge pull request #5084 from johndouthat/patch-1
Remove reference to rails_legacy_mapper, which isn't compatible with 3.2...
2012-02-22 15:57:43 -08:00
Aaron Patterson
4bcd437f76 updating RAILS_VERSION 2012-02-22 12:03:13 -08:00
Santiago Pastorino
82d6dedc7a Fix CHANGELOG 2012-02-22 12:30:35 -02:00
Santiago Pastorino
110b43c8a9 Add CHANGELOG entry 2012-02-22 12:25:38 -02:00
Santiago Pastorino
19433ce870 format lookup for partials is derived from the format in which the template is being rendered
Closes #5025 part 2
2012-02-22 11:13:02 -02:00
Aaron Patterson
35626feb61 bumping up arel 2012-02-21 16:13:56 -08:00
Aaron Patterson
83e42d52e3 prepared statements can be disabled 2012-02-21 16:09:01 -08:00
Aaron Patterson
a566ee5308 tag bind params with a bind param object 2012-02-21 15:46:18 -08:00
Aaron Patterson
c73f8833d5 more ruby 2.0 respond_to? changes 2012-02-21 11:37:12 -08:00
Aaron Patterson
0052d90f20 ruby 2.0 makes protected methods return false for respond_to, so pass true as the second param 2012-02-21 10:33:07 -08:00
Vijay Dev
cc848d6250 fix bad docs from f373f296 [ci skip] 2012-02-21 23:48:47 +05:30