Module: ActiveAdmin::DependencyChecker
- Defined in:
- lib/active_admin/dependency_checker.rb
Class Method Summary collapse
Class Method Details
.check! ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/active_admin/dependency_checker.rb', line 6 def check! if rails_3_1? unless && sass_rails_3_1? warn "ActiveAdmin requires meta_search >= 1.1.0.pre and sass-rails ~> 3.1.0.rc to work with rails >= 3.1.0" end end end |
.meta_search_1_1? ⇒ Boolean
18 19 20 |
# File 'lib/active_admin/dependency_checker.rb', line 18 def Gem.loaded_specs['meta_search'].version.to_s >= "1.1" end |
.rails_3_1? ⇒ Boolean
14 15 16 |
# File 'lib/active_admin/dependency_checker.rb', line 14 def rails_3_1? Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR >= 1 end |
.sass_rails_3_1? ⇒ Boolean
22 23 24 25 26 27 |
# File 'lib/active_admin/dependency_checker.rb', line 22 def sass_rails_3_1? require 'sass/rails/version' Sass::Rails::VERSION >= "3.1" rescue LoadError false end |