Commit Graph

708 Commits

Author SHA1 Message Date
José Valim
d15069316f Merge pull request #2563 from bogdan/internal_validation
Implemented strict validation concept
2011-08-25 07:10:16 -07:00
Bogdan Gusiev
cbb147931b Typo fix 2011-08-25 16:43:43 +03:00
Aaron Patterson
09e2109686 bumping bcrypt-ruby requirement 2011-08-24 13:26:38 -07:00
Bogdan Gusiev
afe04da10b Add change log entry on strict validation 2011-08-24 10:26:18 +03:00
Xavier Noria
45f8ca54c9 Merge pull request #2653 from luckydev/ser-wrap
Missing require array/wrap in serialization
2011-08-23 04:05:34 -07:00
Anand
1be3442a0a added missing require array/wrap in serialization 2011-08-23 16:30:02 +05:30
Anand
56e32ad40f added more tests for only-include and except-include options in serialization 2011-08-23 16:03:58 +05:30
Bogdan Gusiev
8620bf90c5 Implemented strict validation concept
In order to deliver debug information to dev team
instead of display error message to end user
Implemented strict validation concept
that suppose to define validation that always raise exception when fails
2011-08-17 17:26:00 +03:00
Xavier Noria
0245792c83 Merge branch 'master' of github.com:lifo/docrails 2011-08-16 11:06:40 -07:00
Vijay Dev
b98d3ab6f5 fix misleading comment (originally made by Tate Johnson, we lost this commit while porting to the rails repo) 2011-08-14 19:29:35 +05:30
Xavier Noria
bf2b9d2de3 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	RELEASING_RAILS.rdoc
	actionpack/lib/sprockets/railtie.rb
	actionpack/test/template/sprockets_helper_test.rb
	activerecord/test/cases/calculations_test.rb
	railties/guides/source/3_1_release_notes.textile
	railties/guides/source/active_resource_basics.textile
	railties/guides/source/command_line.textile
2011-08-13 16:30:07 -07:00
Tate Johnson
239e615316 Fixed typo 2011-08-13 16:22:33 -07:00
Waynn Lue
2579d88405 capitalize RubyGems properl 2011-08-13 16:22:31 -07:00
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
Myron Marston
d3c15a1d31 Allow ActiveRecord observers to be disabled.
We have to use Observer#update rather than Observer#send since the enabled state is checked in #update before forwarding the method call on.
2011-08-12 20:48:44 -07:00
Rashmi Yadav
681d919e48 The trailing '/' isn't being picked up by Github anyway, and the link works as is. 2011-08-04 16:41:31 -07:00
José Valim
6b3af028ac Merge pull request #2385 from bogdan/test_default_sanitizer2
MassAssignmentProtection: consider 'id' insensetive in StrictSanitizer
2011-08-01 04:50:06 -07:00
José Valim
dc8773b19f Rename new method to_path to to_partial_path to avoid conflicts with File#to_path and similar. 2011-08-01 11:42:00 +02:00
Grant Hutchins
b407034c9d Give attribution to Peter Jaros for the patch we paired on. 2011-07-28 13:38:28 -03:00
Bogdan Gusiev
b93a918337 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-07-28 11:56:08 +03:00
José Valim
30dae273c8 Update CHANGELOG. 2011-07-28 10:05:17 +02:00
José Valim
dee8115539 Rename class method to_path to _to_path and make it explicit that it is an internal method. 2011-07-28 09:56:42 +02:00
José Valim
1b7db58a06 Merge pull request #2034 from Casecommons/to_path
Allow ActiveModel-compatible instances to define their own partial paths
2011-07-28 00:50:07 -07:00
Santiago Pastorino
fa2bfd832c Merge pull request #2305 from thedarkone/errors-include
Improve AM::Errors#include?
2011-07-27 09:44:15 -07:00
thedarkone
efe4cbe5f2 Handle the empty array correctly. 2011-07-27 18:07:47 +02:00
Grant Hutchins & Peter Jaros
bf812074fd Let ActiveModel instances define partial paths.
Deprecate ActiveModel::Name#partial_path. Now you
should call #to_path directly on ActiveModel
instances.
2011-07-25 16:05:24 -04: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