mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
fixes hound alerts
This commit is contained in:
parent
b6daf2648b
commit
241af0620a
1 changed files with 7 additions and 3 deletions
|
@ -62,13 +62,17 @@ class ZipExport < ActiveRecord::Base
|
|||
|
||||
handle_asynchronously :generate_exportable_zip
|
||||
|
||||
private
|
||||
|
||||
def method_missing(m, *args, &block)
|
||||
puts 'Method is missing! To use this zip_export you have to ' \
|
||||
'define a method: genreate_( type )_zip.'
|
||||
object.send(m, *args, &block)
|
||||
'define a method: generate_( type )_zip.'
|
||||
object.public_send(m, *args, &block)
|
||||
end
|
||||
|
||||
private
|
||||
def respond_to_missing?(method_name, include_private = false)
|
||||
method_name.to_s.start_with?(' generate_') || super
|
||||
end
|
||||
|
||||
def fill_content(dir, data, type, options = {})
|
||||
eval("generate_#{type}_zip(dir, data, options)")
|
||||
|
|
Loading…
Reference in a new issue