brightcontent-attachments 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 449143c17d7bbd172c32ac365b764b3cf4bcaf77
|
4
|
+
data.tar.gz: 538ea34e0233ad6e04dcedca582e93322f3fce82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb497641ffbfe2f6fd9672233b71ec332080ed52be8dbdde277db5a2edabe00556e2d44f12cca982c6e139ba89368a2d2d3d19fc018f6b83d0fe506fa83eaf76
|
7
|
+
data.tar.gz: 33329f2f2c2a34c7b87a4f4bc62c28ed9fad12b950677ca1e3b3b94efac9f2bc103ca48bf00aee82ec815ea56cd296332887077b7ceaab749b61eb04e6920cf2
|
@@ -14,7 +14,7 @@ module Brightcontent
|
|
14
14
|
validates :attachable, presence: true
|
15
15
|
validates :asset, attachment_presence: true
|
16
16
|
|
17
|
-
attr_accessible *column_names if defined? ProtectedAttributes
|
17
|
+
attr_accessible *(column_names + [:asset]) if defined? ProtectedAttributes
|
18
18
|
|
19
19
|
def self.reposition!(positions)
|
20
20
|
positions.map! &:to_i
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<div class="
|
2
|
-
<label class="control-label"><%=Brightcontent::Attachment.model_name.human.pluralize%></label>
|
3
|
-
<div class="
|
1
|
+
<div class="form-group">
|
2
|
+
<label class="control-label col-sm-2"><%=Brightcontent::Attachment.model_name.human.pluralize%></label>
|
3
|
+
<div class="col-sm-10" id="attachments-controls">
|
4
4
|
<% if item.persisted? %>
|
5
5
|
<ul class="media-list" id="attachments">
|
6
6
|
<%= render item.attachments %>
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Brightcontent::Engine.routes.draw do
|
2
2
|
get 'attachments/:type/:id' => 'attachments#show', as: :attachments
|
3
3
|
post 'attachments/:type/:id/reposition' => 'attachments#reposition'
|
4
|
-
|
4
|
+
match 'attachments' => 'attachments#create', as: :new_attachment, via: [:put, :patch]
|
5
5
|
delete 'attachments/:id' => 'attachments#destroy', as: :destroy_attachment
|
6
6
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcontent-attachments
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Developers at Brightin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brightcontent-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.1.
|
19
|
+
version: 2.1.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.1.
|
26
|
+
version: 2.1.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: paperclip
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|