Skip to content
Browse files

Upgraded HAML to 2.2.21 and tested that it works. Also removed incorr…

…ect indentation in application.html.haml

which was causing code to be incorrectly wrapped in <link> </link> tags which is bad html.
  • Loading branch information...
1 parent a5378ad commit f543f3c3ac498be4f5decef52842de74aadf3b5a Paul committed with Ryan Bigg Mar 14, 2010
Showing with 19 additions and 10 deletions.
  1. +7 −6 app/views/layouts/application.html.haml
  2. +1 −1 config/environment.rb
  3. +11 −3 vendor/plugins/haml/init.rb
View
13 app/views/layouts/application.html.haml
@@ -7,11 +7,12 @@
= t(:rBoard)
%link{:href => "#{ActionController::Base.relative_url_root}/themes/#{theme.name}/style.css", :rel => "stylesheet"}
= javascript_include_tag 'jquery'
- %script
- jQuery.noConflict();
- = javascript_include_tag :defaults
- = yield :feed
- = yield :head
+ %script
+ jQuery.noConflict();
+ = javascript_include_tag :defaults
+ = yield :feed
+ = yield :head
+
%body
.title-bar
= link_to theme_image_tag("logo.jpg"), forums_path
@@ -46,7 +47,7 @@
\:
= text_field_tag :search, params[:search]
.clear
- .content
+ .content
- unless flash[:notice].blank?
.flash#flash= flash[:notice]
.forums_container
View
2 config/environment.rb
@@ -38,7 +38,7 @@
config.gem 'chronic'
config.gem 'coderay'
config.gem 'dotiw'
- config.gem 'haml', :version => "2.2.8"
+ config.gem 'haml', :version => "2.2.21"
config.gem 'highline'
config.gem 'paperclip', :version => '2.3.1.1'
config.gem 'RedCloth'
View
14 vendor/plugins/haml/init.rb
@@ -1,8 +1,16 @@
begin
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
rescue LoadError
- require 'haml' # From gem
+ begin
+ require 'haml' # From gem
+ rescue LoadError => e
+ # gems:install may be run to install Haml with the skeleton plugin
+ # but not the gem itself installed.
+ # Don't die if this is the case.
+ raise e unless defined?(Rake) && Rake.application.top_level_tasks.include?('gems:install')
+ end
end
-# Load Haml and Sass
-Haml.init_rails(binding)
+# Load Haml and Sass.
+# Haml may be undefined if we're running gems:install.
+Haml.init_rails(binding) if defined?(Haml)

0 comments on commit f543f3c

Please sign in to comment.
Something went wrong with that request. Please try again.