ecm_pictures 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,6 +58,12 @@ if defined?(ActiveAdmin)
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
panel Ecm::Pictures::PictureGallery.human_attribute_name(:display_code) do
|
62
|
+
div do
|
63
|
+
ecm_pictures_picture_gallery.display_code
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
61
67
|
panel Ecm::Pictures::PictureGallery.human_attribute_name(:pictures) do
|
62
68
|
table_for ecm_pictures_picture_gallery.pictures, :i18n => Ecm::Pictures::Picture do
|
63
69
|
sortable_columns
|
@@ -2,7 +2,7 @@ class Ecm::Pictures::PictureGallery < ActiveRecord::Base
|
|
2
2
|
self.table_name = 'ecm_pictures_picture_galleries'
|
3
3
|
|
4
4
|
# associations
|
5
|
-
has_many :pictures
|
5
|
+
has_many :pictures, :dependent => :destroy
|
6
6
|
accepts_nested_attributes_for :pictures, :allow_destroy => true
|
7
7
|
|
8
8
|
# acts as list
|
@@ -22,6 +22,9 @@ class Ecm::Pictures::PictureGallery < ActiveRecord::Base
|
|
22
22
|
# validations
|
23
23
|
validates :name, :presence => true
|
24
24
|
|
25
|
+
def display_code
|
26
|
+
"<%= render_picture_gallery '#{self.name}' %>"
|
27
|
+
end
|
25
28
|
|
26
29
|
def set_defaults
|
27
30
|
if new_record?
|
data/lib/ecm/pictures/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ecm_pictures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.11
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Roberto Vasquez Angel
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-06-
|
13
|
+
date: 2012-06-21 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|