lib/polygallery/has_polyphotos.rb in polygallery-0.1.8 vs lib/polygallery/has_polyphotos.rb in polygallery-0.1.9
- old
+ new
@@ -18,14 +18,13 @@
title = association_names[:photos].to_s
end
settings = defaults.deep_merge options
- has_many association_names[:photos],
- settings[:associations][:photos].deep_merge({})
+ has_many association_names[:photos], settings[:associations][:photos]
accepts_nested_attributes_for association_names[:photos],
- settings[:nested_attributes][:photos]
+ settings[:nested_attributes][:photos]
after_initialize do
@polygallery_settings = settings if settings == HasPolygallery::DEFAULTS
self.initialize_polygallery
end
@@ -55,11 +54,11 @@
@polygallery_settings = self.polygallery_options = settings
self.initialize_polygallery
end
def initialize_polygallery
- settings = self.polygallery_settings
- association_names = settings[:association_names]
+ # settings = self.polygallery_settings
+ # association_names = settings[:association_names]
# self.class.has_many association_names[:photos],
# settings[:associations][:photos].deep_merge({})
# self.class.accepts_nested_attributes_for association_names[:photos],
# settings[:nested_attributes][:photos]
end