We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could I convert below erb to slim?
ERB code
<div class="click" <%= love_type ? "data-review=#{target}" : "data-recommend=#{target}" %> data-logined='<%= sth%>'></div>
I tried...
.click[data-logined="#{sth}" love_type ? data-review="#{target}" : data-recommend="#{target}"]
and
.click data-logined="#{sth}" love_type ? data-review="#{target}" : data-recommend="#{target}"
But not work...
How could I do this writing simple DRY code?
The text was updated successfully, but these errors were encountered:
https://stackoverflow.com/questions/64133581/rails-slim-dynamic-data-tag-attributes/64133966#64133966
I prefer more dynamic way but not worse either.
Works like charm!~
Sorry, something went wrong.
No branches or pull requests
How could I convert below erb to slim?
ERB code
I tried...
and
.click data-logined="#{sth}" love_type ? data-review="#{target}" : data-recommend="#{target}"
But not work...
How could I do this writing simple DRY code?
The text was updated successfully, but these errors were encountered: