Re: [Rails] Re: hash vs methods

2011-04-14 Thread Phil Crissman
On Thu, Apr 14, 2011 at 10:09 AM, John Merlino wrote: > Thanks for responses. So it's possible to call include? on a method? > > dom_class.include?("sortable") > Well, you aren't calling include? on the method, per se... you're calling include? on _whatever thing the method is returning_. So, i

[Rails] Re: hash vs methods

2011-04-14 Thread John Merlino
Thanks for responses. So it's possible to call include? on a method? dom_class.include?("sortable") -- Posted via http://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 rubyonr

[Rails] Re: hash vs methods

2011-04-13 Thread Robert Walker
Philip Hallstrom wrote in post #992605: >> end > Using a method would let one override what happens when you assign to > that attribute.. say you need to do something magical with it... > validate it... convert it... set something else somewhere else... that > sort of thing... And, just as impor