Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created October 29, 2011 22:22
Show Gist options
  • Save trobrock/1325170 to your computer and use it in GitHub Desktop.
Save trobrock/1325170 to your computer and use it in GitHub Desktop.
def create
@glitch = current_user.glitches.new(params[:glitch])
respond_to do |format|
if @glitch.save
UserMailer.glitch(@glitch).deliver
format.xml { render :xml => @glitch, :status => :created, :location => @glitch }
format.json { render :json => @glitch }
else
format.xml { render :xml => @glitch.errors, :status => :unprocessable_entity }
format.json { render :json => { :errors => @glitch.errors }, :status => :unprocessable_entity }
end
end
end
DEPRECATION WARNING: Setting a Proc or an object that responds to call in response_body is no longer supported. (called from realtime at /Users/trobrock/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/benchmark.rb:308)
@harrigan
Copy link

I am seeing the same warning from similar code -- do you know how to fix it?

@trobrock
Copy link
Author

I have not figured out a decent way of fixing this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment