0

I have the following code in my application.erb.html $alertdiv.text("some message"); but I need to pass in message instead of hard coded message. I need to pass in the notice so I tried doing something like $alertdiv.text(<%= notice %>); but that didn't work

1 Answer 1

1

You still need to wrap the <%= %> tags in quotation marks:

$alertdiv.text("<%= notice %>");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.