bugfix
This commit is contained in:
parent
5cda866980
commit
fea104d73f
|
@ -20,13 +20,17 @@ class FileFieldInput < Formtastic::Inputs::FileInput
|
||||||
end
|
end
|
||||||
|
|
||||||
def existing_file_info
|
def existing_file_info
|
||||||
if @url = builder.object.send(method).url
|
result = ''
|
||||||
preview << remove_checkbox << url_display
|
|
||||||
else
|
if source = builder.object.send(method)
|
||||||
''
|
if @url = source.url
|
||||||
|
result = preview << remove_checkbox << url_display
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
result
|
||||||
|
end
|
||||||
|
|
||||||
def div_wrapper
|
def div_wrapper
|
||||||
template.content_tag(:div, :style => 'margin-left: 20%') do
|
template.content_tag(:div, :style => 'margin-left: 20%') do
|
||||||
file_field << existing_file_info.html_safe
|
file_field << existing_file_info.html_safe
|
||||||
|
|
Loading…
Reference in New Issue