Aren't you running any tests?  You can even try the code in a ruby 
program (although rails sometimes adds capabilities that aren't present 
in ruby):

@year = 6

datetime = Time.now
datetime.year = @year

--output:--

ruby.rb:4:in `<main>': undefined method `year=' for 2011-07-26 17:22:19 
-0700:Time (NoMethodError)

-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to