Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 144 lines (89 sloc) 4.361 kb
c0bc9ce @dhh Preparing for 4.0.0.beta1 release
dhh authored
1 ## Rails 4.0.0.beta1 (February 25, 2013) ##
42b555d @carlosantoniodasilva Fix Action Mailer changelog indenation to match other changelogs
carlosantoniodasilva authored
2
d72a07f @robotex82 Add `ActiveModel::Validations::AbsenceValidator`, a validator to chec…
robotex82 authored
3 * Add `ActiveModel::Validations::AbsenceValidator`, a validator to check the
4 absence of attributes.
5
05b80a1 @carlosantoniodasilva Improve AMo changelog example to not rely on AR [ci skip]
carlosantoniodasilva authored
6 class Person
7 include ActiveModel::Validations
8
9 attr_accessor :first_name
d72a07f @robotex82 Add `ActiveModel::Validations::AbsenceValidator`, a validator to chec…
robotex82 authored
10 validates_absence_of :first_name
11 end
12
13 person = Person.new
14 person.first_name = "John"
15 person.valid?
05b80a1 @carlosantoniodasilva Improve AMo changelog example to not rely on AR [ci skip]
carlosantoniodasilva authored
16 # => false
17 person.errors.messages
18 # => {:first_name=>["must be blank"]}
d72a07f @robotex82 Add `ActiveModel::Validations::AbsenceValidator`, a validator to chec…
robotex82 authored
19
05b80a1 @carlosantoniodasilva Improve AMo changelog example to not rely on AR [ci skip]
carlosantoniodasilva authored
20 *Roberto Vasquez Angel*
d72a07f @robotex82 Add `ActiveModel::Validations::AbsenceValidator`, a validator to chec…
robotex82 authored
21
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
22 * `[attribute]_changed?` now returns `false` after a call to `reset_[attribute]!`.
cf7ab60 @rmascarenhas Reset attributes should not report changes.
rmascarenhas authored
23
24 *Renato Mascarenhas*
25
ec17f0d @rafaelfranca Add CHANGELOG entries for the observes extraction
rafaelfranca authored
26 * Observers was extracted from Active Model as `rails-observers` gem.
27
28 *Rafael Mendonça França*
29
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
30 * Specify type of singular association during serialization.
9504b44 @steveklabnik Specify type of singular association during serialization
steveklabnik authored
31
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
32 *Steve Klabnik*
33
34 * Fixed length validator to correctly handle `nil`. Fixes #7180.
ea76e9a @xHire Length validation handles correctly nil. Fix #7180
xHire authored
35
36 *Michal Zima*
37
22598ee @senny cleanup, removed dispensable `require` statements from `ActiveModel`
senny authored
38 * Removed dispensable `require` statements. Make sure to require `active_model` before requiring
39 individual parts of the framework.
40
41 *Yves Senn*
42
df9f9b7 @carlosantoniodasilva Convert changelogs to 1.9 hash style and fix some formatting [ci skip]
carlosantoniodasilva authored
43 * Use BCrypt's `MIN_COST` in the test environment for speedier tests when using `has_secure_pasword`.
06faa6d @trevorturk Use BCrypt's MIN_COST in the test environment for speedier tests
trevorturk authored
44
45 *Brian Cardarella + Jeremy Kemper + Trevor Turk*
46
1f4c89f @guilleiguaran Update changelogs to add entries about strong_parameters integration
guilleiguaran authored
47 * Add `ActiveModel::ForbiddenAttributesProtection`, a simple module to
48 protect attributes from mass assignment when non-permitted attributes are passed.
49
50 *DHH + Guillermo Iguaran*
51
52 * `ActiveModel::MassAssignmentSecurity` has been extracted from Active Model and the
53 `protected_attributes` gem should be added to Gemfile in order to use
54 `attr_accessible` and `attr_protected` macros in your models.
55
56 *Guillermo Iguaran*
57
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
58 * Due to a change in builder, `nil` and empty strings now generate
0180e09 @carlosantoniodasilva Update Active Model xml serialization test to reflect a change in bui…
carlosantoniodasilva authored
59 closed tags, so instead of this:
60
61 <pseudonyms nil=\"true\"></pseudonyms>
62
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
63 it generates this:
0180e09 @carlosantoniodasilva Update Active Model xml serialization test to reflect a change in bui…
carlosantoniodasilva authored
64
65 <pseudonyms nil=\"true\"/>
66
67 *Carlos Antonio da Silva*
68
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
69 * Inclusion/exclusion validators accept a method name passed as a symbol to the
70 `:in` option.
2f3eb48 @sobrinho Accept a symbol for `:in` option on inclusion and exclusion validators
sobrinho authored
71
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
72 This allows to use dynamic inclusion/exclusion values using methods, besides
73 the current lambda/proc support.
2f3eb48 @sobrinho Accept a symbol for `:in` option on inclusion and exclusion validators
sobrinho authored
74
75 *Gabriel Sobrinho*
76
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
77 * `ActiveModel::Validation#validates` ability to pass custom exception to the
78 `:strict` option.
cfd7f4e @rafaelfranca Merge pull request #7024 from bogdan/strict_validation_custom_exception
rafaelfranca authored
79
80 *Bogdan Gusiev*
81
82 * Changed `ActiveModel::Serializers::Xml::Serializer#add_associations` to by default
83 propagate `:skip_types, :dasherize, :camelize` keys to included associations.
84 It can be overriden on each association by explicitly specifying the option on one
85 or more associations
86
87 *Anthony Alberto*
78f5874 @anthonyalberto Following the false issue reporting I did here : https://github.com/r…
anthonyalberto authored
88
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
89 * Changed `ActiveModel::Serializers::JSON.include_root_in_json` default value to false.
ab11a27 @frodsan change AMS::JSON.include_root_in_json default value to false
frodsan authored
90 Now, AM Serializers and AR objects have the same default behaviour. Fixes #6578.
91
92 class User < ActiveRecord::Base; end
93
94 class Person
95 include ActiveModel::Model
96 include ActiveModel::AttributeMethods
97 include ActiveModel::Serializers::JSON
98
99 attr_accessor :name, :age
100
101 def attributes
102 instance_values
103 end
104 end
105
106 user.as_json
107 => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true}
108 # root is not included
109
110 person.as_json
111 => {"name"=>"Francesco", "age"=>22}
112 # root is not included
113
114 *Francesco Rodriguez*
115
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
116 * Passing false hash values to `validates` will no longer enable the corresponding validators.
117
118 *Steve Purcell*
119
120 * `ConfirmationValidator` error messages will attach to `:#{attribute}_confirmation` instead of `attribute`.
121
122 *Brian Cardarella*
123
124 * Added `ActiveModel::Model`, a mixin to make Ruby objects work with AP out of box.
b3ccd7b @purcell Don't enable validations when passing false hash values to ActiveMode…
purcell authored
125
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
126 *Guillermo Iguaran*
127
128 * `AM::Errors#to_json`: support `:full_messages` parameter.
129
130 *Bogdan Gusiev*
3a749a9 @bcardarella Reordered changelog entry
bcardarella authored
131
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
132 * Trim down Active Model API by removing `valid?` and `errors.full_messages`.
3b822e9 @guilleiguaran Add ActiveModel::Model, a mixin to make Ruby objects to work with AP …
guilleiguaran authored
133
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
134 *José Valim*
534dc4c @bogdan AM::Errors: allow :full_messages parameter for #as_json
bogdan authored
135
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
136 * When `^` or `$` are used in the regular expression provided to `validates_format_of`
137 and the `:multiline` option is not set to true, an exception will be raised. This is
138 to prevent security vulnerabilities when using `validates_format_of`. The problem is
139 described in detail in the Rails security guide.
a17d047 @josevalim Trim down Active Model API by removing valid? and errors.full_messages
josevalim authored
140
05857ec @fxn did a pass over the AM changelog [ci skip]
fxn authored
141 *Jan Berdajs + Egor Homakov*
bc7c0b5 @mrbrdo prevent users from unknowingly using bad regexps that can compromise …
mrbrdo authored
142
810a50d @fxn CHANGELOGs are now per branch
fxn authored
143 Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activemodel/CHANGELOG.md) for previous changes.
Something went wrong with that request. Please try again.