[Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread Jeff Miller
Wow, thanks for the responses everybody! I'll be working on this a little later today, I'll definitely try out your suggestions. Thanks!! - Jeff -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou

[Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread Arailsdemo A.
You should look into ActiveModel http://railscasts.com/episodes/219-active-model This will allow you to create model that has certain ActiveRecord like capabilities like validations without the need for a database. Look at the mail_form gem (https://github.com/plataformatec/mail_form/blob/master/

Re: [Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread Peter De Berdt
On 25 Feb 2011, at 10:27, Colin Law wrote: All the classes inside 'models' folder are considered as ActiveRecord classes and Rails will try to find a corresponding table in the database named as plural of the model. It's a convention; To bypass it and have a model independent from ActiveReco

Re: [Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread Julian Leviston
That's actually not true. If you don't specify them as active record base subclasses they'll be just regular ruby classes. Blog: http://random8.zenunit.com/ Twitter: http://twitter.com/random8r Learn: http://sensei.zenunit.com/ New video up now at http://sensei.zenunit.com/ real fastcgi rails de

Re: [Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread Colin Law
On 25 February 2011 08:12, Javix wrote: > All the classes inside 'models' folder are considered as ActiveRecord > classes and Rails will try to find a corresponding table in the > database named as plural of the model. It's a convention; To bypass it > and have a model independent from ActiveRecor

[Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread JB
Hi, Jeff! Chap #2 of this Crafting Rails Applications (http://www.pragprog.com/ titles/jvrails/crafting-rails-applications) might help... Regards, jb On Feb 25, 7:38 am, Jeff Miller wrote: > Hello everyone, >   I'm working on a Rails 3 social networking app (following RailsSpace > by Addison Wes

[Rails] Re: Rails 3 Model Without Database

2011-02-25 Thread Javix
All the classes inside 'models' folder are considered as ActiveRecord classes and Rails will try to find a corresponding table in the database named as plural of the model. It's a convention; To bypass it and have a model independent from ActiveRecord class, create it in 'lib' folder and require it