Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Ch.5 assigns[key] is used #58

Open
JunichiIto opened this issue May 3, 2015 · 0 comments
Open

Ch.5 assigns[key] is used #58

JunichiIto opened this issue May 3, 2015 · 0 comments

Comments

@JunichiIto
Copy link

contacts_controller_spec uses assigns[:contact]:

        it "redirects to contacts#show" do
          post :create,
            contact: attributes_for(:contact,
              phones_attributes: @phones)
          expect(response).to redirect_to contact_path(assigns[:contact])
        end

I did not know this also works, but it should be assigns(:contact) for consistency.

@JunichiIto JunichiIto changed the title Ch.5 assings[key] is used Ch.5 assigns[key] is used May 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant