Can anyone please tell me which function in Rail that convert the class
name into the file name
like when we do ruby script/generate RubyOnRail
it generate the ruby_on_rail.rb controller
Thanks
Can anyone please tell me which function in Rail that convert the class
name into the file name
like when we do ruby script/generate RubyOnRail
it generate the ruby_on_rail.rb controller
Thanks
Can anyone please tell me which function in Rail that convert the class
name into the file name
This shoud do the trick:
classname = “foo”
filname = classname.underscore
tisp
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs