After updating to 1.2.5, I am getting
: warning: Object#type is deprecated; use Object#class for this code
snippet
AuditTrail.create(:record_id => record.id, :record_type =>
record.type.name,
:event => event, :user_id
=>user, :name=>username)
Which part of the the above-mentioned code should I change in order to
remove the deprecation warning ?
Have isolated deprecation to :-
:record_type => record.type.name,
How to make this into Object#class syntax ?
:record_type => record.class.name,
> How to make this into Object#class syntax ?
>
> Just changing to class instead of type should work, according to the
> Ruby docs Object#type is a deprecated synonym for Object#class
>
> :record_type => record.class.name,
cch: This works !
Thanx to you and also Bill Pratt !