beautiful_scaffold 0.3.0.rc5 → 0.3.0.rc6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,13 @@
1
+ == 0.3.0.rc6
2
+
3
+ * enhancement
4
+ * Add title for show, edit, destroy icon
5
+
6
+ * bugfix
7
+ * require jquery-barcode to application-bs.js
8
+ * avoid to display log of require
9
+ * jointable def up def down -> def change (migration)
10
+
1
11
  == 0.3.0.rc5
2
12
 
3
13
  * bugfix
@@ -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.3.0.rc5"
6
+ s.version = "0.3.0.rc6"
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"
@@ -14,7 +14,7 @@ class BeautifulJointableGenerator < Rails::Generators::Base
14
14
  sorted_model = join_models.sort
15
15
 
16
16
  # Generate migration
17
- migration_content_up = "
17
+ migration_content = "
18
18
  create_table :#{sorted_model[0].pluralize}_#{sorted_model[1].pluralize}, :id => false do |t|
19
19
  t.integer :#{sorted_model[0]}_id
20
20
  t.integer :#{sorted_model[1]}_id
@@ -23,15 +23,12 @@ class BeautifulJointableGenerator < Rails::Generators::Base
23
23
  add_index :#{sorted_model[0].pluralize}_#{sorted_model[1].pluralize}, [:#{sorted_model[0]}_id, :#{sorted_model[1]}_id]
24
24
  "
25
25
 
26
- migration_content_down = "\n drop_table :#{sorted_model[0].pluralize}_#{sorted_model[1].pluralize} "
27
-
28
26
  migration_name = "create_join_table_for_#{sorted_model[0]}_and_#{sorted_model[1]}"
29
27
  generate("migration", migration_name)
30
28
 
31
29
  filename = Dir.glob("db/migrate/*#{migration_name}.rb")[0]
32
30
 
33
- inject_into_file(filename, migration_content_up, :after => "def up")
34
- inject_into_file(filename, migration_content_down, :after => "def down")
31
+ inject_into_file(filename, migration_content, :after => "def change")
35
32
 
36
33
  # Add habtm relation
37
34
  inject_into_file("app/models/#{sorted_model[0]}.rb", "\n has_and_belongs_to_many :#{sorted_model[1].pluralize}", :after => "ActiveRecord::Base")
@@ -96,7 +96,7 @@ module BeautifulScaffoldCommonMethods
96
96
 
97
97
  def attributes
98
98
  # https://raw.github.com/rails/rails/master/railties/lib/rails/generators/generated_attribute.rb
99
- puts require 'rails/generators/generated_attribute'
99
+ require 'rails/generators/generated_attribute'
100
100
  return myattributes.map{ |a|
101
101
  attr, type = a.split(":")
102
102
  Rails::Generators::GeneratedAttribute.new(attr, type.to_sym)
@@ -26,6 +26,7 @@
26
26
  //= require markitup/sets/wiki/set
27
27
  //= require tagit.js
28
28
  //= require chardinjs
29
+ //= require jquery-barcode
29
30
  //= require beautiful_scaffold
30
31
  //= require fixed_menu
31
32
 
@@ -75,9 +75,9 @@
75
75
  <td <%%= visible_column("<%= singular_table_name %>", "updated_at") %> class="col-updated_at <%%= align_attribute("datetime") %>">
76
76
  <%%= l(<%= singular_table_name %>.updated_at, :format => :long) %>
77
77
  </td>
78
- <td><%%= link_to '<i class="icon-search"></i>'.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
79
- <td><%%= link_to '<i class="icon-pencil"></i>'.html_safe, edit_<%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
80
- <td><%%= link_to '<i class="icon-remove"></i>'.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :confirm => t(:are_you_sure, :default => "Are you sure?"), :method => :delete %></td>
78
+ <td><%%= link_to '<i class="icon-search"></i>'.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :title => t(:show, :default => "Show") %></td>
79
+ <td><%%= link_to '<i class="icon-pencil"></i>'.html_safe, edit_<%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :title => t(:edit, :default => "Edit") %></td>
80
+ <td><%%= link_to '<i class="icon-remove"></i>'.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :confirm => t(:are_you_sure, :default => "Are you sure?"), :method => :delete, :title => t(:destroy, :default => "Destroy") %></td>
81
81
  </tr>
82
82
  <%% end %>
83
83
  </tbody>
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.3.0.rc5
4
+ version: 0.3.0.rc6
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: