# TzTime's tz\_time\_attributes throwing errors?

**URL:** <https://www.ruby-forum.com/t/tztimes-tz-time-attributes-throwing-errors/136475>\
**Category:** Rails\
**Created:** [May 2, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/tztimes-tz-time-attributes-throwing-errors/136475 "2008-05-02T13:56:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joergbattermann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/edb3f5/32.png) [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Post date:** [May 2, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/tztimes-tz-time-attributes-throwing-errors/136475/1 "2008-05-02T13:56:49Z")

</div>

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: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

---

<div class="post-metadata">

**Author:** ![joergbattermann](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/edb3f5/32.png) [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Post date:** [May 2, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/tztimes-tz-time-attributes-throwing-errors/136475/2 "2008-05-02T14:46:15Z")

</div>

I hope it can help you :

> **[Create Country List for Your Ruby on Rails Quickly](http://teapoci.blogspot.com/2008/04/create-country-list-for-your-ruby-on.html)**
>
> There's many sites that provide you country list in sql file, so you can import it to your database. I would like to introduce you ruby way ...

You should define method attribut in application helper.

reinhart
