aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Don't allocate new strings in compiled attribute methods"David Heinemeier Hansson2012-10-312-39/+20
| | | | This reverts commit f1765019ce9b6292f2264b4601dad5daaffe3a89.
* No need for the debuggerDavid Heinemeier Hansson2012-10-311-1/+0
|
* Allow #permit to take its list of permitted parameters as an arrayDavid Heinemeier Hansson2012-10-312-1/+6
|
* Revert "if format is unknown NullMimeTypeObject is returned"Guillermo Iguaran2012-10-313-28/+2
| | | | This reverts commit a8560fa361958b33d76e4468eb5c07d82a20196e.
* Remove extre count, preheat already happens during setupCarlos Antonio da Silva2012-10-311-1/+0
|
* Merge pull request #8073 from alexisbernard/fix_find_in_batches_start_optionCarlos Antonio da Silva2012-10-313-2/+15
|\ | | | | Fix find_in_batches against string IDs when start option is not specified
| * Fix find_in_batches against string IDs when start option is not specified.Alexis Bernard2012-10-313-2/+15
|/
* Merge pull request #8084 from acapilleri/format_never_nilRafael Mendonça França2012-10-313-2/+28
|\ | | | | if format is unknown NullMimeTypeObject is returned
| * if format is unknown NullMimeTypeObject is returnedAngelo capilleri2012-10-313-2/+28
|/ | | | | | | | | | If a unknown format is passed in a request, the methods html?, xml?, json? ...etc Nil Exception. This patch add a class NullMimeTypeObject, that is returned when request.format is unknown and it responds false to the methods that ends with '?'. It refers to #7837, not fixes because it's not considered a improvement not a bug.
* Merge pull request #8078 from nikitug/serialized_attributes_before_type_castCarlos Antonio da Silva2012-10-313-3/+27
|\ | | | | Fix `attributes_before_type_cast` for serialized attributes.
| * Fix `attributes_before_type_cast` for serialised attributes.Nikita Afanasenko2012-10-313-3/+27
|/ | | | Public method `attributes_before_type_cast` used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like `read_attribute_before_type_cast` and returns unserialised values.
* Merge pull request #8074 from kennyj/fix_6951Rafael Mendonça França2012-10-303-6/+22
|\ | | | | Fix #6951. Use query cache/uncache, when using not only database.yml but also DATABASE_URL.
| * Fix #6951. Use query cache/uncache, when using not only database.yml but ↵kennyj2012-10-313-6/+22
|/ | | | also DATABASE_URL.
* Revert "Support `Mailer.deliver_foo(*args)` as a synonym for ↵Jon Leighton2012-10-303-15/+0
| | | | | | | | | | | | `Mailer.foo(*args).deliver`." This reverts commit 7e0cf563639bc7508da381b1b8321c7a89be1aa8. Conflicts: actionmailer/CHANGELOG.md See discussion at https://github.com/rails/rails/commit/7e0cf563639bc7508da381b1b8321c7a89be1aa8#commitcomment-2075489
* Revert "The debugger gem isn't compatible with 1.9.3-p286 yet. Omit it for now."Santiago Pastorino2012-10-301-1/+1
| | | | | This reverts commit 7b290ad13c294005db062e746f8b79c8a192e4fa. debugger gem is now working ok with p286
* Merge pull request #8072 from kennyj/remove_mattr_include_root_in_jsonCarlos Antonio da Silva2012-10-302-1/+16
|\ | | | | Allow include_root_in_json to be inheritable by using the class_attribute created by Active Model serialization module.
| * include_root_in_json allows inheritance.kennyj2012-10-312-1/+16
| |
* | Merge pull request #6107 from ↵Carlos Antonio da Silva2012-10-3037-56/+59
|\| | | | | | | | | gazay/make_caller_attribute_in_deprecation_optional Make callstack attribute optional in AS:Deprecation
| * Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-3037-56/+59
|/
* Remove not assigned variable warning from sqlite3 adapter testCarlos Antonio da Silva2012-10-291-1/+1
|
* Fix bug when Column is trying to type cast boolean values to integer.Rafael Mendonça França2012-10-292-6/+17
| | | | | | | | | | | This can occur if the user is using :integer columns to store boolean values. Now we are handling the boolean values but it still raises if the value can't type cast to integer and is not a boolean. See #7509. Fixes #8067. Conflicts: activerecord/CHANGELOG.md
* Merge pull request #8066 from cfabianski/AddTestForSerializationMethodCarlos Antonio da Silva2012-10-291-0/+9
|\ | | | | Add test for code change introduced in this commit f20032f
| * Add test for code change introduced in this commit f20032fCédric FABIANSKI2012-10-291-0/+9
|/
* Fix failing tests and use new hash style in deprecation messagesCarlos Antonio da Silva2012-10-296-28/+28
|
* Merge pull request #8063 from nikitug/deprecation_caller_contextCarlos Antonio da Silva2012-10-2927-55/+88
|\ | | | | Provide a call stack for deprecation warnings where needed.
| * Provide a call stack for deprecation warnings where needed.Nikita Afanasenko2012-10-2927-55/+88
| | | | | | | | It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
* | Fix deprecation message in test for Path#childrenCarlos Antonio da Silva2012-10-291-1/+1
|/
* Add test to deprecation of Path#childrenRafael Mendonça França2012-10-291-0/+6
|
* Merge pull request #7587 from elia/fix-too-eager-loadingRafael Mendonça França2012-10-293-6/+17
| | | | | | Should not eager_load app/assets Conflicts: railties/CHANGELOG.md
* Merge pull request #8027 from daenney/masterXavier Noria2012-10-293-3/+12
|\ | | | | Atomic.rb assumes it may chown/chmod a file but doesn't handle the EPERM error.
| * atomicc.rb: Don't assume we may chown/chmod a file.Daniele Sluijters2012-10-293-3/+12
|/ | | | | | | | | | | | | | | | | | | | | | Previously this code just assumed it is capable of changing the file ownership, both user and group. This will fail in a lot of scenario's unless: * The process is run as a superuser (root); * The owning user and group are already set to the user and group we're trying to chown to; * The user chown'ing only changes the group to another group it is a member of. If either of those conditions are not met the filesystem will simply deny the operation throwing an error. It is also not always possible to do a chmod, there might be a SELinux policy or another limitation preventing the user to change the file mode. To this end the chmod call has also been added to the rescue block. I've also added a little comment above the chmod command that doing a chmod on a file which has an ACL set will cause the ACL to be recalculated / modified.
* Fix the skip code.Rafael Mendonça França2012-10-281-4/+4
| | | | Checking for the constant doesn't work
* Merge pull request #8057 from frodsan/fix_sqlite_mutate_argRafael Mendonça França2012-10-282-1/+7
|\ | | | | SQLite3Adapter#type_cast should not mutate arguments
| * SQLite3Adapter#type_cast should not mutate argumentsStefan Rusterholz2012-10-282-1/+7
|/
* Merge pull request #7750 from xuanxu/none_modificating_relation_in_placeRafael Mendonça França2012-10-284-0/+25
|\ | | | | Added ActiveRecord::Relation#none! method
| * ActiveRecord::Relation#none! method.Juanjo Bazán2012-10-283-0/+16
| |
| * loaded relations cannot be mutated by extending!Juanjo Bazán2012-10-281-0/+9
|/
* Merge pull request #8053 from henrik/update_columns_with_primary_keyCarlos Antonio da Silva2012-10-283-1/+20
|\ | | | | Unbreak update_column/update_columns for the primary key attribute.
| * Enable update_column(s) for the primary key attribute.Henrik N2012-10-283-1/+20
|/ | | | Didn't work before because it updated the model-in-memory first, so the DB query couldn't find the record.
* Merge pull request #8046 from pmahoney/exceptions_as_flow_controlRafael Mendonça França2012-10-281-2/+2
|\ | | | | Replace flow-control exception with explicit test.
| * Replace flow-control exception with explicit test.Patrick Mahoney2012-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | It was noticed while profiling 'assets:precompile' in JRuby that exception creation was consuming a large portion of time, and some of that was due to File.atomic_write. Testing first with File.exists? eliminates the need for an exception which should be a perfomrance improvement on both JRuby and MRI. In this case, the stat() isn't even extra overhead, since it is always called.
* | Merge pull request #8048 from senny/7761_dont_render_view_without_mail_callRafael Mendonça França2012-10-285-1/+28
|\ \ | | | | | | Do not render views when mail() isn't called. (NullMail refactoring)
| * | Do not render views when mail() isn't called. (NullMail refactoring)Yves Senn2012-10-285-1/+28
| |/
* | Merge pull request #8047 from arunagw/json_only_in_18Carlos Antonio da Silva2012-10-281-1/+0
| | | | | | | | Removing JSON for other ruby
* | Fix some assert_raise calls containing messages in Active SupportCarlos Antonio da Silva2012-10-282-7/+15
| |
* | Merge pull request #8054 from ↵Carlos Antonio da Silva2012-10-285-6/+45
|\ \ | | | | | | | | | | | | senny/6378_create_table_raises_when_defining_pk_column create_table raises an ArgumentError when the primary key is redefined.
| * | raise `ArgumentError` when redefining the primary key column. Closes #6378Yves Senn2012-10-283-0/+34
| | |
| * | refactor `SQLite3Adapter#copy_table` to prevent primary key redefinitions. #6378Yves Senn2012-10-282-6/+11
|/ /
* | Merge pull request #8056 from frodsan/fix_issue_missing_attributeRafael Mendonça França2012-10-283-3/+38
|\ \ | | | | | | AR::AttributeMethods#[] raises AM::AttributeMissingError for missing attributes
| * | AR::AttributeMethods#[] raises AM::AttributeMissingError for missing attributes.Francesco Rodriguez2012-10-283-3/+38
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following behaviour: class Person < ActiveRecord::Base belongs_to :company end # Before: person = Person.select('id').first person[:name] # => nil person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => nil person.company # => nil # After: person = Person.select('id').first person[:name] # => ActiveModel::MissingAttributeError: missing_attribute: name person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => ActiveModel::MissingAttributeError: missing_attribute: company_id person.company # => ActiveModel::MissingAttributeError: missing_attribute: company_id Fixes #5433.