Created
May 13, 2016 10:00
-
-
Save Ziaw/d768ceea44474c6ebf256bfc56c68600 to your computer and use it in GitHub Desktop.
custom scaffold slim views rails initializer file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Rails.env.development? | |
# copy templates from slim-rails to lib/generators/slim/scaffold/templates and customize | |
module App | |
class Application < ::Rails::Application | |
generators do | |
require 'generators/slim/scaffold/scaffold_generator' | |
Slim::Generators::ScaffoldGenerator.class_eval do | |
source_root File.expand_path('../../../lib/generators/slim/scaffold/templates', __FILE__) | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
change App to real app name