Ruby on Rails Sunday, April 29, 2012

On Apr 27, 4:09 pm, masta Blasta <li...@ruby-forum.com> wrote:
> I'm considering making every little piece of editable content on my site
> a model with it's own table.
>
> So if you think of a blog post for example, the title, subject, body,
> whatever....would be a separate table. With the proper associations of
> course.
>
> The reason for this is to 1.) allow for special attributes to be
> assigned to each piece of content, 2.) to allow for each piece of
> content to be edited individually via ajax.
>
> You can think of it as making everything into a component/widget.

Without a better reason, I would advise against "making everything a
model". For small applications, I doubt you would see a noticeable
difference in speed of the db.
>
> My questions are:
> 1.) How much extra strain would this be on the database. So now instead
> of just fetching one row with the data, you would query each table
> association for the right info.
>
> 2.) Does anyone have any good examples/tutorials for turning every piece
> of content on your site into an ajax editable component?
>
> --
> Posted viahttp://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment