Guest User

Untitled

a guest
May 28th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def render_template(name, default = nil)
  2. layout_path = "../templates/#{request.domain}/layout.html"
  3. render :template => "templates/#{request.domain}/page_#{name}", :layout => layout_path
  4. rescue TemplateNotFound
  5. render :template => "templates/#{request.domain}/#{default}", :layout => layout_path
  6. end
Add Comment
Please, Sign In to add comment