14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/generators/happy_seed/simple_cms/simple_cms_generator.rb', line 14
def install_simple_cms
return if already_installed
require_generator AdminGenerator
require_generator SplashGenerator
migration_template("create_simple_contents.rb", "db/migrate/create_simple_contents.rb" )
begin
inject_into_file "app/helpers/application_helper.rb", File.read( find_in_source_paths( "application_helper.rb" ) ), before: /\nend/
rescue
say_status :application_helper, "Unable to add helper to app/helpers/application_helper.rb", :red
end
route "get '/faq' => 'simple_content#faq'"
remove_file 'app/views/splash/index.html.haml'
directory "app"
directory "docs"
end
|