Created
October 29, 2011 22:22
-
-
Save trobrock/1325170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
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
I am seeing the same warning from similar code -- do you know how to fix it?