Skip to content

Commit

Permalink
add bootstrap alert
Browse files Browse the repository at this point in the history
  • Loading branch information
xdite committed Oct 8, 2012
1 parent 0e84284 commit aca43e5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions lib/bootstrapers/app_builder.rb
Expand Up @@ -49,6 +49,11 @@ def add_jquery_ui
"//= require jquery-ui\n", :before => '//= require_tree .'
end

def add_bootstrap_js
inject_into_file 'app/assets/javascripts/application.js',
"//= require twitter/bootstrap-alert\n", :before => '//= require_tree .'
end

def add_custom_gems
additions_path = find_in_source_paths 'Gemfile_additions'
new_gems = File.open(additions_path).read
Expand Down
13 changes: 8 additions & 5 deletions lib/bootstrapers/generators/app_generator.rb
Expand Up @@ -20,11 +20,11 @@ def bootstrapers_customization
invoke :create_common_partial
invoke :create_common_javascripts
invoke :create_common_stylesheets
invoke :add_jquery_ui
invoke :add_common_js_library
invoke :customize_gemfile
invoke :setup_database
invoke :configure_app
# invoke :create_initializers
# invoke :create_initializers
invoke :setup_stylesheets
invoke :remove_routes_comment_lines
invoke :setup_root_route
Expand Down Expand Up @@ -62,11 +62,14 @@ def create_common_stylesheets
build :create_common_stylesheets
end

def add_jquery_ui
say 'Add jQuery ui to the standard application.js'
def add_common_js_library
say 'Add add_common_js_library to the standard application.js'
build :add_jquery_ui
build :add_bootstrap_js
end



def customize_gemfile
build :add_custom_gems
build :add_devise_gem
Expand All @@ -93,7 +96,7 @@ def configure_app
def create_initializers
say 'create_initializers'
build :create_initializers
end
end

def setup_devise
build :generate_devise
Expand Down

0 comments on commit aca43e5

Please sign in to comment.