- 24 6月, 2012 3 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
- 23 6月, 2012 6 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Vijay Dev 提交于
-
- 22 6月, 2012 9 次提交
-
-
由 Maximilian Schneider 提交于
previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
- 16 6月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
-
由 Francesco Rodriguez 提交于
-
- 15 6月, 2012 1 次提交
-
-
由 MrBrdo 提交于
prevent users from unknowingly using bad regexps that can compromise security (http://homakov.blogspot.co.uk/2012/05/saferweb-injects-in-various-ruby.html)
-
- 12 6月, 2012 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 10 6月, 2012 1 次提交
-
-
由 Robb Kidd 提交于
* Moved the simplest case--enable/disable all on all--to the top. * Made clear what "ORM" means to avoid having to teach people how to solve "uninitialized constant ORM" errors in their test reports.
-
- 08 6月, 2012 1 次提交
-
-
由 Nikita Pomyashchiy 提交于
-
- 06 6月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
Changes: * Update `include_root_in_json` default value to false for default value to false for `ActiveModel::Serializers::JSON`. * Remove unnecessary change to include_root_in_json option in wrap_parameters template. * Update `as_json` documentation. * Fix JSONSerialization tests. Problem: It's confusing that AM serializers behave differently from AR, even when AR objects include AM serializers module. class User < ActiveRecord::Base; end class Person include ActiveModel::Model include ActiveModel::AttributeMethods include ActiveModel::Serializers::JSON attr_accessor :name, :age def attributes instance_values end end user.as_json => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true} # root is not included person.as_json => {"person"=>{"name"=>"Francesco", "age"=>22}} # root is included ActiveRecord::Base.include_root_in_json => false Person.include_root_in_json => true # different default values for include_root_in_json Proposal: Change the default value of AM serializers to false, update the misleading documentation and remove unnecessary change to false of include_root_in_json option with AR objects. class User < ActiveRecord::Base; end class Person include ActiveModel::Model include ActiveModel::AttributeMethods include ActiveModel::Serializers::JSON attr_accessor :name, :age def attributes instance_values end end user.as_json => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true} # root is not included person.as_json => {"name"=>"Francesco", "age"=>22} # root is not included ActiveRecord::Base.include_root_in_json => false Person.include_root_in_json => false # same behaviour, more consistent Fixes #6578.
-
- 31 5月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 28 5月, 2012 1 次提交
-
-
由 Steve Purcell 提交于
Passing a falsey option value for a validator currently causes that validator to be enabled, just like "true": ActiveModel.validates :foo, :presence => false This is rather counterintuitive, and makes it inconvenient to wrap `validates` in methods which may conditionally enable different validators. As an example, one is currently forced to write: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validations = { :presence => true, :slug => true } if options[:unique] validations[:uniqueness] = true end validates :slug, validations end because the following reasonable-looking alternative fails to work as expected: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validates :slug, :presence => true, :slug => true, :uniqueness => options[:unique] end (This commit includes a test, and all activemodel and activerecord tests pass as before.)
-
- 25 5月, 2012 1 次提交
-
-
由 Edward Tsech 提交于
-
- 24 5月, 2012 1 次提交
-
- 23 5月, 2012 1 次提交
-
-
由 Angelo capilleri 提交于
XmlMini define the xml 'datatime', but according to http://www.w3.org/TR/xmlschema-2/#dateTime could be better change this to 'dateTime' with upper case letter 'T. So 'DateTime' and 'Time' are redefined from 'datetime' to 'dateTime' add the changing to the changelog
-
- 22 5月, 2012 2 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
- 21 5月, 2012 1 次提交
-
-
由 Piotr Sarnacki 提交于
This reverts commit cae1ca7d, reversing changes made to da97cf01. These changes break the build, it needs more investigation.
-
- 20 5月, 2012 1 次提交
-
-
由 Henrik Hodne 提交于
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
-
- 18 5月, 2012 1 次提交
-
-
由 Oscar Del Ben 提交于
-
- 17 5月, 2012 1 次提交
-
-
由 Naoto Takai 提交于
-
- 16 5月, 2012 4 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-