hello
is it possible to access methods I add to my models from a rake task? adding "=> :environment" seem to enable only the methods defined in ActiveRecord::Base. Calling other methods results in: undefined method `mehodname' for ModelName
hello
is it possible to access methods I add to my models from a rake task? adding "=> :environment" seem to enable only the methods defined in ActiveRecord::Base. Calling other methods results in: undefined method `mehodname' for ModelName
There's probably something else going on.
To quote: http://www.railsenvy.com/2007/6/11/ruby-on-rails-rake-tutorial#rails_models
Can you access your models in a rake task? Very Yes!
Are you mixing up class and instance methods?
-Danimal
you were right, I am new to ruby so I was not correctly declaring methods thanks for pointing me to class and instance methods that knowledge seemed to do the trick