button_to_remote "text",
{:url => { :controller => :controller,
:action => :action,
:attrs => attrs }},
{:class => "css_class"}
Sunday, November 28, 2010
Friday, November 26, 2010
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
rails_project/script/console
You get all the rails project loaded and ready to play with all your models
Thursday, November 4, 2010
To manually run a migration or any method from rails project
script/console
require 'db/migrate/009_create_members.rb'
CreateMembers.down
require 'db/migrate/009_create_members.rb'
CreateMembers.down
Subscribe to:
Posts (Atom)