So I am trying to remove a link next to the caption in the email form. However, my Railways Voodoo is clearly very weak. It escapes HTML and I can not understand how to get it. Any sign?
= f.input: email ,: label = gt; "Email" + link_to_remove_fields ("[x]", f)
[edit] Oh and yes, it does the same thing:
= F. Input: email,: label = & gt; "Email # {link_to_remove_fields (" [x] ", f)}"
And here is my helpful method ...
def link_to_add_fields (name , F, association) new_object = f.object.class.reflect_on_association (association) .klass.new fields = f.fields_for (association, new_object ,: child_index = & gt; "new_ # {association}") | Manufacturer | Render (association.ToSecirlize + "_feeds", f => builder) end link_to_function (name, "add_fields (this, \" # {union} \ ", \" # {escape_javascript (field)} \ ") ) End
I had an issue like this, I decided to use it My assistant has the following:
link_to_function (name, "add_fields (this, '# {union}', '# {escape_javascript (field)} \')")
One thing is worth mentioning, when I did this in a Rail 3.1, then I changed the assistant And had to restart the server. It may or may not be true for earlier versions, but it should be worth keeping in mind.
Comments
Post a Comment