On 6 April 2010 10:40, Gordon Yeong <anexi...@gmail.com> wrote:

> Cool but how abt accessing the models? Andy gave a solution but i want
> to see what others think
>

You should just be able to access the models normally (i.e. just use the
class, without needing to require anything) if you're using script/runner.

If you want to do it with a raw Ruby script (rather than using
script/runner), you'll have to include RubyGems, ActiveRecord and point
ActiveRecord at the database.yml section, load all the models found below
the specific part.

To be honest, it's much easier just to use script/runner.

Cheers,


Andy

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

Reply via email to