im new for ruby on rails. i have 3 question
- how to i translate the html code
in controllers i set
def index
@sentence = "Halo<br>worlds";
end
in index.html.erb display i set
<%= @sentence %>
but display
Halo<br>world
how do i make it like this
halo
world
- how do i set onclick in submit button? i already tried set the button like this <%= submit_tag "back", onclick: "window.history.back();" %>
but the result is not go to previous page. but excetude the form..
- how i can make an validation form if the validation code is in controllers. not in model
`. As for the other questions these are really 3 **very** separate questions (rails rendering, javascript, and server side code) and I would recommend doing a little research and then if you still cannot figure it our come back and ask them as separate questions. – engineersmnky Jul 16 '18 at 15:50