On Jan 31, 12:29 am, "Ellicks M." <[email protected]> wrote:
>
> So, essentially on creation of a RollingEvent I'd be passing in a
> reference to the parent Event?

That is how things work in ruby

> Would I have to make a method for every single data member like so:
>
>   def amount
>     @parent_event.amount
>   end
>   def title
>     @parent_event.title
>   end
> end

You could just write @parent_event.amount each time, although there's
no harm in writing the above (You might also want to read up on
delegation)

Fred
>
> ??
>
> --
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to