adminpanel 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/adminpanel/version.rb +1 -1
- data/lib/tasks/adminpanel/adminpanel.rake +4 -4
- metadata +4 -4
data/lib/adminpanel/version.rb
CHANGED
|
@@ -43,7 +43,7 @@ namespace :adminpanel do
|
|
|
43
43
|
|
|
44
44
|
puts "Generating #{args[:times]} records of #{args[:model]}"
|
|
45
45
|
|
|
46
|
-
model = "adminpanel/#{args[:model]}".classify.constantize
|
|
46
|
+
@model = "adminpanel/#{args[:model]}".classify.constantize
|
|
47
47
|
|
|
48
48
|
attributes = args[:attributes].split(" ")
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ namespace :adminpanel do
|
|
|
51
51
|
|
|
52
52
|
has_image = false
|
|
53
53
|
args[:times].to_i.times do |time|
|
|
54
|
-
instance = model.new
|
|
54
|
+
instance = @model.new
|
|
55
55
|
attributes.each do |attribute|
|
|
56
56
|
field = attribute.split(":").first
|
|
57
57
|
type = attribute.split(":").second
|
|
@@ -98,7 +98,7 @@ namespace :adminpanel do
|
|
|
98
98
|
change_update_date(instance)
|
|
99
99
|
|
|
100
100
|
if(has_image) #forcing the image into the db
|
|
101
|
-
|
|
101
|
+
create_image_of(instance.id)
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
end
|
|
@@ -122,7 +122,7 @@ private
|
|
|
122
122
|
|
|
123
123
|
def create_image_of(model_id)
|
|
124
124
|
image_instance = Adminpanel::Image.new(
|
|
125
|
-
:model => model.display_name,
|
|
125
|
+
:model => @model.display_name,
|
|
126
126
|
:foreign_key => model_id
|
|
127
127
|
)
|
|
128
128
|
image_instance.save(:validate => false)
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: adminpanel
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 25
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 1.2.
|
|
9
|
+
- 3
|
|
10
|
+
version: 1.2.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Jose Ramon Camacho
|
|
@@ -16,7 +16,7 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date: 2014-03-
|
|
19
|
+
date: 2014-03-11 00:00:00 -06:00
|
|
20
20
|
default_executable:
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|