Hi all
I don’t like “www.mysite.xx/some_cool_controller”, I’d rather like to
have “www.mysite.xx/some-cool-controller”.
Is there an easy way to achieve this?
Thanks
Josh
Hi all
I don’t like “www.mysite.xx/some_cool_controller”, I’d rather like to
have “www.mysite.xx/some-cool-controller”.
Is there an easy way to achieve this?
Thanks
Josh
I don’t like “www.mysite.xx/some_cool_controller”, I’d rather like to
have “www.mysite.xx/some-cool-controller”.Is there an easy way to achieve this?
There’s not a magical plugin if that’s what you mean. I looked into it
once and you run into some problems with how Rails converts urls to
class
names.
Use named routes…
map.with_options :controller => ‘refer_a_friend’ do |r|
r.refer_a_friend ‘refer-a-friend’, :action => ‘index’
r.send_referrals ‘refer-a-friend/send-referrals’, :action =>
‘send_referrals’
r.referrals_sent ‘refer-a-friend/referrals-sent’, :action =>
‘referrals_sent’
end
etc…
Thanks, but that’s clearly too ugly to me.
Maybe there should be a configuration option to specify the placeholder?
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