This is a little unorthodox, but I don't think it should be difficult.
I have a Active Admin form:
form do |f|
f.semantic_errors(*f.object.errors.keys)
f.inputs do
f.input :email
f.input :name
# read-only field that still matches formatting of form
li do
label "Last Update Time<br/>(except password changes)"
div f.object.last_update_time
end
end
f.actions
end
When rendered, the last_update_time
label does not convert the <br/>
into a line break. Similarly, html entity codes such as ©
(the copyright (c)
) aren't converted either.
How can I get html to render in that label?
Stuff I tried that doesn't work:
label "foo<br/>bar".html_safe
label raw("foo<br/>bar")
a block like this (gets an error on
label
: "wrong number of arguments (given 0, expected 1..3)"):label do "foo" br "bar" end
Anybody know the trick?
Try next:
©
must be inside a text_node too like: