Skip to content

Commit

Permalink
Merge pull request activeadmin#1056 from marcusmateus/helpers_on_prec…
Browse files Browse the repository at this point in the history
…ompile

Fix for activeadmin#474: Loads AA SASS helpers in railtie to enable precompile w/o initialization
  • Loading branch information
gregbell committed Feb 21, 2012
2 parents 838b568 + 558a38b commit 91afd09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion lib/active_admin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
require 'sass'
require 'inherited_resources'
require 'jquery-rails'
require 'active_admin/dependency_checker'
require 'active_admin/sass/helpers'
require 'active_admin/arbre'
require 'active_admin/engine'

Expand All @@ -21,7 +23,6 @@ module ActiveAdmin
autoload :ControllerAction, 'active_admin/controller_action'
autoload :CSVBuilder, 'active_admin/csv_builder'
autoload :Dashboards, 'active_admin/dashboards'
autoload :DependencyChecker, 'active_admin/dependency_checker'
autoload :Deprecation, 'active_admin/deprecation'
autoload :Devise, 'active_admin/devise'
autoload :DSL, 'active_admin/dsl'
Expand Down
4 changes: 0 additions & 4 deletions lib/active_admin/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,6 @@ def attach_reloader
end

def generate_stylesheets
# This must be required after initialization
require 'sass/plugin'
require 'active_admin/sass/helpers'

# Create our own asset pipeline in Rails 3.0
if ActiveAdmin.use_asset_pipeline?
# Add our mixins to the load path for SASS
Expand Down
2 changes: 1 addition & 1 deletion lib/active_admin/dependency_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def meta_search_1_1?

def sass_rails_3_1?
require 'sass/rails/version'
Sass::Rails::VERSION >= "3.1"
::Sass::Rails::VERSION >= "3.1"
rescue LoadError
false
end
Expand Down

0 comments on commit 91afd09

Please sign in to comment.