Bogdan Gusiev
f86f770250
MassAssignmentProtection: consider 'id' insensetive in StrictSanitizer
...
In order to use StrictSanitizer in test mode
Consider :id as not sensetive attribute that can be filtered from
mass assignement without exception.
2011-08-13 16:22:26 -07:00
José Valim
b6b6e81a5c
Rename new method to_path to to_partial_path to avoid conflicts with File#to_path and similar.
2011-08-13 16:22:26 -07:00
Grant Hutchins
c4cf9073a1
Give attribution to Peter Jaros for the patch we paired on.
2011-08-13 16:22:23 -07:00
José Valim
66fdfbc2d5
Update CHANGELOG.
2011-08-13 16:22:21 -07:00
José Valim
91ca214ca0
Rename class method to_path to _to_path and make it explicit that it is an internal method.
2011-08-13 16:22:21 -07:00
Grant Hutchins & Peter Jaros
6e671a8536
Let ActiveModel instances define partial paths.
...
Deprecate ActiveModel::Name#partial_path. Now you
should call #to_path directly on ActiveModel
instances.
2011-08-13 16:22:21 -07:00
thedarkone
45f9c2b361
Handle the empty array correctly.
2011-08-13 16:22:20 -07:00
Rashmi Yadav
111347f0cc
The trailing '/' isn't being picked up by Github anyway, and the link works as is.
2011-08-13 16:22:15 -07:00
Ben Marini
c02288e6fd
Fix example code for #validates_with instance method
2011-07-24 12:13:23 -07:00
Xavier Noria
ace3723d2f
Merge branch 'master' of git://github.com/lifo/docrails
2011-07-23 12:15:41 +02:00
Vishnu Atrai
5801f42975
fixed type
2011-07-21 10:12:29 -07:00
Bratish Goswami
840ca47a46
Download and installation, License and Support sections added for activemodel
2011-07-21 13:03:45 +05:30
Sebastian Gassner
9714d866f5
Documentation fix: adding missing equal sign in code sample for ActiveModel::Dirty.
2011-07-20 10:31:57 +02:00
José Valim
da144894e9
Merge pull request #195 from bigfix/active_model_include_serialization
...
ActiveModel support for the :include serialization option
2011-07-18 06:50:43 -07:00
John Firebaugh
4860143ee4
ActiveModel support for the :include serialization option
...
This commit moves support for the :include serialization option for
serializing associated objects out of ActiveRecord in into ActiveModel.
The following methods support the :include option:
* serializable_hash
* to_json
* to_xml
Instances must respond to methods named by the values of the :includes
array (or keys of the :includes hash). If an association method returns
an object that is_a?(Enumerable) (which AR has_many associations do), it
is assumed to be a collection association, and its elements must respond
to :serializable_hash. Otherwise it must respond to :serializable_hash
itself.
While here, fix #858 , XmlSerializer should not singularize already
singular association names.
2011-07-17 11:34:07 -07:00
John Firebaugh
cbf924ef08
Replace map+compact with select
2011-07-17 11:34:06 -07:00
John Firebaugh
2a9a10f5e3
Add a test
2011-07-17 11:34:06 -07:00
John Firebaugh
da4e1faf6f
serializable_hash(:only => [], :methods => [:foo]) should work
2011-07-17 11:34:06 -07:00
Lawrence Pit
52a096275a
Made attribute_method_matchers_cache private + doc
2011-07-17 14:51:34 +10:00
Lawrence Pit
c3dd4c653d
Issue #2075 Optimization of ActiveModel's match_attribute_method?
2011-07-16 16:40:11 +10:00
Lawrence Pit
f04c5d640d
Optimization of ActiveModel's match_attribute_method?
2011-07-15 09:58:46 +10:00
Joe Fiorini
ac5e691153
Enable passing root: false to #to_json
2011-07-01 23:00:13 -04:00
Santiago Pastorino
35cdd256c0
Master version is 3.2.0.beta
2011-06-30 10:18:36 -03:00
Ian Stewart
eafa174bfd
changing an attribute multiple times retains the correct original value
2011-06-28 22:18:24 -07:00
Alexander Uvarov
e945497955
Minor formating fix
2011-06-24 03:52:39 +06:00
Alexander Uvarov
ee044ea547
Follow rails convention by using Array.wrap
2011-06-23 23:06:52 +06:00
Alexander Uvarov
528f405cdc
Allow to specify mass-assignment roles as array
2011-06-23 12:56:39 +06:00
Xavier Noria
146ec2d1df
Merge branch 'master' of git://github.com/lifo/docrails
2011-06-18 10:11:47 +02:00
Santiago Pastorino
5599e3fa0c
Merge pull request #1654 from ganeshkumar/test_cases
...
removed duplicate code in tests
2011-06-13 05:45:47 -07:00
Guillermo Iguaran
657ba2a9f0
Remove trailing whitespaces
2011-06-12 10:31:21 -05:00
ganesh
7c3094626d
removed duplicate code
2011-06-11 21:49:12 +05:30
José Valim
82568bedae
Update CHANGELOG.
2011-06-11 18:03:13 +02:00
José Valim
410a42860b
Get rid of the alternate namespace lookup.
2011-06-11 18:01:26 +02:00
thoefer
0831b7e076
Brought back alternative convention for namespaced models in i18n.
2011-06-08 13:40:17 +02:00
Xavier Noria
5e21247131
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
activerecord/RUNNING_UNIT_TESTS
2011-06-06 22:23:30 +02:00
Vijay Dev
82aedbb96d
fix incorrect output
2011-06-04 20:12:25 +05:30
Vijay Dev
ced2b25036
use clearer variable name in examples
2011-06-04 02:11:43 +05:30
Vijay Dev
caa8ab09f7
remove stray (
2011-06-03 14:25:13 +05:30
Ben Orenstein
8e071bc068
Change hashrocket spacing to match conventions.
2011-06-02 17:33:48 -04:00
Guillermo Iguaran
698b600719
Don't add .rb in requires
2011-05-31 21:43:04 -05:00
Damien Mathieu
70381cf507
no need for .rb
2011-05-31 23:38:51 +02:00
Damien Mathieu
bb828990bd
string inflections are needed for running tests in isolation
2011-05-31 23:38:39 +02:00
José Valim
12786518f1
Update CHANGELOG.
2011-05-31 12:26:32 +02:00
José Valim
139a9f7011
Transform the symbol into a constant lookup.
2011-05-31 12:24:30 +02:00
Bogdan Gusiev
aa2639e746
ActiveModel::MassAssignmentSecurity.mass_assignment_sanitizer method
...
In order to specify your own sanitize method
Implemented .mass_assignment_sanitizer configuration option
2011-05-30 11:34:00 +03:00
José Valim
0731945e74
Merge pull request #1334 from bogdan/callback
...
MassAssignmentSecurity: add ability to specify your own sanitizer
2011-05-26 11:47:35 -07:00
Bogdan Gusiev
c7567c9a6d
MassAssignmentSecurity: add ability to specify your own sanitizer
...
Added an ability to specify your own behavior on mass assingment
protection, controlled by option:
ActiveModel::MassAssignmentSecurity.mass_assignment_sanitizer
2011-05-26 15:58:43 +03:00
Xavier Noria
00e1d0832e
Merge branch 'master' of git://github.com/lifo/docrails
...
Conflicts:
actionmailer/lib/action_mailer/base.rb
activesupport/lib/active_support/core_ext/kernel/requires.rb
2011-05-25 22:48:47 +02:00
Vijay Dev
79e9a2983a
fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0
2011-05-24 23:39:24 +05:30
Sebastian Martinez
2a4b780ab1
Remove extra white spaces on ActiveModel docs.
2011-05-23 20:39:10 -03:00