Skip to content

Instantly share code, notes, and snippets.

@mikekelly
Forked from alexslade/rails_responder.rb
Created June 18, 2014 17:21
Show Gist options
  • Save mikekelly/a7ce2ed97a291917daef to your computer and use it in GitHub Desktop.
Save mikekelly/a7ce2ed97a291917daef to your computer and use it in GitHub Desktop.

Revisions

  1. Alex Heeton created this gist Jun 18, 2014.
    8 changes: 8 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    def create
    card = current_user.credit_cards.create(card_params)
    if card.persisted?
    render :success
    else
    render :failure
    end
    end