I have a bunch of XML files which I use to generate HTML pages. Those pages ultimately get marked up (by hand) with some <%= %> tags and made into Ruby .erb templates.
I am trying to do something when I am connecting tomy own server(local). I found request.env from the website, so I am using that a开发者_如何学编程rray to compare my IPs.
I\'m using a js.erb template to render some jQuery. When editing an html.erb file in TextMate, I frequently use the convenient key combo, ctrl+>, to create and then toggle the following tags:
i am saving some erb in my database and rendering it in the view like this: erb = ERB.new(content) render :text => erb.result
Has anyone comes across a SQL templating engine which allows one to mix SQL with a dynamic language like Ruby or Python?
I don\'t like the way rails does page titles by default (just uses the controller name), so I\'m working on a new way of doing it like so:
I\'d like Textmate to highlight Ruby syntax inside <% %> tags in *.js.erb files (like it does in *.html.erb files). Right now it looks like this:
Firstly, how can I have jQuery continuously check the time, and add an id to a <div> tag if the current time is in between two set times? I\'m making a clock for a school (where the clock is a w
Rals 3.0 My question is using link_to_remote to make an ajax call. 2.3.8 Ajax call <%= link_to_remote image_tag(\"../images/services_button.jpg\", :mouseover =>
in ruby you can do conditional block like so block do |n| puts n end if foo == bar which would translate into erb as