leonardo 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
1.3.1 (August 22th, 2011) Marco Mastrodonato
|
2
|
+
* Fixed csv name (to enable csv data export you have to set remote = false)
|
3
|
+
* Fixed seeds creation when references fields are used
|
4
|
+
|
5
|
+
|
6
|
+
|
1
7
|
1.3.0 (August 22th, 2011) Marco Mastrodonato
|
2
8
|
* Add formtastic support and a new custom partial
|
3
9
|
|
Binary file
|
@@ -123,12 +123,17 @@ module Rails
|
|
123
123
|
items = []
|
124
124
|
attributes.each do |attribute|
|
125
125
|
value = case attribute.type
|
126
|
-
when :boolean
|
127
|
-
when :integer
|
128
|
-
when :float, :decimal
|
129
|
-
|
126
|
+
when :boolean then :true
|
127
|
+
when :integer then "#"
|
128
|
+
when :float, :decimal then "#.46"
|
129
|
+
when :references, :belongs_to then "#"
|
130
|
+
else "'#{attribute.name.capitalize}\#'"
|
130
131
|
end
|
131
|
-
|
132
|
+
name = case attribute.type
|
133
|
+
when :references, :belongs_to then ":#{attribute.name}_id"
|
134
|
+
else ":#{attribute.name}"
|
135
|
+
end
|
136
|
+
items << " #{name} => #{value}"
|
132
137
|
end
|
133
138
|
row = "{ #{items.join(', ')} }"
|
134
139
|
|
@@ -51,7 +51,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
51
51
|
:i18n => true
|
52
52
|
),
|
53
53
|
:type => 'text/csv; charset=utf-8; header=present',
|
54
|
-
:filename => "
|
54
|
+
:filename => "#{CONFIG[:application][:name]}_#{t('models.<%= plural_table_name %>')}_#{Time.now.strftime("%Y%m%d")}.csv")
|
55
55
|
end
|
56
56
|
format.js
|
57
57
|
end
|
data/template.rb
CHANGED
@@ -54,7 +54,8 @@ end
|
|
54
54
|
cancan = yes?("Authorization ?")
|
55
55
|
gem "cancan" if cancan
|
56
56
|
|
57
|
-
home = yes?("Generate controller home ? (raccomanded)")
|
57
|
+
#home = yes?("Generate controller home ? (raccomanded)")
|
58
|
+
home = true
|
58
59
|
|
59
60
|
leolay = yes?("Layout ?")
|
60
61
|
leolay_main_color = leolay_second_color = nil
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leonardo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 1
|
10
|
+
version: 1.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marco Mastrodonato
|
@@ -18,7 +18,7 @@ cert_chain: []
|
|
18
18
|
date: 2011-08-22 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
|
-
description:
|
21
|
+
description: A generator for creating Rails 3.1 applications ready to go. It generates the layout, the style, the internationalization and manage external gems for authentication, authorization and other. It also provides a customized scaffold to generates cool sites ajax ready in few minutes. If you find a bug please report to m.mastrodonato@gmail.com
|
22
22
|
email: m.mastrodonato@gmail.com
|
23
23
|
executables: []
|
24
24
|
|
@@ -95,7 +95,7 @@ files:
|
|
95
95
|
- README.rdoc
|
96
96
|
- CHANGELOG
|
97
97
|
- template.rb
|
98
|
-
homepage: http://github.com/marcomd/
|
98
|
+
homepage: http://github.com/marcomd/Leonardo
|
99
99
|
licenses: []
|
100
100
|
|
101
101
|
post_install_message:
|