aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/conversion.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] correct docs for conversionAditya Kapoor2014-06-111-5/+12
|
* Pass strings to demodulize methodCarlos Antonio da Silva2014-02-261-1/+1
| | | | | Goes along with fea1cdcff4d50d302d8e8532432c3ab107ff816d and 59ec4562a2e70df455b2e44a67c340fa5254e26e.
* pass the class name to `tableize`Aaron Patterson2014-02-261-1/+1
| | | | We should not rely on to_s to return the name of the class
* `#to_param` returns `nil` if `to_key` returns `nil`. Closes #11399.Yves Senn2014-02-041-1/+1
| | | | | | | | | | | | | | | | The documentation of `#to_key` (http://api.rubyonrails.org/classes/ActiveModel/Conversion.html#method-i-to_key) states that it returns `nil` if there are no key attributes. `to_param` needs to be aware of that fact and return `nil` as well. Previously it raised the following exception: ``` 1) Error: ConversionTest#test_to_param_returns_nil_if_to_key_is_nil: NoMethodError: undefined method `join' for nil:NilClass /Users/senny/Projects/rails/activemodel/lib/active_model/conversion.rb:65:in `to_param' /Users/senny/Projects/rails/activemodel/test/cases/conversion_test.rb:34:in `block in <class:ConversionTest>' ```
* Adding missing backslashes in active_model files so as to avoid unwanted ↵aditya-kapoor2013-12-271-1/+1
| | | | links in rdoc [ci skip]
* Spelling and Grammar checksAkshay Vishnoi2013-12-121-1/+1
|
* Revert "Merge pull request #13276 from aayushkhandelwal11/change_to_key"Rafael Mendonça França2013-12-111-1/+2
| | | | | | | This will call primary_key two times This reverts commit d0588a2e897d33c6c12e9fc5f8680328d37a26ca, reversing changes made to 87e1e86640fb8b5a260ff7c0044aaae58fff2bc4.
* removing multiple check conditions to single check conditionAayush khandelwal2013-12-111-2/+1
|
* Small TypoLebin Sebastian F2013-03-041-1/+1
|
* cleanup, removed dispensable `require` statements from `ActiveModel`Yves Senn2012-11-251-2/+0
|
* minor edits in AM documentation [ci skip]Francesco Rodriguez2012-10-211-1/+1
|
* load active_support/concern in active_support/railsXavier Noria2012-08-021-1/+0
|
* update ActiveModel::Conversion documentation [ci skip]Francesco Rodriguez2012-07-041-3/+15
|
* update ActiveModel::Errors documentation and minor fixes [ci skip]Francesco Rodriguez2012-06-221-1/+1
|
* update ActiveModel::Conversion documentation [ci skip]Francesco Rodriguez2012-06-221-8/+21
|
* Fix comments about to_partial_pathGrant Hutchins2012-03-101-2/+2
|
* Revert "Revert "More 1.9 way""Santiago Pastorino2012-01-061-4/+2
| | | | | Fixed failing tests This reverts commit 8350ce97f2065eed9638c595d3938a573d6fa343.
* Revert "More 1.9 way"Aaron Patterson2012-01-051-2/+4
| | | | This reverts commit 675094b2757cf90399dadca4489b1036810ae570.
* More 1.9 waySantiago Pastorino2012-01-051-4/+2
|
* Rename new method to_path to to_partial_path to avoid conflicts with ↵José Valim2011-08-011-5/+5
| | | | File#to_path and similar.
* Rename class method to_path to _to_path and make it explicit that it is an ↵José Valim2011-07-281-3/+5
| | | | internal method.
* Let ActiveModel instances define partial paths.Grant Hutchins & Peter Jaros2011-07-251-2/+24
| | | | | | Deprecate ActiveModel::Name#partial_path. Now you should call #to_path directly on ActiveModel instances.
* Improve doc styles for ActiveModel::ConversionSebastian Martinez2011-05-041-4/+4
|
* Remove Example headers. Code just flows with the text. 6ce844a3Paco Guzman2011-03-061-2/+0
|
* to_key should return all exists keys (if any exists), regardless if the ↵José Valim2010-08-151-3/+6
| | | | object is persisted or not. If you need it to reflect persistance, you should use to_param.
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-6/+6
| | | | 's/[ \t]*$//' -i {} \;)
* edit pass to apply API guideline wrt the use of "# =>" in example codeXavier Noria2010-07-301-3/+3
|
* Minor changes to callbacks and conversion API docs.Rizwan Reza2010-06-141-7/+11
|
* Fix spelling error in ActiveModel::Conversion docs. [#4826 state:resolved]Pavel Gorbokon2010-06-111-1/+1
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-6/+6
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Add to_key and to_param methods to ActiveModel::Conversion.José Valim2010-02-211-10/+35
|
* Merge docrailsPratik Naik2010-01-171-1/+12
|
* AMo conversion helperJoshua Peek2009-07-211-0/+8