Re: [Rails] hash vs methods

2011-04-13 Thread Philip Hallstrom
> Hey all, > > Hash vs methods may seem like a silly question, but in certain > situations I don't understand why you would use a method over a hash. > For example, take a look at this method: > > #this is defined in a class called core.rb > def assign_attributes(attributes) > attributes.each_pa

[Rails] hash vs methods

2011-04-13 Thread John Merlino
Hey all, Hash vs methods may seem like a silly question, but in certain situations I don't understand why you would use a method over a hash. For example, take a look at this method: #this is defined in a class called core.rb def assign_attributes(attributes) attributes.each_pair { |k,v| send("