Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@ In Rails 3.0 and above, generators don’t just look in the source root for temp

Since Bootstrap Generators installs its templates under lib/templates, you can go and customize them.

## generator don't work?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with what configuration did the generator not work for you?


try to add below codes into config/application.rb

config.generators do |g|
g.template_engine :erb
end


## Credits

* [Twitter Bootstrap](http://getbootstrap.com)
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rm *.gem
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need this file, you just have to run rake build to build the gem. And you can find all the available tasks by running $ rake -T:

rake bootstrap:update  # Update to a new version of Twitter Bootstrap
rake build             # Build bootstrap-generators-3.3.1.gem into the pkg directory
rake install           # Build and install bootstrap-generators-3.3.1.gem into system gems
rake release           # Create tag v3.3.1 and build and push bootstrap-generators-3.3.1.gem to Rubygems
rake test              # Run tests

gem build bootstrap-generators.gemspec
2 changes: 1 addition & 1 deletion lib/bootstrap/generators/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Bootstrap
module Generators
VERSION = '3.1.1.3'
VERSION = '3.1.1.4'
end
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

<%%- model_class = <%= singular_table_name.to_s.titleize.split(" ").join.to_s.constantize %> %>
<div class="page-header">
<%%= link_to new_<%= singular_table_name %>_path, :class => 'btn btn-primary' do %>
<span class="glyphicon glyphicon-plus"></span>
Expand All @@ -11,7 +13,7 @@
<thead>
<tr>
<% attributes.each do |attribute| -%>
<th><%= attribute.human_name %></th>
<th><%%= model_class.human_attribute_name "<%= attribute.name.to_s %>" %></th>
<% end -%>
<th></th>
<th></th>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%%- model_class = <%= singular_table_name.to_s.titleize.split(" ").join.to_s.constantize %> %>
<div class="page-header">
<%%= link_to <%= index_helper %>_path, :class => 'btn btn-default' do %>
<span class="glyphicon glyphicon-list-alt"></span>
Expand All @@ -12,7 +13,8 @@

<dl class="dl-horizontal">
<%- attributes.each do |attribute| -%>
<dt><%= attribute.human_name %>:</dt>

<dt><%%= model_class.human_attribute_name "<%= attribute.name.to_s %>" %>:</dt>
<dd><%%= @<%= singular_table_name %>.<%= attribute.name %> %></dd>

<%- end -%>
Expand Down