OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test sb extend data
[pettanr/pettanr.git]
/
lib
/
validators
/
boost_validator.rb
diff --git
a/lib/validators/boost_validator.rb
b/lib/validators/boost_validator.rb
index
63ad5af
..
530e282
100644
(file)
--- a/
lib/validators/boost_validator.rb
+++ b/
lib/validators/boost_validator.rb
@@
-1,6
+1,6
@@
class BoostValidator < ActiveModel::EachValidator
\r
def validate_each(record, attribute, value)
\r
class BoostValidator < ActiveModel::EachValidator
\r
def validate_each(record, attribute, value)
\r
- rec = record.boosters[options[:
resource
_name].to_s].extend_item
\r
+ rec = record.boosters[options[:
boost
_name].to_s].extend_item
\r
msg = options[:message] || I18n.t('activerecord.errors.messages.extend_settings')
\r
record.errors[attribute] << msg unless rec.valid?
\r
end
\r
msg = options[:message] || I18n.t('activerecord.errors.messages.extend_settings')
\r
record.errors[attribute] << msg unless rec.valid?
\r
end
\r