How do I sort in Rails view but without displaying any duplicate values? I have the following ERB code.
I want to wrap some content in HTML in a Rails 3 helper so that in my view I can do this: <%= rounded_box do-%>
How can I insert empty ERB tags and put cursor inside it? It is similar to surrounding with surround plugin, but there is nothing to surround.
My goal is to generate a directory of static html, javascript, and image files within my Rails (3) app, driven by ERB templates. For example, as a developer I might want to generate/update these files
I have a js.erb template with the following code: var latlng = new google.maps.LatLng(<%= session[:lat] %>, <%= session[:lng] %>);
By default, when an an Erubis template raises an error, you get something like this: (erubis):32:in `evaluate\': compile error (SyntaxError)
I have this script for generating config files. I am using ruby and its builtin ERB. some of my templates consists of specific formats, spaces, braces etc
I have a collection of objects. There are 3 properties in each object \'id\', \'name\', \'is_primary\'
I have two models: user and transaction. Transactions table has user_id column for storing the id of the user responsible for transaction.
This SHOULD be trivially easy, but doesn\'t seem to be in Rails... we need to gather text input from the user of no more than 200 chars.