Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 129 lines (79 sloc) 4.386 kB
db65421 @vijaydev changelog updates for Rails 4 [ci skip]
vijaydev authored
1 ## Rails 4.0.0 (unreleased) ##
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
22 * Added `ActiveModel::Errors#add_on_present` method. Adds error messages to
23 present attributes.
24
25 *Roberto Vasquez Angel*
db65421 @vijaydev changelog updates for Rails 4 [ci skip]
vijaydev authored
26
cf7ab60 @rmascarenhas Reset attributes should not report changes.
rmascarenhas authored
27 * `[attribute]_changed?` now returns `false` after a call to `reset_[attribute]!`
28
29 *Renato Mascarenhas*
30
ec17f0d @rafaelfranca Add CHANGELOG entries for the observes extraction
rafaelfranca authored
31 * Observers was extracted from Active Model as `rails-observers` gem.
32
33 *Rafael Mendonça França*
34
9504b44 @steveklabnik Specify type of singular association during serialization
steveklabnik authored
35 * Specify type of singular association during serialization *Steve Klabnik*
36
ea76e9a @xHire Length validation handles correctly nil. Fix #7180
xHire authored
37 * Fixed length validator to correctly handle nil values. Fixes #7180.
38
39 *Michal Zima*
40
22598ee @senny cleanup, removed dispensable `require` statements from `ActiveModel`
senny authored
41 * Removed dispensable `require` statements. Make sure to require `active_model` before requiring
42 individual parts of the framework.
43
44 *Yves Senn*
45
df9f9b7 @carlosantoniodasilva Convert changelogs to 1.9 hash style and fix some formatting [ci skip]
carlosantoniodasilva authored
46 * 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
47
48 *Brian Cardarella + Jeremy Kemper + Trevor Turk*
49
1f4c89f @guilleiguaran Update changelogs to add entries about strong_parameters integration
guilleiguaran authored
50 * Add `ActiveModel::ForbiddenAttributesProtection`, a simple module to
51 protect attributes from mass assignment when non-permitted attributes are passed.
52
53 *DHH + Guillermo Iguaran*
54
55 * `ActiveModel::MassAssignmentSecurity` has been extracted from Active Model and the
56 `protected_attributes` gem should be added to Gemfile in order to use
57 `attr_accessible` and `attr_protected` macros in your models.
58
59 *Guillermo Iguaran*
60
0180e09 @carlosantoniodasilva Update Active Model xml serialization test to reflect a change in bui…
carlosantoniodasilva authored
61 * Due to a change in builder, nil values and empty strings now generates
62 closed tags, so instead of this:
63
64 <pseudonyms nil=\"true\"></pseudonyms>
65
66 It generates this:
67
68 <pseudonyms nil=\"true\"/>
69
70 *Carlos Antonio da Silva*
71
2f3eb48 @sobrinho Accept a symbol for `:in` option on inclusion and exclusion validators
sobrinho authored
72 * Changed inclusion and exclusion validators to accept a symbol for `:in` option.
73
74 This allows to use dynamic inclusion/exclusion values using methods, besides the current lambda/proc support.
75
76 *Gabriel Sobrinho*
77
cfd7f4e @rafaelfranca Merge pull request #7024 from bogdan/strict_validation_custom_exception
rafaelfranca authored
78 * `AM::Validation#validates` ability to pass custom exception to `:strict` option.
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
ab11a27 change AMS::JSON.include_root_in_json default value to false
Francesco Rodriguez authored
89 * Changed `AM::Serializers::JSON.include_root_in_json' default value to false.
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
b3ccd7b @purcell Don't enable validations when passing false hash values to ActiveMode…
purcell authored
116 * Passing false hash values to `validates` will no longer enable the corresponding validators *Steve Purcell*
117
3a749a9 @bcardarella Reordered changelog entry
bcardarella authored
118 * `ConfirmationValidator` error messages will attach to `:#{attribute}_confirmation` instead of `attribute` *Brian Cardarella*
119
3b822e9 @guilleiguaran Add ActiveModel::Model, a mixin to make Ruby objects to work with AP …
guilleiguaran authored
120 * Added ActiveModel::Model, a mixin to make Ruby objects work with AP out of box *Guillermo Iguaran*
121
534dc4c @bogdan AM::Errors: allow :full_messages parameter for #as_json
bogdan authored
122 * `AM::Errors#to_json`: support `:full_messages` parameter *Bogdan Gusiev*
123
a17d047 @josevalim Trim down Active Model API by removing valid? and errors.full_messages
josevalim authored
124 * Trim down Active Model API by removing `valid?` and `errors.full_messages` *José Valim*
125
a774354 @mrbrdo add credit to committer of pull request #6569
mrbrdo authored
126 * When `^` or `$` are used in the regular expression provided to `validates_format_of` and the :multiline option is not set to true, an exception will be raised. This is to prevent security vulnerabilities when using `validates_format_of`. The problem is described in detail in the Rails security guide *Jan Berdajs + Egor Homakov*
bc7c0b5 @mrbrdo prevent users from unknowingly using bad regexps that can compromise …
mrbrdo authored
127
810a50d @fxn CHANGELOGs are now per branch
fxn authored
128 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.