Top "Erb" questions

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

What are some tips for debugging Ruby erb files?

Currently, when I get an error on an erb template (for use with HTTPServer/cgi) I do the following: If …

ruby debugging erb rhtml
How to create fixtures (for a Devise user) as a yml.erb in rails (4.1.5)?

Update 3: It seems like this is specific to fixtures in a .yml.erb - even if I have no templated …

ruby-on-rails erb fixtures
Add Class To Body Using ERB In A View - Rails

I've watched this screencast to add a page title when in a view, is there a way I can do …

ruby-on-rails ruby erb
ActionMailer pass local variables to the erb template

I know I could define instance variables e.g: def user_register(username, email) @username = username @email = email mail(:to =&…

ruby-on-rails ruby actionmailer erb local-variables
Rails, jQuery, .js.erb files, JS not executed by the browser

I'm trying to use jQuery, and everything has been great, until now, when I'm trying to render a partial and …

javascript jquery ruby-on-rails ruby erb
YAML with erb is not parsing

Why this yaml file won't parse? --- <% sensor_types = YAML.load_file('db/seed-fixtures/sensor_type.yml') %> <% …

ruby-on-rails ruby yaml erb
How to comment code in Rails views?

As I'm playing with Rails and developing views I often want to comment out code. Simple enough with classes & …

ruby-on-rails comments erb erubis
Conditionally set CSS class

How to convert this ERB code: <div <%= 'class="highlight"' if job.done %>> into Haml code?

ruby sinatra haml erb
What does <%== %> do in rails erb?

I saw this recently, thought it was interesting. But I don't really understand what it does? Ex. I have a …

ruby-on-rails ruby ruby-on-rails-3 erb
Vim html.erb snippets?? snipMate Need a vim tip

When I'm in an html.erb file, I get no snipMate snippets. I would like both HTML and Ruby, or …

ruby-on-rails vim code-snippets erb snipmate