I have a model users.rb
class Users < ActiveRecord::Base
def self.setdot(dot)
end
end
In controller I call it:
user = Users.new
user = Users.setdot("sddf")
I get error:
undefined local variable or method `request'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in
`method_missing'
app/models/users.rb:5:in `setdot'
--
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
-~----------~----~----~----~------~----~------~--~---