Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Added .nolayout
Browse files Browse the repository at this point in the history
Mime alias for html of nolayout
Added to pages only for now
  • Loading branch information
paradox460 committed Mar 11, 2013
1 parent 4036614 commit df216ce
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#
# Ignore bundler config
/.bundle
/tmp
# Ignore the default SQLite database.
/db/*.sqlite3
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
.ruby-version
# Ignore the default SQLite database.
# git config --global core.excludesfile ~/.gitignore_global
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Ignore all logfiles and tempfiles.
/log/*.log
# Ignore bundler config
snoonet.sublime-workspace
snoonet.sublime-project
# See http://help.github.com/ignore-files/ for more about ignoring files.
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# Ignore all logfiles and tempfiles.
snoonet.sublime-project
1 change: 1 addition & 0 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def show
respond_to do |format|
format.html # show.html.erb
format.json { render json: @page }
format.nolayout { render nolayout: @page, layout: 'nolayout', template: 'pages/show.html' }
end
end
end
8 changes: 8 additions & 0 deletions app/views/layouts/nolayout.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
!!! 5
%html
%head
= stylesheet_link_tag 'application-screen', media: 'screen'
= javascript_include_tag 'application'
= google_webfonts_link_tag roboto: [100, 400, 500, 700, "italic", "bolditalic"]
%body
= yield
4 changes: 4 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Load the rails application
require File.expand_path('../application', __FILE__)

# Custom Mime types
# "Nolayout" for HTML without layout
Mime::Type.register_alias "text/html", :nolayout

# Initialize the rails application
Snoonet::Application.initialize!

0 comments on commit df216ce

Please sign in to comment.