Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Created January 13, 2012 19:03
Show Gist options
  • Save rodrigopinto/1608122 to your computer and use it in GitHub Desktop.
Save rodrigopinto/1608122 to your computer and use it in GitHub Desktop.
class OperationsController < ApplicationController
respond_to :json
def create
app = App.find_by_app_key!(params[:app_key]) #aqui retorna um 404
operation = app.new_operation(params[:operation])
operation.save
respond_with operation
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment