tb_banners 1.1 → 1.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e831e21b2d55bc27d1fb1309f285fd88778c73b
4
- data.tar.gz: 7c21487ee577fce3696d40aa050eaa700c69e5b8
3
+ metadata.gz: e4c7779a7c8f87620ecddca6c2da15e4c561066f
4
+ data.tar.gz: 430847fd679a36969272e2c00fb794ddc1c2856e
5
5
  SHA512:
6
- metadata.gz: f7ecbd063a6ad0896cb314af51b07292c145f2e25b9ddc7ce1635f589410f560cea040cc64d647643083336906df1d59ff29dcb61506c864cb96c2a224d8cc49
7
- data.tar.gz: 20ce6d2036099e7e5e431e68f9ab8f71609df53c7c08b8e7758ae4387e35311ed5e7b0fd1cba3e0e72fe19f8a7fe516d0423fbbb4c2d7b3c35f3ffda6cda91f9
6
+ metadata.gz: 864e79857a1ee584d217fdf61a5ce2e85983dd8ab75be57482ddce596ad73e3c54ac3c52402da0a65a096b52893a36f52bb3e7e32e95d7f3b8103f2879a312b9
7
+ data.tar.gz: 02894fdec03b82a9d3afe800225c49372f45af427d63f8be0cfb0ad15d956847af4a6ad48dfd28c08840cb56d8f2f2d3e000c2d6048c7cb42c42f79ed5ce5aea
@@ -54,7 +54,6 @@ private
54
54
 
55
55
  def get_record
56
56
  begin
57
- logger.debug "Looking for banner set with id: #{params[:id]}"
58
57
  @banner_set = SpudBannerSet.find(params[:id])
59
58
  rescue ActiveRecord::RecordNotFound => e
60
59
  flash.now[:error] = "Could not find the requested BannerSet"
@@ -72,8 +72,9 @@ class Admin::BannersController < Admin::ApplicationController
72
72
  SpudBanner.transaction do
73
73
  banner_ids.each_with_index do |id, index|
74
74
  banner = banners.select{ |b| b.id == id.to_i }.first
75
- banner.update_attribute(:sort_order, index)
75
+ banner.update_column(:sort_order, index)
76
76
  end
77
+ banners.last.owner.touch()
77
78
  end
78
79
  render :nothing => true, :status => 200
79
80
  end
@@ -12,7 +12,9 @@ class SpudBanner < ActiveRecord::Base
12
12
  :url => Spud::Banners.storage_url,
13
13
  :path => Spud::Banners.storage_path
14
14
 
15
- validates_attachment_presence :banner
15
+ validates_attachment :banner,
16
+ :presence => true,
17
+ :content_type => {:content_type => ['image/jpg', 'image/jpeg', 'image/png']}
16
18
 
17
19
  def dynamic_styles
18
20
  styles = {
@@ -1,6 +1,6 @@
1
1
  require 'tb_core'
2
2
  require 'paperclip'
3
- require 'liquid'
3
+ require 'tb_liquid'
4
4
 
5
5
  module Spud
6
6
  module Banners
@@ -1,5 +1,5 @@
1
1
  module Spud
2
2
  module Banners
3
- VERSION = "1.1"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb_banners
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.1'
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Westlake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-21 00:00:00.000000000 Z
11
+ date: 2014-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails