You can use blocks as an alternative to the string interpolation with correct usage html_safe
. For example:
<%= link_to '#' do %>
Lorem Ipsum <%= image_tag('/images/menu-arrow-down.gif') %>
<% end %>
More Related Contents:
- file download link in rails
- ActiveRecord OR query
- Multiple objects in a Rails form
- ActiveRecord Query Union
- Rails routing to handle multiple domains on single application
- Rails where condition using NOT NIL
- How to get Twitter-Bootstrap navigation to show active link?
- Deprecated warning for Rails 4 has_many with order
- OpenSSL::SSL::SSLError on Heroku [duplicate]
- Float vs Decimal in ActiveRecord
- ruby/ruby on rails memory leak detection
- “gem install therubyracer -v ‘0.10.2’” on osx mavericks not installing
- What does Rails 3 session_store domain :all really do?
- Rails: Can’t verify CSRF token authenticity when making a POST request
- Is there a way to access method arguments in Ruby?
- Convert Time from one time zone to another in Rails
- Ruby on Rails : symbol as argument in form_for
- Renaming the created_at, updated_at columns of ActiveRecord/Rails
- How do I display Ruby on Rails form validation error messages one at a time?
- Grouping by week/month/etc & ActiveRecord?
- How to configure Ruby on Rails with no database?
- How is spec/rails_helper.rb different from spec/spec_helper.rb? Do I need it?
- Using angularjs with turbolinks
- How to define action with simple form for?
- Rails: “Next post” and “Previous post” links in my show view, how to?
- How to configure Log4r with Rails 3.0.x?
- 403 Forbidden on Rails app w/ Nginx, Passenger
- How to fix “Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5” while server starting
- Ruby on Rails: how do I sort with two columns using ActiveRecord?
- Rails: Order with nulls last