Top "Erb" questions

ERB is a simple templating system for Ruby, embedding code in any plain-text document.

Print in ERB without <%=?

Sometimes it's more convenient to print in <%%>. How to do it in Rails?

ruby-on-rails erb
ERB Template removing the trailing line

I have an ERB template for sending an email. Name: <%= @user.name %> <% if @user.phone.present? %> …

ruby-on-rails erb
erb in coffee script with rails 3.1

I would like to use some erb in my .coffee files, like the following example myLatlng: new google.maps.LatLng(&…

ruby-on-rails erb coffeescript
Handling JSON in JS/ERB template in Rails 3

I have no trouble making typical AJAX calls to and from Rails(3) with JSON objects and jQuery-rails (jQuery library plus …

jquery ruby-on-rails ajax json erb
echo if variable is defined in ruby/erb

Possible Duplicate: Checking if a variable is defined in Ruby using Tilt's template render method, I pass in #... t setup ... …

ruby erb
simple_form with Bootstrap check box

I'm using simple_form with Bootstrap and I would like to have my "Remember me" check box be inline to …

ruby twitter-bootstrap erb simple-form
Rails - default value in text_field but only for new_record?

On a Content model have an attribute named slug. When creating a new record, I want to use a helper …

ruby-on-rails erb
Rails js.erb file cannot find method "render"

I've got the following code in a Javascript ERB file: $(document).ready(function() { $("#workout-week").append( <%= escape_javascript(render :partial =&…

javascript ruby-on-rails ruby erb
How do I escape the ERB tag in ERB

I have a simple fixture.yml file: label: body: "<%= variable %>" The issue is that the ERB code is …

ruby-on-rails unit-testing erb fixture
How can I convert html.slim files to html or html.erb?

I need to convert the html.slim files in my Ruby on Rails application to html.erb. Is there any …

html converter erb slim-lang