Skip to content

Instantly share code, notes, and snippets.

@marjinal1st
Created April 2, 2014 11:51
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 marjinal1st/9932617 to your computer and use it in GitHub Desktop.
Save marjinal1st/9932617 to your computer and use it in GitHub Desktop.
def setup_profile_routes
inject_into_file 'config/routes.rb', :after => "namespace :hq do\n" do <<-RUBY
# Routing for admin profile editing
match '/profile', to: 'profile#edit', via: :get
match '/profile', to: 'profile#update', via: [:patch, :put]
RUBY
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment