ecm_downloads2 2.0.2 → 2.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19d5cfdf74767434ce179495e60595bc2f14071e
4
- data.tar.gz: c397531ebb426d0879c665c23a1d71424cb729ab
3
+ metadata.gz: 3d47472f5565eceae05f35443c22e5245e4bfc66
4
+ data.tar.gz: 442a6fe726406de758a83c964aefb79743e4c89b
5
5
  SHA512:
6
- metadata.gz: 632756cca482bf776c6f4770a618d77beb604064f6e7aa5793cb9ddafbb8e00458feab5722a42ba0868fdd23a672904884dd83c906bc1f103f0caa12e06ce676
7
- data.tar.gz: 400cc7a35a7162787b73d9eb207d29486e5454bb62ad7855e27499b60abfe8902acdff27688788cd38d7d01c72950dd4fb6afac10f2a0a677cd9187fedd04b92
6
+ metadata.gz: 294bb226fce68837ef93f3d8546014e9e839bbcde4f5ed87f640fa23b6bd2859caa4dec56d48b63aec1375e9b7ba1899209fd5bb1b70270674c0f414c44ac9d4
7
+ data.tar.gz: 3f06f1450caba890f7dfdc2fc116407e5fd0ab7f4bf8b43cb45614d51f3939ce6ff5ad3c91c9d2d02e5e87b6d748655dea1a1231ca7ec9e222ecb34b901b4925
@@ -4,6 +4,6 @@ class Ecm::Downloads::DownloadCategoriesController < Ecm::Downloads::Configurati
4
4
  end
5
5
 
6
6
  def show
7
- @download_category = Ecm::Downloads::DownloadCategory.find(params[:id])
7
+ @download_category = Ecm::Downloads::DownloadCategory.friendly.find(params[:id])
8
8
  end
9
9
  end
@@ -1,7 +1,7 @@
1
1
  class Ecm::Downloads::DownloadsController < Ecm::Downloads::Configuration.base_controller.constantize
2
2
  # Support secured downloads with expiring urls on S3.
3
3
  def download
4
- @download = Ecm::Downloads::Download.published.find(params[:id]).decorate
4
+ @download = Ecm::Downloads::Download.published.friendly.find(params[:id]).decorate
5
5
  redirect_to @download.asset.expiring_url(100)
6
6
  end
7
7
 
@@ -10,6 +10,6 @@ class Ecm::Downloads::DownloadsController < Ecm::Downloads::Configuration.base_c
10
10
  end
11
11
 
12
12
  def show
13
- @download = Ecm::Downloads::Download.published.find(params[:id]).decorate
13
+ @download = Ecm::Downloads::Download.published.friendly.find(params[:id]).decorate
14
14
  end
15
15
  end
@@ -25,7 +25,7 @@ class Ecm::Downloads::Download < ActiveRecord::Base
25
25
 
26
26
  # friendly id
27
27
  extend FriendlyId
28
- friendly_id :name, use: [:slugged, :finders]
28
+ friendly_id :name, use: [:slugged]
29
29
 
30
30
  # paperclip
31
31
  has_attached_file :asset, Ecm::Downloads::Configuration.paperclip_options
@@ -28,7 +28,7 @@ class Ecm::Downloads::DownloadCategory < ActiveRecord::Base
28
28
 
29
29
  # friendly id
30
30
  extend FriendlyId
31
- friendly_id :name, use: [:slugged, :finders]
31
+ friendly_id :name, use: [:slugged]
32
32
 
33
33
  # validations
34
34
  validates :name, presence: true,
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Downloads
3
- VERSION = '2.0.2'
3
+ VERSION = '2.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_downloads2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-27 00:00:00.000000000 Z
11
+ date: 2016-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails