Hi, I want to do a polymorphic association like that: class User has_many :my_posts, :as => :owner end class Post belongs_to, :owner, :polymorphic => true end meaning that I want to do: @user = User.new @user.my_posts (and that would return Post objects) also @post = Post.new @post.owner (this would return a User object) How can I do that? Thanks in advance. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Jan 27, 2012 at 11:44 AM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I want to do a polymorphic association like that: > > class User > has_many :my_posts, :as => :owner > end > > class Post > belongs_to, :owner, :polymorphic => true > end > > > meaning that I want to do: > @user = User.new > @user.my_posts (and that would return Post objects) > > also > @post = Post.new > @post.owner (this would return a User object) > > How can I do that?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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On Fri, Jan 27, 2012 at 11:52 AM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Fri, Jan 27, 2012 at 11:44 AM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hi, I want to do a polymorphic association like that:Try this railscast http://railscasts.com/episodes/154-polymorphic-association -- Greg Akins http://twitter.com/akinsgre -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I did, and it goes like: @commentable.comments but I want something like: @commentable.my_comments and not change the Comment model name On Fri, Jan 27, 2012 at 2:53 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Fri, Jan 27, 2012 at 11:52 AM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Fri, Jan 27, 2012 at 11:44 AM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > >> Hi, I want to do a polymorphic association like that: > > Try this railscast > http://railscasts.com/episodes/154-polymorphic-association > > > -- > Greg Akins > http://twitter.com/akinsgre > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I did, and it goes like: > > @commentable.comments > > but I want something like: > > @commentable.my_comments > > and not change the Comment model namedef my_comments return comments end -- Greg Akins http://twitter.com/akinsgre -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I want this because I''m going to have to has_many associations to comments (to follow to same example): class User has_many :my_comments has_many :comments_that_i_follow end On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > I did, and it goes like: > > > > @commentable.comments > > > > but I want something like: > > > > @commentable.my_comments > > > > and not change the Comment model name > > def my_comments > return comments > end > > -- > Greg Akins > http://twitter.com/akinsgre > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can use :class_name and :foreign_key if that''s what you''re looking for. Dheeraj Kumar On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote:> I want this because I''m going to have to has_many associations to comments (to follow to same example): > > class User > has_many :my_comments > has_many :comments_that_i_follow > end > > On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > > I did, and it goes like: > > > > > > @commentable.comments > > > > > > but I want something like: > > > > > > @commentable.my_comments > > > > > > and not change the Comment model name > > > > def my_comments > > return comments > > end > > > > -- > > Greg Akins > > http://twitter.com/akinsgre > > > > -- > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes, exactly! Does that :class_name works for has_many? I''ll try that now anyway. Thank you On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> You can use :class_name and :foreign_key if that''s what you''re looking for. > > > Dheeraj Kumar > > On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote: > > I want this because I''m going to have to has_many associations to comments > (to follow to same example): > > class User > has_many :my_comments > has_many :comments_that_i_follow > end > > On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > I did, and it goes like: > > > > @commentable.comments > > > > but I want something like: > > > > @commentable.my_comments > > > > and not change the Comment model name > > def my_comments > return comments > end > > -- > Greg Akins > http://twitter.com/akinsgre > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sure does :D Dheeraj Kumar On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote:> Yes, exactly! Does that :class_name works for has_many? > > I''ll try that now anyway. > > Thank you > > On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > You can use :class_name and :foreign_key if that''s what you''re looking for. > > > > > > Dheeraj Kumar > > > > > > On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote: > > > > > I want this because I''m going to have to has_many associations to comments (to follow to same example): > > > > > > class User > > > has_many :my_comments > > > has_many :comments_that_i_follow > > > end > > > > > > On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > > > On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org (mailto:rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org)> wrote: > > > > > I did, and it goes like: > > > > > > > > > > @commentable.comments > > > > > > > > > > but I want something like: > > > > > > > > > > @commentable.my_comments > > > > > > > > > > and not change the Comment model name > > > > > > > > def my_comments > > > > return comments > > > > end > > > > > > > > -- > > > > Greg Akins > > > > http://twitter.com/akinsgre > > > > > > > > -- > > > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > > > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > > > > > > -- > > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
That didn''t work. class Post belongs_to :owner, :polymorphic => true end class User has_many :my_posts, :class_name => ''Post'', :as => :owner end I can''t do: Post.first.owner or User.first.my_posts On Fri, Jan 27, 2012 at 3:25 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Sure does :D > > > Dheeraj Kumar > > On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote: > > Yes, exactly! Does that :class_name works for has_many? > > I''ll try that now anyway. > > Thank you > > On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > You can use :class_name and :foreign_key if that''s what you''re looking for. > > > Dheeraj Kumar > > On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote: > > I want this because I''m going to have to has_many associations to comments > (to follow to same example): > > class User > has_many :my_comments > has_many :comments_that_i_follow > end > > On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > I did, and it goes like: > > > > @commentable.comments > > > > but I want something like: > > > > @commentable.my_comments > > > > and not change the Comment model name > > def my_comments > return comments > end > > -- > Greg Akins > http://twitter.com/akinsgre > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You might want to take a look at the rails guides on active record associations http://guides.rubyonrails.org/association_basics.html 2012/1/27 Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> That didn''t work. > > class Post > belongs_to :owner, :polymorphic => true > end > > class User > has_many :my_posts, :class_name => ''Post'', :as => :owner > end > > I can''t do: Post.first.owner or User.first.my_posts > > > On Fri, Jan 27, 2012 at 3:25 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> Sure does :D >> >> >> Dheeraj Kumar >> >> On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote: >> >> Yes, exactly! Does that :class_name works for has_many? >> >> I''ll try that now anyway. >> >> Thank you >> >> On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> > wrote: >> >> You can use :class_name and :foreign_key if that''s what you''re looking >> for. >> >> >> Dheeraj Kumar >> >> On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote: >> >> I want this because I''m going to have to has_many associations to >> comments (to follow to same example): >> >> class User >> has_many :my_comments >> has_many :comments_that_i_follow >> end >> >> On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> wrote: >> > I did, and it goes like: >> > >> > @commentable.comments >> > >> > but I want something like: >> > >> > @commentable.my_comments >> > >> > and not change the Comment model name >> >> def my_comments >> return comments >> end >> >> -- >> Greg Akins >> http://twitter.com/akinsgre >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I did, also, it gives me the error: "SQLite3::SQLException: no such column: protests.owner_type:" On Fri, Jan 27, 2012 at 4:37 PM, Benjamin Iandavid Rodriguez < ian.rgz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You might want to take a look at the rails guides on active record > associations > > http://guides.rubyonrails.org/association_basics.html > > > 2012/1/27 Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> That didn''t work. >> >> class Post >> belongs_to :owner, :polymorphic => true >> end >> >> class User >> has_many :my_posts, :class_name => ''Post'', :as => :owner >> end >> >> I can''t do: Post.first.owner or User.first.my_posts >> >> >> On Fri, Jan 27, 2012 at 3:25 PM, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org >> > wrote: >> >>> Sure does :D >>> >>> >>> Dheeraj Kumar >>> >>> On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote: >>> >>> Yes, exactly! Does that :class_name works for has_many? >>> >>> I''ll try that now anyway. >>> >>> Thank you >>> >>> On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar < >>> a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>> You can use :class_name and :foreign_key if that''s what you''re looking >>> for. >>> >>> >>> Dheeraj Kumar >>> >>> On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote: >>> >>> I want this because I''m going to have to has_many associations to >>> comments (to follow to same example): >>> >>> class User >>> has_many :my_comments >>> has_many :comments_that_i_follow >>> end >>> >>> On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>> On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> wrote: >>> > I did, and it goes like: >>> > >>> > @commentable.comments >>> > >>> > but I want something like: >>> > >>> > @commentable.my_comments >>> > >>> > and not change the Comment model name >>> >>> def my_comments >>> return comments >>> end >>> >>> -- >>> Greg Akins >>> http://twitter.com/akinsgre >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hey, I just manage to do what I wanted, but I had to add a owner_type column on my Posts migration with the content: :owner_type => ''User'' Thanks for everyone, and is there a better way than saving another varchar(255) to my database? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I suggest you pick up a book and start following a tutorial. Otherwise you''ll spend most of your time here waiting for people to answer your questions. This becomes frustrating very quickly. Trust me, it may seem easier to come here and ask extremely simple questions (the answers of which are obvious in the docs) but it''s not. In the long term, you''ll be thankful you took the extra few minutes to read and understand the docs. The books are extremely helpful and will answer most of your basic questions. I started learning Ruby and RoR about two weeks ago, and I''m very glad I took the time to read through and complete a tutorial. Just visit amazon.com and type rails books and you''ll have a great selection to choose from. Also, try this, which I started with: http://ruby.railstutorial.org/chapters/static-pages --avoid the shortcuts and don''t rush. It pays off in the 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. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I read the Rails Tutorial book, but I does not teach anything related to customizing that much, thats why I''m constantly search google and asking questions here (when I don''t find it on google). I''m still searching google, but couldn''t find my answer for the current question. On Fri, Jan 27, 2012 at 5:50 PM, Mohamad El-Husseini <husseini.mel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I suggest you pick up a book and start following a tutorial. Otherwise > you''ll spend most of your time here waiting for people to answer your > questions. This becomes frustrating very quickly. > > Trust me, it may seem easier to come here and ask extremely simple > questions (the answers of which are obvious in the docs) but it''s not. In > the long term, you''ll be thankful you took the extra few minutes to read > and understand the docs. The books are extremely helpful and will answer > most of your basic questions. I started learning Ruby and RoR about two > weeks ago, and I''m very glad I took the time to read through and complete a > tutorial. > > Just visit amazon.com and type rails books and you''ll have a great > selection to choose from. Also, try this, which I started with: > http://ruby.railstutorial.org/chapters/static-pages --avoid the shortcuts > and don''t rush. It pays off in the 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. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Well, frankly, if I were you, I would read the documentation again. It doesn''t seem like you know what a polymorphic association is. You described a standard has_many relationship. Polymorphic association is when one model belongs to several different models. For example, to use the Rails casts episode, a comment can belong to a Photo, a Post, or a Product. From what you have written so far, it seems like you want a standard has_many and belongs_to association. User has_many :posts will let you do @user.posts, and a Post belongs_to :user will let you do post.user. If you want customize the name of the association, as in post.author, then I think you need to use the :class_name -- 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. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Could you recommend me a more complete book that I can read so I understand the basics? I really feel like I don''t right now. Thank you. On Fri, Jan 27, 2012 at 7:12 PM, Mohamad El-Husseini <husseini.mel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Well, frankly, if I were you, I would read the documentation again. It > doesn''t seem like you know what a polymorphic association is. You described > a standard has_many relationship. > > Polymorphic association is when one model belongs to several different > models. For example, to use the Rails casts episode, a comment can belong > to a Photo, a Post, or a Product. > > From what you have written so far, it seems like you want a standard > has_many and belongs_to association. > > User has_many :posts will let you do @user.posts, and a Post belongs_to > :user will let you do post.user. If you want customize the name of the > association, as in post.author, then I think you need to use the :class_name > > > > -- > 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. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 January 2012 21:18, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Could you recommend me a more complete book that I can read so I understand > the basics? > I really feel like I don''t right now.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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Don''t let that daunt you. I was in the same boat as you were not long ago. I''ll tell you what I did: Completed http://ruby.railstutorial.org/ -- twice! It does an awesome job of explaining things. Rails for Zombies I, a screen cast series on codeschool.com (I think--you''ll have to google it). Rails Casts Rails Guides I actually started with Programming Ruby 1.9, the Pragmatic Programmers Guide. I didn''t finish it. I read enough to get the basics of Ruby syntax. Knowing the Ruby syntax is essential since, to me, it looked nothing like anything I''ve seen before. Bracket were often omitted, and so were semi-colons, blocks, etc... understanding the syntax made understanding easier. After getting through 200 pages, I switched to Agile Web Development with Rails 4th Ed. Frankly, I thought it was a waste of money at that point. It just told you to do stuff without explaining much of what you were doing. Especially when it came to testing. I quit and switched to Rails Tutorial. I don''t think it''s beginner friendly.Rails Tutorial I thought was brilliant. But it was hard to follow because of some issues. There was no mention that Heroku did not support SQLite for example. But the book does an awesome job of explaining the basics. Read it carefully. And it''s free. I''m planning on Reading Rails AntiPatterns and The Rails 3 Way next... -- 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/-/3jADydlM6VYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 January 2012 21:26, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 27 January 2012 21:18, Rodrigo Ruiz <rodrigo.ruiz7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Could you recommend me a more complete book that I can read so I understand >> the basics? >> I really feel like I don''t right now. > > 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.When I say work through it I mean actually entering the code and getting it to work of course. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
When you say documentation you mean the Rails Guide? On Fri, Jan 27, 2012 at 7:37 PM, Mohamad El-Husseini <husseini.mel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I mean that, and any other material you are using to learn. Read it properly and understand it. If there''s something you don''t understand, ask away! -- 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/-/87wdgHfirskJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.