ruby on rails - content_tag does return blank -


i have problem content_tag helper, piece of code

  def renderize(place_holder)     content_tag(:div, "hello")       @raw_estimate.field_estimates.where(:field_position_id => fieldposition.where(:place_holder => place_holder).first).each |field|         if field.field_type.alias == "input"           content_tag :div             field.is_validate ? label_value = "*#{field.name}" : label_value = field.name             content_tag(:label_tag, label_value) +             text_field_tag("estimate[field_#{field.name.downcase.gsub(/\w+/, '')}]")           end         end       end     end   end 

does not return anything, missing? thank you

don't use each interacting array, use collect will return array of rendered tags see http://apidock.com/rails/actionview/helpers/taghelper/content_tag last few comments


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -