views:

287

answers:

1

how can i get controller name out of the object if i don't know what is the object?

i am trying to do

object.class.tableize

but rails says

undefined method `tableize' for #<Class:0xb6f8ee20>

i tried adding demodulize with same result

thanks

+3  A: 
object.class.to_s.tableize
bensie