From ba13e398e35c5da4e519799c4cdaf136ef897682 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Fri, 15 Mar 2013 11:12:24 -0400 Subject: [PATCH] make sure the thing has a url to work with --- lib/formtastic-better_file_inputs/file_field_input.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/formtastic-better_file_inputs/file_field_input.rb b/lib/formtastic-better_file_inputs/file_field_input.rb index 8da6a94..ca11b24 100644 --- a/lib/formtastic-better_file_inputs/file_field_input.rb +++ b/lib/formtastic-better_file_inputs/file_field_input.rb @@ -23,7 +23,7 @@ class FileFieldInput < Formtastic::Inputs::FileInput result = '' if source = builder.object.send(method) - if @url = source.url + if source.respond_to?(:url) and @url = source.url result = preview << remove_checkbox << url_display end end