diff --git a/lib/pmacs_refile/attacher.rb b/lib/pmacs_refile/attacher.rb index 819cad5..cb21838 100644 --- a/lib/pmacs_refile/attacher.rb +++ b/lib/pmacs_refile/attacher.rb @@ -145,7 +145,7 @@ def delete! end def remove? - remove and remove != "" and remove !~ /\A0|false$\z/ + remove and remove != "" and remove.to_s !~ /\A0|false$\z/ end def present? diff --git a/lib/pmacs_refile/backend_macros.rb b/lib/pmacs_refile/backend_macros.rb index 3e14f45..3cbce85 100644 --- a/lib/pmacs_refile/backend_macros.rb +++ b/lib/pmacs_refile/backend_macros.rb @@ -35,7 +35,7 @@ def verify_uploadable(method) end def valid_id?(id) - id =~ /\A[a-z0-9]+\z/i + id.to_s =~ /\A[a-z0-9]+\z/i end def decode_id(id)