TzTime's tz_time_attributes throwing errors?

Hello there,

I was wondering whether someone of you uses the tz_time_attributes
helper of Jamis B. 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:inmethod_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:intz_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:intz_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:inload_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:inload_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:inload_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:inconst_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

I hope it can help you :

http://teapoci.blogspot.com/2008/04/create-country-list-for-your-ruby-on.html

You should define method attribut in application helper.

reinhart

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs