erb
Where should JavaScript with embedded Ruby code go in a Rails 3.1 app?
For a Rails 3.1 app, some of my site wide JavaScript is only included when certain real time,开发者_运维百科 instance specific conditions are met. This means I can\'t put it in the new asset pipeline\[详细]
2023-04-02 22:53 分类:问答Ruby: How to use generate HTML with dynamic values?
I am writing a Ruby script that will generate a large flat HTML menu for my website, I could generate this menu on the fly each time a page loads, but I think doing so is a waste of resources, especia[详细]
2023-04-02 02:07 分类:问答Rails localization: works for t() but not for ActiveRecord attribute
Localization of the Rails3 ERB form for my user_info model works for \"explanation\" but not for \"familyname\":[详细]
2023-04-01 17:59 分类:问答.each method block leaves a hash after end?
im following the tutorial on http://ruby.railstutorial.org/ and im on chapter 10. ive noticed after i do a .each method block it leaves a hash of all the items in the block. why is it doing this? its[详细]
2023-03-30 20:19 分类:问答Rails 3.0 - form_for and fields outside of the current model
When I submit a Photo to a Rails 3.0 photo gallery site. In addition to being able to upload the file, select Album from a drop down list, I need to be able to pass along a list of comma delimited tag[详细]
2023-03-30 15:47 分类:问答undocumented ERB syntax: <%=h ... %>
http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html lists a set of Recognized Tags - however, this list seems incomplete; for one thing it\'s missing the dash variant (<%- ... -%>, w[详细]
2023-03-29 09:18 分类:问答Reference for using ERB templates in a Java app (via JRuby)
I have a legacy Ruby command line tool that uses (user supplied) ERB templates to format data.I am required to rewrite this tool in Java but I need to avoid having everyone rewrite their ERB templates[详细]
2023-03-28 03:48 分类:问答Unwanted whitespace in Erb view
Here\'s my sinatra code: get \'/\' do foo = \'not bar\' erb :index end My layout.erb <html> <head></head>[详细]
2023-03-27 19:31 分类:问答Rails: load table cells two across at a time
This seems like it should be easy, but I can\'t figure out a way to do it. Essentially I want to load (in ERB, from a collection fetched via Rails) an HTML table with cells such that the first row has[详细]
2023-03-26 00:09 分类:问答Whats wrong with my simple If Else?
Im new to RoR/Ruby and i cant seem to get the simplest thing to work. (trust me, ive search google and reread docs, i dont know what wrong)[详细]
2023-03-25 21:16 分类:问答