Skip to content

Instantly share code, notes, and snippets.

@WaYdotNET
Created September 7, 2011 14:26
Show Gist options
  • Save WaYdotNET/1200703 to your computer and use it in GitHub Desktop.
Save WaYdotNET/1200703 to your computer and use it in GitHub Desktop.
# check if exist real page !
if template_exists?(params[:id], "frontend", false)
render "frontend/#{params[:id]}" and return
end
@WaYdotNET
Copy link
Author

begin
  render :index, :layout_engine => :haml, :layout => :"application.html"
rescue Padrino::Rendering::TemplateNotFound
  render :template_error
rescue Errno::ENOENT
 render :file_not_found
end

i've found this solution...

@DAddYE
Copy link

DAddYE commented Sep 7, 2011

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