def check_collection(collection,partial_array,msg)
if collection.empty?
msg
else
partial_array.each do |partial|
render :partial => partial
end
end
end
Have you tried render :partial => partial_name, :collection =>
partial_array? I dunno that it’ll work in a helper but it’s the way to
do
what you’re doing outside of one. Might work inside as well.
Have you tried render :partial => partial_name, :collection =>
partial_array? I dunno that it’ll work in a helper but it’s the way to
do
what you’re doing outside of one. Might work inside as well.
RSL
Thanks for na anwser but this doesnt seem to work also
def check_collection(collection,partial_array,msg)
if collection.empty?
msg
else
partial_array.each do |partial|
render :partial => partial
end
end
end
you can create a string (str_output for example) and then do something
like
str_output+= render_to_string (:partial=>partial)
finally put at the end of the helper “str_output”, so that will be your
return value.
regards,
javier ramirez
Estamos de estreno… si necesitas llevar el control de tus gastos
visita http://www.gastosgem.com !!Es gratis!!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.