Shadowfiend-scribd_fu 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/attachment_fu/methods.rb +1 -1
- data/lib/scribd_fu.rb +2 -2
- data/lib/scribd_fu_helper.rb +2 -2
- data/scribd_fu.gemspec +1 -1
- metadata +1 -1
@@ -45,7 +45,7 @@ module ScribdFu
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
|
-
alias_method :
|
48
|
+
alias_method :destroy_scribd_documents, :destroy_scribd_document
|
49
49
|
|
50
50
|
# Uploads the attachment to scribd for processing.. This is called
|
51
51
|
# +before_validation+, as set up by ScribdFu::ClassMethods#extended.
|
data/lib/scribd_fu.rb
CHANGED
@@ -14,7 +14,7 @@ module ScribdFu
|
|
14
14
|
'application/vnd.oasis.opendocument.spreadsheet',
|
15
15
|
'application/vnd.sun.xml.writer',
|
16
16
|
'application/vnd.sun.xml.impress',
|
17
|
-
'application/vnd.sun.xml.calc'
|
17
|
+
'application/vnd.sun.xml.calc'
|
18
18
|
# OOXML, AKA `the MIME types from hell'. Seriously, these are long enough to
|
19
19
|
# start their own dictionary...
|
20
20
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
@@ -87,7 +87,7 @@ module ScribdFu
|
|
87
87
|
if self.respond_to?(:is_public) && self.is_public != nil
|
88
88
|
scribd_access = self.is_public ? 'public' : 'private'
|
89
89
|
else
|
90
|
-
scribd_access = scribd_config['access']
|
90
|
+
scribd_access = scribd_config[:scribd]['access']
|
91
91
|
end
|
92
92
|
|
93
93
|
scribd_access
|
data/lib/scribd_fu_helper.rb
CHANGED
@@ -17,7 +17,7 @@ module ScribdFuHelper
|
|
17
17
|
# <%= display_scribd user, :biography, 'You need Flash for biographies." %>
|
18
18
|
def display_scribd(object, alt_text_or_attribute = '', alt_text_if_paperclip = nil)
|
19
19
|
# Resolve the right scribd ID, access key, and alt text.
|
20
|
-
if object.
|
20
|
+
if object.method_defined?("scribd_id")
|
21
21
|
scribd_id = object.scribd_id
|
22
22
|
scribd_ak = object.scribd_access_key
|
23
23
|
|
@@ -33,7 +33,7 @@ module ScribdFuHelper
|
|
33
33
|
<script type=\"text/javascript\" src=\"http://www.scribd.com/javascripts/view.js\"></script>
|
34
34
|
<div id=\"embedded_flash\">#{alt_text}</div>
|
35
35
|
<script type=\"text/javascript\">
|
36
|
-
var scribd_doc = scribd.Document.getDoc(#{scribd_id}, '#{
|
36
|
+
var scribd_doc = scribd.Document.getDoc(#{scribd_id}, '#{scribd_access_key}');
|
37
37
|
scribd_doc.write(\"embedded_flash\");
|
38
38
|
</script>
|
39
39
|
END
|
data/scribd_fu.gemspec
CHANGED