Created
July 15, 2011 15:59
-
-
Save ryanhanks/1084962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# routes.rb | |
resources :fidelity_bonds do | |
resources :edits | |
member do | |
get :edit_principal | |
end | |
end | |
# app/views/fidelity_bonds/edit_principal.html.haml | |
= simple_form_for @fidelity_bond, :url => fidelity_bond_edits_path(@fidelity_bond) do |f| | |
= f.input :principal_name | |
= f.input :principal_address1 | |
= f.submit :Update | |
# edits_controller.rb | |
class EditsController < ApplicationController | |
def create | |
p params | |
end | |
end | |
# When I submit the form rendered by /fidelity_bonds/2/edit_principal I see this in my logs: | |
# Started POST "/fidelity_bonds/2/edits" for 127.0.0.1 at Fri Jul 15 11:02:11 -0500 2011 | |
# ActionController::RoutingError (No route matches "/fidelity_bonds/2/edits"): | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment