beautiful_scaffold 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -8,7 +8,7 @@ Demo : http://demo.beautiful-scaffold.com/
8
8
  == Install
9
9
 
10
10
  Add this in your Gemfile :
11
- gem 'beautiful_scaffold', '0.1.8'
11
+ gem 'beautiful_scaffold', '0.2.0'
12
12
  And run
13
13
  bundle install
14
14
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "beautiful_scaffold"
6
- s.version = "0.2.0"
6
+ s.version = "0.2.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.summary = "Beautiful Scaffold generate fully customizable scaffold"
9
9
  s.email = "claudel.sylvain@gmail.com"
@@ -16,8 +16,8 @@ class BeautifulJointableGenerator < Rails::Generators::Base
16
16
  # Generate migration
17
17
  migration_content_up = "
18
18
  create_table :#{sorted_model[0].pluralize}_#{sorted_model[1].pluralize}, :id => false do |t|
19
- t.integer :#{sorted_model[0]}
20
- t.integer :#{sorted_model[1]}
19
+ t.integer :#{sorted_model[0]}_id
20
+ t.integer :#{sorted_model[1]}_id
21
21
  end
22
22
 
23
23
  add_index :#{sorted_model[0].pluralize}_#{sorted_model[1].pluralize}, [:#{sorted_model[0]}, :#{sorted_model[1]}]
@@ -16,9 +16,12 @@
16
16
  <%= f.label plural_linked_model_name.to_sym, t(plural_linked_model_name.to_sym, :default => plural_linked_model_name.capitalize), :class => "control-label" %>
17
17
  <div class="controls">
18
18
  <ul id="<%= model_name %>_<%= linked_model_name %>_ids" name="<%= model_name %>[<%= linked_model_name %>_ids][]">
19
+ <% begin %>
19
20
  <% for elt in model_class.send(plural_linked_model_name) %>
20
21
  <li data-value="<%= elt.id %>"><%= elt.caption %></li>
21
22
  <% end %>
23
+ <% rescue %>
24
+ <% end %>
22
25
  </ul>
23
26
  </div>
24
27
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beautiful_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-24 00:00:00.000000000Z
12
+ date: 2012-08-29 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Beautiful Scaffold generate a complete scaffold (sort, export, paginate
15
15
  and filter data) http://www.beautiful-scaffold.com