Re: [Rails] What if you don't want your model to be from Active Record?
On Sat, Oct 12, 2013 at 5:06 PM, Peter <peter@poproj.com> wrote:
> What if you don't want your model to be tied to a database therefore not
> ActiveRecord, where do you put that model instead?
In models, because nobody said models had to be ActiveRecord because
models define behaviors but if you want the Railism that "models
should be ActiveRecord" kicked out of your models you should upgrade
to Rails 4 where now you can have ActiveRecord::Base and
ActiveModel::Model.
> I want to write a class that would wrap together the various functions from,
> let's say, the AWS API. Would I write that class and place it in the models
> directory? Or should I place it elsewhere? Thank you.
It depends on what you mean but "wrap together various functions".
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnwfmV9k2SpbkivirKSYf0ScCZF%2Bv8A4FwLQC732Y8aDdw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home