Created
April 25, 2012 12:28
-
-
Save fellix/2489399 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
class SomethingController < ApplicationController | |
respond_to :html, :json | |
def show | |
@something = Something.find(params[:id]) | |
respond_with(@something) do |format| | |
format.html { render :layout => 'report' } | |
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
class SomethingController < ApplicationController | |
respond_to :html, :json | |
layout 'report' | |
def show | |
@something = Something.find(params[:id]) | |
respond_with(@something) | |
end | |
end |
vc não tinha dito isso antes :P
hahahaha!
por isso que estava dentro do def show
:P
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A segunda opção vai forçar o layout report em todas as actions, quero só no show :P