Skip to content

Instantly share code, notes, and snippets.

@codespectator
Created August 31, 2012 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codespectator/3559798 to your computer and use it in GitHub Desktop.
Save codespectator/3559798 to your computer and use it in GitHub Desktop.
Headache with account id int
# I have this in my routes
scope ':account_ident' do
resources :things
end
# this scope is only active when a user is logged in and if possible I would like to append the account_ident automatically rather than having to do this in all the views:
link_to "A thing", thing_path(thing, :account_ident => current_account.account_number)
# or
form_for @thing, :uri => things_path(:account_ident => current_account.account_number) do #...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment