# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=854

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 855

---

## [A newbie question](https://www.ruby-forum.com/t/a-newbie-question/173002)

<div class="topic-metadata">

**Author:** [@archangel77](https://www.ruby-forum.com/u/archangel77)\
**Replies:** 4\
**Last updated:** [July 31, 2009, 3:38pm UTC](https://www.ruby-forum.com/t/a-newbie-question/173002 "2009-07-31T15:38:33Z")

</div>

I’m new with Rails and I’m creating a simple app. I have these 3 files and would like to display an error message when the form fails, saying the problem. Something like ‘Title must be filled.’ . I don’t know how to …

---

## [Unexpected 'nil' in rails upload application](https://www.ruby-forum.com/t/unexpected-nil-in-rails-upload-application/172371)

<div class="topic-metadata">

**Author:** [@GuruOne](https://www.ruby-forum.com/u/GuruOne)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/unexpected-nil-in-rails-upload-application/172371 "2009-07-31T15:26:15Z")

</div>

Hi All, Please help. I am sure there is something obvious I am overlooking in the code but I cannot see it. Please note, as detailed below, I am on Bluehost using Rails 2.2.2. The code is example code from TutorialsP…

---

## [Offline documentation for ruby on rails](https://www.ruby-forum.com/t/offline-documentation-for-ruby-on-rails/172966)

<div class="topic-metadata">

**Author:** [@aashishkiran](https://www.ruby-forum.com/u/aashishkiran)\
**Replies:** 8\
**Last updated:** [July 31, 2009, 1:22pm UTC](https://www.ruby-forum.com/t/offline-documentation-for-ruby-on-rails/172966 "2009-07-31T13:22:45Z")

</div>

hi, can any one tell how to generate Offline documentation for ruby on rails on windows

---

## [Path from db as string not evaluated](https://www.ruby-forum.com/t/path-from-db-as-string-not-evaluated/161978)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 11:40am UTC](https://www.ruby-forum.com/t/path-from-db-as-string-not-evaluated/161978 "2009-07-31T11:40:38Z")

</div>

Hey, my menu is stored in the database like that: name path Home root\_path Users users\_path and I create the links with link\_to\_remote: \<%= link\_to\_remote navigation.name, :url =\> navigation.targe…

---

## [Problem with jquery ajax call and js.rjs code](https://www.ruby-forum.com/t/problem-with-jquery-ajax-call-and-js-rjs-code/172979)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 11:34am UTC](https://www.ruby-forum.com/t/problem-with-jquery-ajax-call-and-js-rjs-code/172979 "2009-07-31T11:34:29Z")

</div>

On one of my pages, i make a remote request to the update action of my school\_subscribers controller with a jquery ajax call. In my log, i can see that the action executes fine, and the corresponding js.rjs file is ev…

---

## [How do I stop a browser prompting with past options](https://www.ruby-forum.com/t/how-do-i-stop-a-browser-prompting-with-past-options/172994)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 11:06am UTC](https://www.ruby-forum.com/t/how-do-i-stop-a-browser-prompting-with-past-options/172994 "2009-07-31T11:06:21Z")

</div>

Browsers try to be helpful and remember that when you’ve filled in an input field named “email” before it’s been with “removed\_email\_address@domain.invalid” and they’ll suggest that entry again. If you’ve used many di…

---

## [Rails 2.3.x and active\_scaffold Installation](https://www.ruby-forum.com/t/rails-2-3-x-and-active-scaffold-installation/172946)

<div class="topic-metadata">

**Author:** [@seenu](https://www.ruby-forum.com/u/seenu)\
**Replies:** 8\
**Last updated:** [July 31, 2009, 9:52am UTC](https://www.ruby-forum.com/t/rails-2-3-x-and-active-scaffold-installation/172946 "2009-07-31T09:52:34Z")

</div>

Hi, I have upgraded to rails 2.3 and active\_scaffold plugin is not working. when i run this command it creates a active\_sacaffold folder in vendor/ plugins, but its an empty folder. I googled but found no way to ins…

---

## [To\_xml](https://www.ruby-forum.com/t/to-xml/172971)

<div class="topic-metadata">

**Author:** [@wouter](https://www.ruby-forum.com/u/wouter)\
**Replies:** 5\
**Last updated:** [July 31, 2009, 7:15am UTC](https://www.ruby-forum.com/t/to-xml/172971 "2009-07-31T07:15:08Z")

</div>

Hey all, I have some problems creating a rendered xml file this is my source def show\_friends @profile = Profile.find(user) @list = @profile.send(‘friends’).find(:all, :limit =\> 20, :order =\> ‘RAND()’) @checkin = …

---

## [How to display data in grid format?](https://www.ruby-forum.com/t/how-to-display-data-in-grid-format/172958)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 2\
**Last updated:** [July 31, 2009, 7:04am UTC](https://www.ruby-forum.com/t/how-to-display-data-in-grid-format/172958 "2009-07-31T07:04:50Z")

</div>

Hi all, I have a problem that i want to print data in grid (table format) following is my partial file named “\_coupon.haml.html” -coupon\_template.each do |template\_data| -coupon.initializeFromTemplate(template\_data) …

---

## [Script/plugin install with github](https://www.ruby-forum.com/t/script-plugin-install-with-github/172973)

<div class="topic-metadata">

**Author:** [@joelmahoney](https://www.ruby-forum.com/u/joelmahoney)\
**Replies:** 9\
**Last updated:** [July 31, 2009, 5:59am UTC](https://www.ruby-forum.com/t/script-plugin-install-with-github/172973 "2009-07-31T05:59:04Z")

</div>

Hello, since switching from svn to git, I’m having trouble using script/ plugin install with github plugins. here’s what happens: script/plugin install git://github.com/thoughtbot/paperclip.git Initialized empty Gi…

---

## [Synchron user-request without reloading the site or the controller](https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 31, 2009, 5:55am UTC](https://www.ruby-forum.com/t/synchron-user-request-without-reloading-the-site-or-the-controller/173003 "2009-07-31T05:55:33Z")

</div>

Hello, I have a controller which gets some data from a user (through a form) and the it compute the user data and get an result. Depends on the result I want to make a request (for example: a simple popup) and the us…

---

## [Model -\> model validations](https://www.ruby-forum.com/t/model-model-validations/172861)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 12\
**Last updated:** [July 31, 2009, 3:29am UTC](https://www.ruby-forum.com/t/model-model-validations/172861 "2009-07-31T03:29:15Z")

</div>

If I have a site model that has\_many :equipments, how would I validate the equipment only when ceratin conditions exist in the site model? I add the equipment dynamically in the Site form and also the form will not ne…

---

## [How to structure a database table with arbitrary labels for the columns?](https://www.ruby-forum.com/t/how-to-structure-a-database-table-with-arbitrary-labels-for-the-columns/172983)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 2:40am UTC](https://www.ruby-forum.com/t/how-to-structure-a-database-table-with-arbitrary-labels-for-the-columns/172983 "2009-07-31T02:40:04Z")

</div>

I am starting to think about writing an RoR app to store some 2-D data. Most of the data are textual, although there could be a column of dates or a column of numbers here and there. The issue is: different data set…

---

## [Problem with adding a new column to table](https://www.ruby-forum.com/t/problem-with-adding-a-new-column-to-table/172984)

<div class="topic-metadata">

**Author:** [@jj46](https://www.ruby-forum.com/u/jj46)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 1:49am UTC](https://www.ruby-forum.com/t/problem-with-adding-a-new-column-to-table/172984 "2009-07-31T01:49:09Z")

</div>

hi everyone. ok i have a little problem. I created a simple blog + comments system. i followd ryan bates tutorial on that one, maybe you’ve checked that screencast out once. anyway, i added a new colum to my comments…

---

## [Problem with implicit multipart emails using ActionMailer in Rails 2.3.3](https://www.ruby-forum.com/t/problem-with-implicit-multipart-emails-using-actionmailer-in-rails-2-3-3/173001)

<div class="topic-metadata">

**Author:** [@sven](https://www.ruby-forum.com/u/sven)\
**Replies:** 0\
**Last updated:** [July 31, 2009, 1:29am UTC](https://www.ruby-forum.com/t/problem-with-implicit-multipart-emails-using-actionmailer-in-rails-2-3-3/173001 "2009-07-31T01:29:50Z")

</div>

With earlier versions of Rails ActionMailer used to implicitly send multipart (text/plain and text/html) email messages for me, but it looks like now it’s sending two text/plain parts. Simplified details: Here’s my m…

---

## [Hidden\_field with nested attributes problem](https://www.ruby-forum.com/t/hidden-field-with-nested-attributes-problem/172998)

<div class="topic-metadata">

**Author:** [@Bob\_O](https://www.ruby-forum.com/u/Bob_O)\
**Replies:** 0\
**Last updated:** [July 31, 2009, 1:24am UTC](https://www.ruby-forum.com/t/hidden-field-with-nested-attributes-problem/172998 "2009-07-31T01:24:34Z")

</div>

ive been able to get nested attributes to work before. but only with a has\_many Im having problems with hidden fields and nested attributes model - owner.rb belongs\_to :ticket belongs\_to :employee model - ticket.rb …

---

## [How would you manipulate a column's attributes?](https://www.ruby-forum.com/t/how-would-you-manipulate-a-columns-attributes/172996)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 4\
**Last updated:** [July 31, 2009, 12:06am UTC](https://www.ruby-forum.com/t/how-would-you-manipulate-a-columns-attributes/172996 "2009-07-31T00:06:09Z")

</div>

Is there a way to do this correctly; here’s my “Person” model: def name name.gsub(“Jr.”, “Junior”) end I have a “name” column in my database, and I want to replace “Jr.” with “Junior” every time @person.name is call…

---

## [Problem loading plugin that depends on another plugin](https://www.ruby-forum.com/t/problem-loading-plugin-that-depends-on-another-plugin/172993)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [July 30, 2009, 11:39pm UTC](https://www.ruby-forum.com/t/problem-loading-plugin-that-depends-on-another-plugin/172993 "2009-07-30T23:39:48Z")

</div>

I am trying to extract some code I have written into a plugin (an engine actually, since I want to share the views to new apps). I really like the organization I see in the new Clearance engine - esp with respect to h…

---

## [Print UPS labels - Rails plugin or available web service?](https://www.ruby-forum.com/t/print-ups-labels-rails-plugin-or-available-web-service/172986)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 3\
**Last updated:** [July 30, 2009, 10:58pm UTC](https://www.ruby-forum.com/t/print-ups-labels-rails-plugin-or-available-web-service/172986 "2009-07-30T22:58:15Z")

</div>

Does anyone know of a Rails plugin or an available web service that allows for printing UPS shipping labels?

---

## [Request.env.to\_hash.to\_json breaking](https://www.ruby-forum.com/t/request-env-to-hash-to-json-breaking/172992)

<div class="topic-metadata">

**Author:** [@subv3](https://www.ruby-forum.com/u/subv3)\
**Replies:** 0\
**Last updated:** [July 30, 2009, 10:19pm UTC](https://www.ruby-forum.com/t/request-env-to-hash-to-json-breaking/172992 "2009-07-30T22:19:02Z")

</div>

Hi, I’ve been on this for a bit now trying to find out why this breaks but I can’t. Hopefully someone else will have some idea. I’ve been compiling a hash of which one of the objects is request.env. I then call #to\_j…

---

## [Time.now and 1.day.ago style comparison](https://www.ruby-forum.com/t/time-now-and-1-day-ago-style-comparison/172990)

<div class="topic-metadata">

**Author:** [@will](https://www.ruby-forum.com/u/will)\
**Replies:** 3\
**Last updated:** [July 30, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/time-now-and-1-day-ago-style-comparison/172990 "2009-07-30T21:50:56Z")

</div>

Hi, I’m trying to use the ActiveSupport Time extension but running into a bit of trouble with the time zone. I’d like to test if a user record has expired using the Time .ago method, such as: def expired return tru…

---

## [Can I turn off config.action\_view.cache\_template\_loading in Production](https://www.ruby-forum.com/t/can-i-turn-off-config-action-view-cache-template-loading-in-production/172975)

<div class="topic-metadata">

**Author:** [@jebw](https://www.ruby-forum.com/u/jebw)\
**Replies:** 2\
**Last updated:** [July 30, 2009, 9:35pm UTC](https://www.ruby-forum.com/t/can-i-turn-off-config-action-view-cache-template-loading-in-production/172975 "2009-07-30T21:35:42Z")

</div>

I’ve got an app which users can edit the ERB templates for emails, the changes aren’t taking effect till the app restarts though because config.action\_view.cache\_template\_loading = true I’ve seen various comments that…

---

## [Data Modeling (sorry - sort of long)](https://www.ruby-forum.com/t/data-modeling-sorry-sort-of-long/172961)

<div class="topic-metadata">

**Author:** [@Marion\_T](https://www.ruby-forum.com/u/Marion_T)\
**Replies:** 8\
**Last updated:** [July 30, 2009, 8:41pm UTC](https://www.ruby-forum.com/t/data-modeling-sorry-sort-of-long/172961 "2009-07-30T20:41:05Z")

</div>

Hello I am not a developer. I have a project that I plan to have developed (in RoR) for a web-application to offer as a SaaS, and have spoken with several developers, but, until I have confirmed interest in the proje…

---

## [Complex finds - part 2](https://www.ruby-forum.com/t/complex-finds-part-2/172850)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 17\
**Last updated:** [July 30, 2009, 8:35pm UTC](https://www.ruby-forum.com/t/complex-finds-part-2/172850 "2009-07-30T20:35:24Z")

</div>

I am learning new, was comfortable with 1.2.x I always used Ezra’s ez-where plugin for finds, especially complex finds but I see it hasn’t been updated since 2006 so I am real leery to start with it now on a new proje…

---

## [Form Tags](https://www.ruby-forum.com/t/form-tags/172974)

<div class="topic-metadata">

**Author:** [@pmckinstry](https://www.ruby-forum.com/u/pmckinstry)\
**Replies:** 4\
**Last updated:** [July 30, 2009, 8:13pm UTC](https://www.ruby-forum.com/t/form-tags/172974 "2009-07-30T20:13:09Z")

</div>

This is a total newbie question, so my apologies! I am learning Ruby from the book Ruby for rails - the only issue is the examples seem to have been written in a earlier version of Ruby. The code in question is \<%= f…

---

## [Rails Plugin for swfobject? - swf\_fu](https://www.ruby-forum.com/t/rails-plugin-for-swfobject-swf-fu/172972)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 1\
**Last updated:** [July 30, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/rails-plugin-for-swfobject-swf-fu/172972 "2009-07-30T19:59:28Z")

</div>

Hi all, I’ve been using a plugin called swf\_fu which seemed fairly easy to implement for adding flash content to my rails app. However, I’m trying to pass a variable to my flash through rails and have the flash conte…

---

## [After matching a regexp, how can I modify the pre-match string?](https://www.ruby-forum.com/t/after-matching-a-regexp-how-can-i-modify-the-pre-match-string/172734)

<div class="topic-metadata">

**Author:** [@nik](https://www.ruby-forum.com/u/nik)\
**Replies:** 10\
**Last updated:** [July 30, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/after-matching-a-regexp-how-can-i-modify-the-pre-match-string/172734 "2009-07-30T19:27:29Z")

</div>

Hello All! I have a string: str = “xxxy” and a regular expression: re=/y/ I know that if I do a gsub!, the variable that gets passed into the block acts as the matched string in str; and I can do something to this…

---

## [Store search paramters in database based on the current\_user](https://www.ruby-forum.com/t/store-search-paramters-in-database-based-on-the-current-user/172938)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 3\
**Last updated:** [July 30, 2009, 6:07pm UTC](https://www.ruby-forum.com/t/store-search-paramters-in-database-based-on-the-current-user/172938 "2009-07-30T18:07:51Z")

</div>

Hi, This is my log-file output of the usercontroller. Processing UsersController#index (for 92.64.217.3 at 2009-07-30 08:57:46) \[GET\] Parameters: {“commit”=\>“Search”, “date”=\>"", “arrival”=\>“barcelona”, “departure”=\>…

---

## [How secure are sessions?](https://www.ruby-forum.com/t/how-secure-are-sessions/172891)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 7\
**Last updated:** [July 30, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/how-secure-are-sessions/172891 "2009-07-30T17:49:03Z")

</div>

I have read a number of different tutorials that talk about adding a login page to an application that all contain very similar wording: “Of course, you would log in over an SSL connection”. And I understand the theo…

---

## [Rails, gmail client and mass-emailing failure](https://www.ruby-forum.com/t/rails-gmail-client-and-mass-emailing-failure/172967)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 0\
**Last updated:** [July 30, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/rails-gmail-client-and-mass-emailing-failure/172967 "2009-07-30T16:53:49Z")

</div>

Hello, I build from scratch an email componenent to my webapp using actionmailer. All my single email went to destination, but when I try to send mass-emailing from the console, it sends few then crash as follow : A…

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=853)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=855)
