Hi Steven,
I have not changed anything.
Here is the set_profile method as it currently stands:
def set_profile
@p = @u.profile if @u && @u.profile
Time.zone = @p.time_zone if @p && @p.time_zone
@p.update_attribute :last_activity_at, Time.now if @p
end
thank you for your help.
regards,
Lee Farrell
On Tue, Sep 8, 2009 at 9:52 PM, Steven Bristol<[email protected]> wrote:
>
> On Sun, Sep 6, 2009 at 7:37 PM, cipher_neo<[email protected]> wrote:
>>
>> Hi guys,
>>
>> now and again I get the following error in logs:
>>
>> ImmutableErrors::ImmutableAttributeError (id is immutable!):
>> /vendor/plugins/immutable_attributes/lib/immutable_attributes.rb:
>> 13:in `id='
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> transactions.rb:122:in `rollback_active_record_stat
>> e!'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> transactions.rb:106:in `save'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> validations.rb:932:in `update_attribute'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> associations/association_proxy.rb:173:in `send'
>> /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/
>> associations/association_proxy.rb:173:in `method_mi
>> ssing'
>> /app/controllers/application.rb:25:in `set_profile'
>>
>>
>> I have no idea why it crops up. There is no prior actions from users
>> to cause this. It seems to be something to do with caching? If anybody
>> could shed some light on this, it would be much appreciated.
>>
>
>
>
> Did you make any changes? Can you send me the lines around
> /app/controllers/application.rb:25:in `set_profile'?
>
>
> cheers,
> stevenbristol
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Lovd by Less" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lovdbyless?hl=en
Who loves ya baby?
-~----------~----~----~----~------~----~------~--~---