def fields_for_setting(namespace, name)
id+“namespace”)
id = “settings_#{namespace}#{name}”
fields_for_setting(namespace, name) do |f|
concat f.label :value, label, :index => nil, :for => id+“value”
concat f.text_field :value, :index => nil, :id => id+“value”
end
end
So, I’m concatenating the label and text field inside the
fields_for_setting block. But the fields_for_setting block doesn’t have
any effect at all! I think it’s because fields_for_setting is only returning the
But, come on! There must be a better solution. This doesn’t seem very
idiomatic to me. Nobody got a better idea?
I skipped through most of this thread, so this might be off target,
but have you looked into using Rails’ “capture” helper to get a block
of Haml into a string? Peak Obsession
No, actually I haven’t. Thank you very much for your suggestion. I’m
using that now. (: