-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I want to know if there is a good compatible api that supports erb and javascript highlighting.
I've already tried Eclipse with Aptana RadRails.
Perhaps I'm configuring something wrong, but it guesses that I'm using html.erb on both css.erb and js.erb files.
I've tried too the Emacs with js2-mode…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm not sure I understand the difference between the html.erb files and erb files in the views for a Ruby on Rails application. (Similarly for haml files.)
What are the dis/advantages of each (html.erb/haml or erb/haml) files?
PS I'm not asking about the difference between the erb and haml files…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
So I have a webserver I've built using sinatra, the meat of which goes like this:
set :variable,"value"
get '/' do
erb :index
end
And, of course, the template in views/index.erb which looks something like this:
<html>
<!-- etc -->
<ul>
<% my_array.each do |thing| %>
…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi
How can I use yield for template inheritance in erb? I want to use erb in a plain ruby CGI script and want to use a base template and subtemplate like it Rails with the application template does.
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
A very simple HTML in my .erb file:
<a href="javascript:void(0)" id="xyz">Click</a>
But when browsing this code in the browser, I get the link which text is:
Click (javascript:void(0)).
Could you please help me explain why it is? Thanks much for your help.
My development environment:
Ruby…
>>> More