Sunday, November 28, 2010

a complete way to use button_to_remote on ruby on rails

button_to_remote "text",
    {:url => { :controller => :controller,
      :action     => :action,
      :attrs => attrs   }},
    {:class => "css_class"}

Thursday, November 11, 2010

How to get the superclass of an object

I used to be able to call superclass directly, but not anymore, I don't know exactly with ruby version changed.   Now I need to make the call on from the class.

i.e.
obj.superclass <--  Not any more XXXXX

This is correct:
      obj.class.superclass

How to play with your rails environment for debugging

by running the script:
rails_project/script/console

You get all the rails project loaded and ready to play with all your models

Thursday, November 4, 2010