…active_record/validations.rb:81: warning: Object#type is deprecated;
use Object#class
That piece of code is:
def add_on_blank(attributes, msg = @@default_error_messages[:blank])
for attr in [attributes].flatten
value = @base.respond_to?(attr.to_s) ? @base.send(attr.to_s) :
@base[attr.to_s] <<< line 81
add(attr, msg) if value.blank?
end
end
I don’t see what Ruby is complaining about. Anyone have any ideas?
just a guess, but have you given any of your models a “type” field in
the database? rails by default will think that your model is using
STI if you have a “type” field.
just a guess, but have you given any of your models a “type” field in
the database? rails by default will think that your model is using
STI if you have a “type” field.
Thanks but, no… I don’t see just a “type” field. I looked in my
migrate files and then I did a rake db:schema:dump and looked in the
dump file. I have things like “item_type” but not just “type”.
just a guess, but have you given any of your models a “type” field in
the database? rails by default will think that your model is using
STI if you have a “type” field.
Thanks but, no… I don’t see just a “type” field. I looked in my
migrate files and then I did a rake db:schema:dump and looked in the
dump file. I have things like “item_type” but not just “type”.
I’m using edge rails – if that matters.
I might have found it. I use to have a field “type” but I changed it.
But I goofed and did not change my “validates_presence_of :type”.