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

View File

@ -23,7 +23,7 @@ class FileFieldInput < Formtastic::Inputs::FileInput
result = '' result = ''
if source = builder.object.send(method) 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 result = preview << remove_checkbox << url_display
end end
end end