- 12 9月, 2012 1 次提交
-
-
由 Nihad Abbasov 提交于
-
- 07 9月, 2012 1 次提交
-
-
由 Anatoly Makarevich 提交于
-
- 25 8月, 2012 1 次提交
-
-
由 Gabriel Sobrinho 提交于
-
- 06 8月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 03 8月, 2012 2 次提交
-
-
由 Angelo Capilleri 提交于
errors_options is calculated for every *CHECKS* but it could be calculated one time because options and RESERVED_OPTIONS not change during this cycle
-
由 Xavier Noria 提交于
-
- 30 7月, 2012 4 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
- 21 7月, 2012 3 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
`:within` option as alias of `:in` as documented. Fix #7118
-
- 10 7月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 06 7月, 2012 2 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
- 05 7月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 27 6月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
Since we're not directly requiring the reverse_merge extension, we can avoid another hash creation by using default_hash.merge! instead.
-
由 Carlos Antonio da Silva 提交于
There's no need to create two extra hashes with options.merge(another_hash), with the goal of setting only one value, so lets just set it. Also refactor validates_each to use _merge_attributes, like other validates_* helpers do.
-
- 26 6月, 2012 1 次提交
-
-
由 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 提交于
-
- 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.)
-
- 24 5月, 2012 1 次提交
-
- 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.
-
- 16 5月, 2012 4 次提交
-
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
由 Francesco Rodriguez 提交于
-
- 26 4月, 2012 1 次提交
-
-
由 Oscar Del Ben 提交于
-
- 24 4月, 2012 2 次提交
-
-
由 Brian Cardarella 提交于
-
由 Brian Cardarella 提交于
This will render the error message on :#{attribute}_confirmation instead of on attribute itself. When rendering confirmation errors inline on the form with form builders such as SimpleForm and Formtastic it is confusing to the ender user to see the confirmation error message on the attribute element. Instead it makes more sense to have this validation error render on the confirmation field instead. The i18n message has been updated for the confirmation validator error message to include the original attribute name.
-
- 15 4月, 2012 1 次提交
-
-
由 Jan Xie 提交于
-
- 29 3月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
Orginal code by @jamescook Closes #1352 [Rafael Mendonça França + James Cook]
-
- 22 2月, 2012 1 次提交
-
-
由 Benjamin Quorning 提交于
-
- 14 2月, 2012 1 次提交
-
-
由 Sergey Nartimov 提交于
-
- 06 2月, 2012 1 次提交
-
-
由 Niels Ganser 提交于
Allow infinite values for validates_length_of. Particularly useful for prettily defining an open ended range such as validates_length_of :human_stupidity, :within => 0..Float::INFINITY
-
- 03 2月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 02 2月, 2012 1 次提交
-
-
由 Vijay Dev 提交于
-
- 01 2月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-