make sure the thing has a url to work with

This commit is contained in:
John Bintz 2013-03-15 11:12:24 -04:00
parent fea104d73f
commit ba13e398e3
1 changed files with 1 additions and 1 deletions

View File

@ -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