Created
March 21, 2009 17:36
-
-
Save seivan/82912 to your computer and use it in GitHub Desktop.
This file contains 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
#Why can't I have :new there as well? It works when I got the respond_to in def new, but when using before filter, I get | |
#Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id | |
before_filter :respond_to_id, :only => [:show, :new, :update] | |
def respond_to_id | |
respond_to do |format| | |
format.html | |
format.xml { render :xml => @blogpost } | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment