beautiful_scaffold 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/beautiful_scaffold.gemspec +1 -1
- data/lib/generators/beautiful_scaffold_common_methods.rb +1 -1
- data/lib/generators/templates/app/helpers/beautiful_helper.rb +2 -2
- data/lib/generators/templates/app/views/_mass_inserting.html.erb +4 -4
- data/lib/generators/templates/app/views/partials/_register_form.html.erb +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
data/beautiful_scaffold.gemspec
CHANGED
@@ -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.
|
6
|
+
s.version = "0.2.6"
|
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"
|
@@ -61,7 +61,7 @@ module BeautifulHelper
|
|
61
61
|
model_path.delete(model_path.first)
|
62
62
|
model_name_for_ransack = model_path.join("_")
|
63
63
|
|
64
|
-
ar_model = model_name.
|
64
|
+
ar_model = model_name.camelize.constantize
|
65
65
|
|
66
66
|
default_caption = caption
|
67
67
|
if default_caption.blank? then
|
@@ -162,7 +162,7 @@ module BeautifulHelper
|
|
162
162
|
response += f.text_field((name_field + "_cont").to_sym, :class => "filter span12")
|
163
163
|
when :integer, :float, :decimal then
|
164
164
|
if is_belongs_to_column?(name_field_bk) then
|
165
|
-
btmodel = get_belongs_to_model(name_field_bk).
|
165
|
+
btmodel = get_belongs_to_model(name_field_bk).camelize.constantize
|
166
166
|
response += f.collection_select((name_field + "_eq").to_sym, btmodel.all, :id, :caption, { :include_blank => t(:all, :default => "All") }, { :class => "span12" })
|
167
167
|
elsif name_field == "id" then
|
168
168
|
response += f.text_field((name_field + "_eq").to_sym, :class => "filter span12")
|
@@ -2,18 +2,18 @@
|
|
2
2
|
<% if not namespace.blank? then %>
|
3
3
|
<% formparams << namespace %>
|
4
4
|
<% end %>
|
5
|
-
<% formparams << model_name.
|
5
|
+
<% formparams << model_name.camelize.constantize.new %>
|
6
6
|
<%= form_for formparams, :method => :post, :html => { :class => "well well-small form-horizontal mass-inserting" } do |f| %>
|
7
7
|
<%= hidden_field_tag :mass_inserting, true %>
|
8
8
|
<% for col in model_columns %>
|
9
9
|
<div <%= visible_column(model_name, col, 'inline') %> class="col-<%= col %>">
|
10
10
|
<%=
|
11
|
-
ar = model_name.
|
11
|
+
ar = model_name.camelize.constantize.columns_hash[col]
|
12
12
|
if not ar.nil? then
|
13
13
|
case ar.type
|
14
14
|
when :integer then
|
15
15
|
if col =~ /.*_id/ then
|
16
|
-
f.collection_select((col).to_sym, col.
|
16
|
+
f.collection_select((col).to_sym, col.camelize.constantize.all, :id, :caption, { :include_blank => true, :selected => (begin params[:q][col + "_eq"].to_i rescue '' end) }, { :class => "input-small" })
|
17
17
|
else
|
18
18
|
f.text_field(col.to_sym, :class => "input-small", :placeholder => t(col.to_sym, :default => col).capitalize)
|
19
19
|
end
|
@@ -25,7 +25,7 @@
|
|
25
25
|
f.text_field(col.to_sym, :class => "input-small", :placeholder => t(col.to_sym, :default => col).capitalize)
|
26
26
|
end
|
27
27
|
else
|
28
|
-
f.collection_select((col + '_id').to_sym, col.
|
28
|
+
f.collection_select((col + '_id').to_sym, col.camelize.constantize.all, :id, :caption, { :include_blank => true, :selected => (begin params[:q][col + "_id_eq"].to_i rescue '' end) }, { :class => "input-small" })
|
29
29
|
end
|
30
30
|
%>
|
31
31
|
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<h3><%%= t(:register, :default => "Register") %></h3>
|
6
6
|
</div>
|
7
7
|
<div class="modal-body">
|
8
|
-
<%% resource ||= <%= model.
|
8
|
+
<%% resource ||= <%= model.camelize %>.new %>
|
9
9
|
<%%= form_for(resource, :as => '<%= model %>', :url => registration_path('<%= model %>'), :html => { :class => "form-horizontal" }) do |f| %>
|
10
10
|
<%% begin %>
|
11
11
|
<%%= devise_error_messages! %>
|
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.
|
4
|
+
version: 0.2.6
|
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:
|
12
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
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
|
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubyforge_project: beautiful_scaffold
|
257
|
-
rubygems_version: 1.8.
|
257
|
+
rubygems_version: 1.8.24
|
258
258
|
signing_key:
|
259
259
|
specification_version: 3
|
260
260
|
summary: Beautiful Scaffold generate fully customizable scaffold
|