0

Is it possible to integrate dynamic background in view?

<div style="background-image:url(rvr.profile_pic_url(:avatar).to_s)">

I'm not getting this correctly... i tried googling, but nothing pops up. This might be simple?

Thanks

1 Answer 1

1

Try using an erb tag in there instead:

<div style="background-image:url(<%= rvr.profile_pic_url(:avatar).to_s %>)">
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.