views:

23

answers:

1

say I have this on my routes.rb:

resources :accounts

which gives me, among other things:

new_account GET /account/new

I need to generate this (for example) "/account/new#test"

How do you pass the "#test" to new_account_path() ?

+2  A: 

This should do the trick:

new_account_path(:anchor => "test")
#/account/new#test
robertokl