It looks like you're describing a standard has_many relationship. Are
you implying that Post will be extended to be different classes?
--
Greg Akins
http://twitter.com/akinsgre
Try this railscast http://railscasts.com/episodes/154-polymorphic-association
@commentable.comments
@commentable.my_comments--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
def my_comments
return comments
end
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/SaT5HAQHi1EJ.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/hwFc1eURfFwJ.
When you say you have read the rails tutorial book is that the one
that goes with railstutorial.org? If so then reading it is not
enough. Work right through it doing all the examples and so on. Make
sure you understand every line of code. You may think that the
application it develops is not what you want but that does not matter,
it will show you a wide range of techniques. Make sure that you have
installed the version of rails that matches that used by any tutorial
you use.
Colin
When I say work through it I mean actually entering the code and
getting it to work of course.
Colin
I'll second what Colin said. I'll also emphasize the need to "hold your horses". There's nothing more frustrating than having to wade through a ton of stuff before you start building something. But it's absolutely worth it, and it will save you a ton of time in the long run.
If I had spent 10% of my time reading documentation, I would have saved the other 90% that I wasted editing lines of code, scanning hurriedly over tutorials, asking a ton of questions, etc... it really is true. It's frustrating at first, but it pays off and saves you a ton of time in the long term.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/gpfZEWYqkawJ.