Closed krainboltgreene closed 12 years ago
Changing to this worked:
def create
@account = Account.new params[:account]
if @account.valid?
@account.save
render :create, status: :ok, formats: [:json]
else
render json: @account.errors, status: :conflict
end
end
Glad that worked for you. The whole formats: :json
does wonders. Closing issue.
Here's the relevant files:
And the error I get when it's time to render
create
:UPDATE: I see why 2 and 3 were happening, as I was providing an object instead of the action name.