polygallery 0.0.8 → 0.0.9

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/polygallery/galleries.js +1 -1
  3. data/app/models/concerns/polygallery/customized_gallery.rb +8 -0
  4. data/app/models/concerns/polygallery/customized_photo.rb +8 -0
  5. data/app/models/polygallery/gallery.rb +25 -12
  6. data/app/models/polygallery/photo.rb +14 -17
  7. data/db/migrate/20141001192141_add_sti_to_galleries_and_photos.rb +6 -0
  8. data/lib/generators/polygallery/install/templates/polygallery_migration.rb +2 -0
  9. data/lib/polygallery/has_polygallery.rb +20 -5
  10. data/lib/polygallery/has_polyphotos.rb +22 -5
  11. data/lib/polygallery/version.rb +1 -1
  12. data/test/dummy/app/assets/javascripts/events.js +1 -1
  13. data/test/dummy/app/controllers/events_controller.rb +38 -3
  14. data/test/dummy/app/models/custom_gallery.rb +24 -0
  15. data/test/dummy/app/models/custom_photo.rb +11 -0
  16. data/test/dummy/app/models/event.rb +4 -0
  17. data/test/dummy/app/views/events/_form.html.haml +6 -0
  18. data/test/dummy/app/views/events/_simple_form.html.haml +6 -0
  19. data/test/dummy/app/views/events/edit.html.haml +5 -0
  20. data/test/dummy/app/views/events/index.html.haml +33 -0
  21. data/test/dummy/app/views/events/new.html.haml +5 -0
  22. data/test/dummy/app/views/events/show.html.haml +23 -0
  23. data/test/dummy/app/views/home/index.html.haml +2 -11
  24. data/test/dummy/app/views/layouts/application.html.haml +1 -11
  25. data/test/dummy/config/application.rb +1 -1
  26. data/test/dummy/db/schema.rb +3 -1
  27. data/test/dummy/log/development.log +15954 -0
  28. data/test/dummy/public/system/polygallery/photos/photos/000/000/011/medium/piece2.jpg +0 -0
  29. data/test/dummy/public/system/polygallery/photos/photos/000/000/011/original/piece2.jpg +0 -0
  30. data/test/dummy/public/system/polygallery/photos/photos/000/000/011/thumb/piece2.jpg +0 -0
  31. data/test/dummy/public/system/polygallery/photos/photos/000/000/012/medium/piece6.jpg +0 -0
  32. data/test/dummy/public/system/polygallery/photos/photos/000/000/012/original/piece6.jpg +0 -0
  33. data/test/dummy/public/system/polygallery/photos/photos/000/000/012/thumb/piece6.jpg +0 -0
  34. data/test/dummy/public/system/polygallery/photos/photos/000/000/029/medium/piece4.jpg +0 -0
  35. data/test/dummy/public/system/polygallery/photos/photos/000/000/029/original/piece4.jpg +0 -0
  36. data/test/dummy/public/system/polygallery/photos/photos/000/000/029/thumb/piece4.jpg +0 -0
  37. data/test/dummy/public/system/polygallery/photos/photos/000/000/032/medium/piece8.jpg +0 -0
  38. data/test/dummy/public/system/polygallery/photos/photos/000/000/032/original/piece8.jpg +0 -0
  39. data/test/dummy/public/system/polygallery/photos/photos/000/000/032/thumb/piece8.jpg +0 -0
  40. data/test/dummy/public/system/polygallery/photos/photos/000/000/033/medium/piece10.jpg +0 -0
  41. data/test/dummy/public/system/polygallery/photos/photos/000/000/033/original/piece10.jpg +0 -0
  42. data/test/dummy/public/system/polygallery/photos/photos/000/000/033/thumb/piece10.jpg +0 -0
  43. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  44. data/test/dummy/tmp/cache/assets/development/sprockets/30e3552cad42917377b8675173b87d6d +0 -0
  45. data/test/dummy/tmp/cache/assets/development/sprockets/5714323f471f9980adfb3529d2e01f04 +0 -0
  46. data/test/dummy/tmp/cache/assets/development/sprockets/65dccf676de4439612547abc6451ba65 +0 -0
  47. data/test/dummy/tmp/cache/assets/development/sprockets/69bda14eaa1d8ad1ea1235abb619e366 +0 -0
  48. data/test/dummy/tmp/cache/assets/development/sprockets/81bf3a1b16f593a309cc121596c7cf23 +0 -0
  49. data/test/dummy/tmp/cache/assets/development/sprockets/b08b14449d0c760863c75b163f3d2ea0 +0 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  51. metadata +57 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72813f5132c7b168ccabc2c5f262be7d29ef1bb2
4
- data.tar.gz: 200c89fe2ea23f1a2fa0d59c271e31738587071b
3
+ metadata.gz: 88e9534f1c61c15956c2e2739dd6a2a655769ef9
4
+ data.tar.gz: 2908cdc1082c6ddbe40b1d7ae98e17af7963384e
5
5
  SHA512:
6
- metadata.gz: da025e187f685c868b63417c2ebf3ec40ac57d91139480de6d12e694a07030dc3300db4e4ffab9b511d7dc901063f243524df3617493f9a5065cf54db899de58
7
- data.tar.gz: 01fbbc77fdf06e12a4091ad9541aadd1b9ffb9512827d8ffc87adb920067b099df0badcf04a9b9e250e6865976cb7d4abfc36a935c907709657234697a3b8655
6
+ metadata.gz: 08fa013c59768b511455e4eaf601cc303bc67da57c662a077ffcb5c015627b2e490c9b15af7bda88fd01881acf98b32fb486e87fe4c78b286e566a177284676c
7
+ data.tar.gz: 0f7a7ceb4f0a4a5483872ba2bc675f70e2e506330d90d691a92c85c2d4bd7a69a471c8cb463eba8b7ebb8e3d878ba29ffbb6b681dfbd0355cc13d5fcb66f73b1
@@ -1,2 +1,2 @@
1
1
  // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,8 @@
1
+ module Polygallery::CustomizedGallery
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ self.inheritance_column = :class_name
6
+ end
7
+
8
+ end
@@ -0,0 +1,8 @@
1
+ module Polygallery::CustomizedPhoto
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ self.inheritance_column = :class_name
6
+ end
7
+
8
+ end
@@ -1,24 +1,27 @@
1
1
  module Polygallery
2
2
  class Gallery < ActiveRecord::Base
3
3
  DEFAULTS = {
4
- :association => {
5
- :class_name => 'Polygallery::Gallery',
6
- :as => :galleryable,
7
- :dependent => :destroy
4
+ :associations => {
5
+ :gallery => {
6
+ :class_name => 'Polygallery::Gallery',
7
+ :as => :galleryable,
8
+ :dependent => :destroy
9
+ },
10
+ :photos => {
11
+ :class_name => 'Polygallery::Photo',
12
+ :before_add => :set_nest,
13
+ :dependent => :destroy
14
+ }
8
15
  },
9
16
  :nested_attributes => {
10
17
  :gallery => {:reject_if => :all_blank},
11
- :photo => {:reject_if => lambda{|attributes| attributes['photo'].nil? }, :allow_destroy => true}
18
+ :photos => {:reject_if => lambda{|attributes| attributes['photo'].nil? }, :allow_destroy => true}
12
19
  },
13
- :validates => {},
14
- :paperclip => {
15
- :styles => {:medium => '300x300#', :thumb => '100x100#'},
16
- :default_url => '/images/:style/missing.png'
17
- }
20
+ :validates => {}
18
21
  }
19
22
 
20
23
  belongs_to :galleryable, :polymorphic => true
21
- has_polyphotos
24
+ has_polyphotos DEFAULTS
22
25
 
23
26
  def settings
24
27
  if galleryable.present?
@@ -31,10 +34,20 @@ module Polygallery
31
34
  klass.find(galleryable_id).send("#{title}_settings".to_sym)
32
35
  else
33
36
  puts 'Galleryable still not found.'
34
- DEFAULTS
37
+ defaults
35
38
  end
39
+ elsif galleryable_type.present?
40
+ Object.const_get(galleryable_type).send("#{title}_settings".to_sym)
36
41
  else
37
42
  puts 'WARNING: Galleryable not found! Using default paperclip settings...'
43
+ defaults
44
+ end
45
+ end
46
+
47
+ def defaults
48
+ if self.class_name.present?
49
+ Kernel.const_get(self.class_name)::DEFAULTS
50
+ else
38
51
  DEFAULTS
39
52
  end
40
53
  end
@@ -1,31 +1,28 @@
1
1
  module Polygallery
2
2
  class Photo < ActiveRecord::Base
3
3
 
4
- attr_accessor :photo_to_upload
4
+ PAPERCLIP_SETTINGS = {
5
+ :styles => {:medium => '300x300#', :thumb => '100x100#'},
6
+ :default_url => '/images/:style/missing.png'
7
+ }
8
+ has_attached_file :photo,
9
+ :styles => ->(a) { if a.instance.class_name then raise a.instance.class_name else PAPERCLIP_SETTINGS[:styles] end },# PAPERCLIP_SETTINGS[:styles],
10
+ :default_url => PAPERCLIP_SETTINGS[:default_url]
11
+ validates_attachment_content_type :photo, :content_type => /\Aimage\/.*\Z/
12
+ # validates_attachment_presence :photo # TODO: make this a setting
13
+
14
+ belongs_to :gallery, :class_name => 'Polygallery::Gallery'
15
+
16
+ attr_accessor :photo_to_upload, :galleryable_id, :galleryable_type, :gallery_title
5
17
  before_save :process_photo_to_upload
6
- after_initialize :init_attachment
7
18
 
8
19
  def paperclip_settings
9
- if gallery.present?
10
- gallery.settings[:paperclip]
11
- else
12
- puts 'WARNING: Gallery not found! Using default paperclip settings...'
13
- Gallery::DEFAULTS[:paperclip]
14
- end
20
+ PAPERCLIP_SETTINGS
15
21
  end
16
22
 
17
23
  def process_photo_to_upload
18
24
  self.photo = File.open(photo_to_upload) if photo_to_upload.present?
19
25
  end
20
26
 
21
- def init_attachment
22
- self.class.belongs_to :gallery, :class_name => 'Polygallery::Gallery'
23
- self.class.has_attached_file :photo,
24
- :styles => paperclip_settings[:styles],
25
- :default_url => paperclip_settings[:default_url]
26
- self.class.validates_attachment_content_type :photo, :content_type => /\Aimage\/.*\Z/
27
- # self.class.validates_attachment_presence :photo # TODO: make this a setting
28
- end
29
-
30
27
  end
31
28
  end
@@ -0,0 +1,6 @@
1
+ class AddStiToGalleriesAndPhotos < ActiveRecord::Migration
2
+ def change
3
+ add_column :polygallery_galleries, :class_name, :string
4
+ add_column :polygallery_photos, :class_name, :string
5
+ end
6
+ end
@@ -5,6 +5,7 @@ class CreatePolygallery < ActiveRecord::Migration
5
5
  t.integer :default_photo_id
6
6
  t.integer :galleryable_id
7
7
  t.string :galleryable_type
8
+ t.string :class_name
8
9
 
9
10
  t.timestamps
10
11
  end
@@ -13,6 +14,7 @@ class CreatePolygallery < ActiveRecord::Migration
13
14
  t.attachment :photo
14
15
  t.string :title
15
16
  t.text :caption
17
+ t.string :class_name
16
18
 
17
19
  t.timestamps
18
20
  end
@@ -12,17 +12,31 @@ module Polygallery
12
12
  options = title
13
13
  title = 'gallery'
14
14
  end
15
- defaults = Gallery::DEFAULTS
15
+
16
+ defaults = if options[:associations] && options[:associations][:class_name] && options[:associations][:class_name] != 'Polygallery::Gallery'
17
+ Kernel.const_get(options[:associations][:class_name])::DEFAULTS
18
+ else
19
+ Gallery::DEFAULTS
20
+ end
16
21
  settings = defaults.deep_merge(options)
17
- has_one title.to_sym, -> { where(:title => title.to_s) }, settings[:association]
22
+ cattr_accessor "#{title}_settings".to_sym
23
+ send("#{title}_settings=".to_sym, settings)
24
+
25
+ has_one title.to_sym, -> { where(:title => title.to_s) }, settings[:associations][:gallery]
18
26
  accepts_nested_attributes_for title.to_sym, settings[:nested_attributes][:gallery]
19
27
  has_many "#{title}_photos".to_sym,
20
28
  :through => title.to_sym,
21
29
  :source => :photos,
22
- :class_name => 'Polygallery::Photo'
23
- attr_accessor "#{title}_settings".to_sym
30
+ :class_name => settings[:associations][:photos][:class_name]
31
+
32
+ # if settings[:paperclip] != defaults[:paperclip]
33
+ # after_create do
34
+ # raise 'CREATE BOOM'
35
+ # send(title.to_sym).photos.each{|p| p.photo.reprocess! }
36
+ # end
37
+ # end
38
+
24
39
  after_initialize do
25
- send("#{title}_settings=".to_sym, settings) if send("#{title}_settings".to_sym).nil?
26
40
  send("build_#{title.to_s}".to_sym) if send(title.to_sym).nil?
27
41
  send(title.to_sym).send(:galleryable=, self)
28
42
  end
@@ -49,6 +63,7 @@ module Polygallery
49
63
  def has_polygallery?(title)
50
64
  polygalleries.include?(title)
51
65
  end
66
+
52
67
  end
53
68
  end
54
69
  end
@@ -3,16 +3,30 @@ module Polygallery
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
+ def defaults
7
+ klass = self.class_name.present? ? Kernel.const_get(self.class_name) : Gallery
8
+ klass::DEFAULTS
9
+ end
6
10
  end
7
11
 
8
12
  module ClassMethods
9
13
  def has_polyphotos(title='photos', options={})
10
- has_many title.to_sym, :class_name => 'Polygallery::Photo', :before_add => :set_nest, :dependent => :destroy
11
- accepts_nested_attributes_for title.to_sym, Gallery::DEFAULTS[:nested_attributes][:photo] # TODO: get the actual settings object somehow
12
- attr_accessor :photos_to_upload
14
+ if title.is_a? Hash
15
+ options = title
16
+ title = 'photos'
17
+ end
18
+
19
+ # raise 'BOOM' if options.keys.any?
20
+ settings = options
21
+ has_many title.to_sym, settings[:associations][:photos]
22
+ accepts_nested_attributes_for title.to_sym, settings[:nested_attributes][:photos] # TODO: get the actual settings somehow
13
23
  after_initialize do
14
- send(title.to_sym).build unless send(title.to_sym).any?
15
- # send(title.to_sym).each {|p| p.gallery_id ||= self.id }
24
+ # raise galleryable_type if galleryable_type.present?
25
+ send(title.to_sym).build(
26
+ :galleryable_id => galleryable_id,
27
+ :galleryable_type => galleryable_type,
28
+ :gallery_title => self.title
29
+ ) unless send(title.to_sym).any?
16
30
  end
17
31
  include HasPolyphotos::LocalInstanceMethods
18
32
  end
@@ -21,6 +35,9 @@ module Polygallery
21
35
  module LocalInstanceMethods
22
36
  def set_nest(photo)
23
37
  photo.gallery ||= self
38
+ photo.galleryable_id ||= galleryable_id
39
+ photo.galleryable_type ||= galleryable_type
40
+ photo.gallery_title ||= title
24
41
  end
25
42
  end
26
43
  end
@@ -1,3 +1,3 @@
1
1
  module Polygallery
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -1,2 +1,2 @@
1
1
  // Place all the behaviors and hooks related to the matching controller here.
2
- // All this logic will automatically be available in application.js.
2
+ // All this logic will automatically be available in application.js.
@@ -1,20 +1,55 @@
1
1
  class EventsController < ApplicationController
2
2
  include Polygallery::StrongParams
3
+ before_filter :fetch_event, :only => [:show, :edit, :update, :destroy]
4
+
5
+ def new
6
+ @event = Event.new
7
+ end
3
8
 
4
9
  def create
5
- raise 'BOOM'
6
10
  @event = Event.new event_params
7
11
  if @event.save
8
12
  flash[:success] = 'Your event has been saved!'
9
13
  else
10
14
  flash[:error] = 'Your event could not be saved!'
11
15
  end
12
- redirect_to root_path
16
+ redirect_to event_path(@event)
17
+ end
18
+
19
+ def index
20
+ @events = Event.includes(:gallery => [:photos]).order(:updated_at => :desc)
21
+ end
22
+
23
+ def show
24
+ end
25
+
26
+ def edit
27
+ end
28
+
29
+ def update
30
+ if @event.update_attributes event_params
31
+ flash[:success] = 'Your event has been saved!'
32
+ else
33
+ flash[:error] = 'Your event could not be saved!'
34
+ end
35
+ redirect_to event_path(@event)
36
+ end
37
+
38
+ def destroy
39
+ if @event.destroy
40
+ flash[:success] = 'Your event has been deleted!'
41
+ else
42
+ flash[:error] = 'Your event could not be deleted!'
43
+ end
44
+ redirect_to events_path
13
45
  end
14
46
 
15
47
  private
16
48
  def event_params
17
- params.require(:event).permit(:title, :gallery_attributes => polygallery_params)
49
+ params.require(:event).permit(:title, :gallery_attributes => polygallery_params, :custom_gallery_attributes => polygallery_params)
50
+ end
51
+ def fetch_event
52
+ @event = Event.find(params[:id])
18
53
  end
19
54
 
20
55
  end
@@ -0,0 +1,24 @@
1
+ class CustomGallery < Polygallery::Gallery
2
+ include Polygallery::CustomizedGallery
3
+
4
+ DEFAULTS = {
5
+ :associations => {
6
+ :gallery => {
7
+ :class_name => 'CustomGallery',
8
+ :as => :galleryable,
9
+ :dependent => :destroy
10
+ },
11
+ :photos => {
12
+ :class_name => 'CustomPhoto',
13
+ :before_add => :set_nest,
14
+ :dependent => :destroy
15
+ }
16
+ },
17
+ :nested_attributes => {
18
+ :gallery => {:reject_if => :all_blank},
19
+ :photos => {:reject_if => lambda{|attributes| attributes['photo'].nil? }, :allow_destroy => true}
20
+ },
21
+ :validates => {}
22
+ }
23
+
24
+ end
@@ -0,0 +1,11 @@
1
+ class CustomPhoto < Polygallery::Photo
2
+ include Polygallery::CustomizedPhoto
3
+
4
+ PAPERCLIP_SETTINGS = {
5
+ :styles => {:large => '1200x400#', :medium => '300x300#', :thumb => '100x100#'},
6
+ :default_url => '/images/:style/missing.png'
7
+ }
8
+
9
+ belongs_to :gallery, :class_name => 'CustomGallery'
10
+
11
+ end
@@ -1,5 +1,9 @@
1
1
  class Event < ActiveRecord::Base
2
2
 
3
3
  has_polygallery
4
+ has_polygallery :custom_gallery, :associations => {
5
+ :gallery => { :class_name => '::CustomGallery' },
6
+ :photos => { :class_name => '::CustomPhoto' }
7
+ }
4
8
 
5
9
  end
@@ -0,0 +1,6 @@
1
+ = form_for @event do |f|
2
+ .form-group
3
+ %label.control-label Title
4
+ .controls= f.text_field :title, :class => 'form-control'
5
+ = fields_for_polygallery :gallery, f
6
+ = f.submit :class => 'btn btn-success btn-lg btn-block'
@@ -0,0 +1,6 @@
1
+ = simple_form_for @event, :multipart => true do |f|
2
+ = f.error_notification
3
+ = f.input :title, :autofocus => true
4
+ = simple_fields_for_polygallery :gallery, f
5
+ = simple_fields_for_polygallery :custom_gallery, f
6
+ = f.submit :class => 'btn btn-success btn-lg btn-block'
@@ -0,0 +1,5 @@
1
+ .page-header
2
+ %h1 Edit an Event
3
+
4
+ .col-md-6.col-md-offset-3
5
+ = render 'simple_form'
@@ -0,0 +1,33 @@
1
+ .page-header
2
+ %h1
3
+ = link_to 'New Event', new_event_path, :class => 'btn btn-success pull-right'
4
+ Events
5
+
6
+ - if @events.any?
7
+ .table-responsive
8
+ %table.table.table-bordered.table-striped
9
+ %thead
10
+ %tr
11
+ %th Title
12
+ %th.text-center Photos
13
+ %th.text-center Actions
14
+ %tbody
15
+ - @events.each do |e|
16
+ %tr
17
+ %td= link_to e.title, e
18
+ %td.text-center
19
+ %span.badge
20
+ = e.gallery.photos.count
21
+ Regular
22
+ %span.badge
23
+ = e.custom_gallery.photos.count
24
+ Custom
25
+ %td.text-center
26
+ = link_to edit_event_path(e), :class => 'btn btn-default btn-xs' do
27
+ %span.glyphicon.glyphicon-edit
28
+ = link_to e, :class => 'btn btn-default btn-xs', :method => :delete, :data => {:confirm => 'Are you sure?'} do
29
+ %span.glyphicon.glyphicon-trash
30
+ - else
31
+ .jumbotron.text-center
32
+ %h1 Nothing to show.
33
+ %p There are no events yet!
@@ -0,0 +1,5 @@
1
+ .page-header
2
+ %h1 Add an Event
3
+
4
+ .col-md-6.col-md-offset-3
5
+ = render 'simple_form'
@@ -0,0 +1,23 @@
1
+ .page-header
2
+ %h1
3
+ .pull-right
4
+ = link_to edit_event_path(@event), :class => 'btn btn-default' do
5
+ %span.glyphicon.glyphicon-edit
6
+ = link_to @event, :class => 'btn btn-danger', :method => :delete, :data => {:confirm => 'Are you sure?'} do
7
+ %span.glyphicon.glyphicon-trash
8
+ Events
9
+ %small= @event.title
10
+
11
+ - if @event.gallery.photos.any?
12
+ %h2 Gallery
13
+ .text-center
14
+ - @event.gallery.photos.each do |p|
15
+ = image_tag p.photo.url, :class => 'img-responsive img-thumbnail'
16
+ %br
17
+
18
+ - if @event.custom_gallery.photos.any?
19
+ %h2 Custom Gallery
20
+ .text-center
21
+ - @event.custom_gallery.photos.each do |p|
22
+ = image_tag p.photo.url(:large), :class => 'img-responsive img-thumbnail'
23
+ %br
@@ -14,19 +14,10 @@
14
14
  .panel-body
15
15
  %h2.lead New Event (with SimpleForm)
16
16
  %hr
17
- = simple_form_for @event, :url => events_path, :method => :post, :multipart => true do |f|
18
- = f.error_notification
19
- = f.input :title, :autofocus => true
20
- = simple_fields_for_polygallery :gallery, f
21
- = f.submit :class => 'btn btn-success btn-lg btn-block'
17
+ = render 'events/simple_form'
22
18
  .col-md-6
23
19
  .panel.panel-default
24
20
  .panel-body
25
21
  %h2.lead New Event (without SimpleForm)
26
22
  %hr
27
- = form_for @event do |f|
28
- .form-group
29
- %label.control-label Title
30
- .controls= f.text_field :title, :class => 'form-control'
31
- = fields_for_polygallery :gallery, f
32
- = f.submit :class => 'btn btn-success btn-lg btn-block'
23
+ = render 'events/form'
@@ -17,15 +17,5 @@
17
17
 
18
18
  = csrf_meta_tags
19
19
  %body
20
- .container-fluid
21
- #flash-display
22
- - if flash.any? && @slides.present? && @slides.any?
23
- %br
24
- - flash.each do |type, msg|
25
- - type = 'danger' if type == 'error'
26
- - type = 'info' if type == 'notice'
27
- %div{:class => "alert alert-#{type} fadeout", :data => {:dismiss => "alert"}, :style => 'margin-top:25px;margin-bottom:0px;'}
28
- %button.close &times;
29
- = msg if msg.is_a?(String)
30
- = yield
20
+ .container-fluid= yield
31
21
  = javascript_include_tag 'application'
@@ -21,6 +21,6 @@ module Dummy
21
21
 
22
22
  # config.eager_load_paths += ["#{Rails.root}/lib"]
23
23
 
24
- config.assets.prefix = ''
24
+ # config.assets.prefix = ''
25
25
  end
26
26
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140803171534) do
14
+ ActiveRecord::Schema.define(version: 20141001192141) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
@@ -29,6 +29,7 @@ ActiveRecord::Schema.define(version: 20140803171534) do
29
29
  t.string "galleryable_type"
30
30
  t.datetime "created_at"
31
31
  t.datetime "updated_at"
32
+ t.string "class_name"
32
33
  end
33
34
 
34
35
  create_table "polygallery_photos", force: true do |t|
@@ -41,6 +42,7 @@ ActiveRecord::Schema.define(version: 20140803171534) do
41
42
  t.text "caption"
42
43
  t.datetime "created_at"
43
44
  t.datetime "updated_at"
45
+ t.string "class_name"
44
46
  end
45
47
 
46
48
  end