Skip to content

Instantly share code, notes, and snippets.

@threetreeslight
Created May 16, 2014 11:50
Show Gist options
  • Save threetreeslight/82f5d728adab88d82522 to your computer and use it in GitHub Desktop.
Save threetreeslight/82f5d728adab88d82522 to your computer and use it in GitHub Desktop.
Test of Controller

Test of Controller

GET

  • assing valiables
    • exist
    • not exist (if necessary or have possible)
  • render_template
    • assign valiable exist
    • not exist (if necessary or have possible)

POST

  • assing valiables (if necessary)
  • record commit
  • redirect_to
  • validation
  • re-render template (invalid access)

PATCH

  • assing valiables
  • all params update
  • validation
  • record update
  • redirect_to
  • re-render template (invalid access)

DELETE

  • assing valiables
  • record delete
  • redirect_to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment