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:
Michael Bianco
2012-06-07 10:52:43 -04:00
3 changed files with 10 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ module Spree
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 :/
attr_accessible :variant_id, :attachment
end
end

View File

@@ -27,6 +27,8 @@ module Spree
self.secret = SecureRandom.hex(15)
self.access_counter = 0
end
attr_accessible :digital, :line_item, :secret
end
end

View 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 %>