Posted By

jnunemaker on 09/07/06


Tagged

sql class object html method oop rails ruby button checkbox name methods Value radio pagination defaultoptions parameters helper checked classes


Versions (?)

Easy default options for methods in Ruby


 / Published in: Other
 

  1.  
  2. def my_method(opts={})
  3. {:arg_one => 'foo', :arg_two => 'two'}.merge(opts)
  4. end
  5.  

Report this snippet  

You need to login to post a comment.