Hello there,
I was wondering whether someone of you uses the tz_time_attributes
helper of Jamis Buck to fix date(time) attributes of your ActiveRecord
models?
When I use it in e.g. an event model (with starttime/endtime), I get
the following upon Event.inspect:
NameError: undefined local variable or method `attribute'' for
#<Class:
0x3b898ec>
from /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/
base.rb:1532:in `method_missing_without_paginate''
from /Users/joerg/Development/iw/vendor/plugins/will_paginate/lib/
will_paginate/finder.rb:164:in `method_missing''
from /Users/joerg/Development/iw/vendor/plugins/tztime/lib/
tz_time_helpers/active_record_methods.rb:23:in `tz_time_attributes''
from /Users/joerg/Development/iw/vendor/plugins/tztime/lib/
tz_time_helpers/active_record_methods.rb:11:in `class_eval''
from /Users/joerg/Development/iw/vendor/plugins/tztime/lib/
tz_time_helpers/active_record_methods.rb:11:in `tz_time_attributes''
from /Users/joerg/Development/iw/app/models/event.rb:51
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:203:in
`load_without_new_constant_marking''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:203:in `load_file''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:202:in `load_file''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:94:in `require_or_load''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:248:in `load_missing_constant''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:453:in `const_missing''
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:465:in `const_missing''
from (irb):1
Any ideas why this is happening? It traces back to the helper file in
the TzTime plugin, but then I am somewhat lust with my ruby-fu :-/
-J
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---