Merge branch 'trahfo/master' into spree-1.1
* trahfo/master: specify available attributes for update specify available attributes for update moved partial into other directory specify available attributes for update let's see if it also works with spree 1.1.0 Conflicts: spree_digital.gemspec
This commit is contained in:
@@ -6,6 +6,8 @@ module Spree
|
|||||||
has_attached_file :attachment, :path => ":rails_root/private/digitals/:id/:basename.:extension"
|
has_attached_file :attachment, :path => ":rails_root/private/digitals/:id/:basename.:extension"
|
||||||
|
|
||||||
# TODO: Limit the attachment to one single file. Paperclip supports many by default :/
|
# TODO: Limit the attachment to one single file. Paperclip supports many by default :/
|
||||||
|
|
||||||
|
attr_accessible :variant_id, :attachment
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -27,6 +27,8 @@ module Spree
|
|||||||
self.secret = SecureRandom.hex(15)
|
self.secret = SecureRandom.hex(15)
|
||||||
self.access_counter = 0
|
self.access_counter = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
attr_accessible :digital, :line_item, :secret
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
5
app/views/spree/digitals/_digital.html.erb
Normal file
5
app/views/spree/digitals/_digital.html.erb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<% if digital.attachment_file_name.present? %>
|
||||||
|
<%= digital.attachment_file_name %> (<%= number_to_human_size(digital.attachment_file_size) %>)
|
||||||
|
<% else %>
|
||||||
|
<%=t 'broken_file' %>
|
||||||
|
<% end %>
|
||||||
Reference in New Issue
Block a user