Less generators with rails_admin gem
If you have a Rails application that has rails_admin
and you want to use less as the default generator for stylesheet, you'll need to add this hack since railsadmin forces you're app to use scss, even if you have ```config.appgenerators.stylesheet_engine :lessdeclared in your
config/application.rb```
module Less
module Rails
class Railtie
initializer 'less-rails.force-set-stylesheet_engine.after-setup_sass', after: :setup_sass, group: :all do |app|
config.app_generators.stylesheet_engine :less
end
end
end
end
Written by Adrian Peterson Co
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Filed Under
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#