# Rails

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

[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:** 1525

---

## [Link\_to\_remote patterns/idiom](https://www.ruby-forum.com/t/link-to-remote-patterns-idiom/126883)

<div class="topic-metadata">

**Author:** [@corywilkerson](https://www.ruby-forum.com/u/corywilkerson)\
**Replies:** 1\
**Last updated:** [January 23, 2008, 2:47am UTC](https://www.ruby-forum.com/t/link-to-remote-patterns-idiom/126883 "2008-01-23T02:47:08Z")

</div>

All, What’s the current line of thinking wrt patterns/best practices for remote calls and subsequent page updates? For instance, let’s say I have a simple link\_to\_remote call that simple creates a new comment for a g…

---

## [What exactly does an .html.erb file do?](https://www.ruby-forum.com/t/what-exactly-does-an-html-erb-file-do/126878)

<div class="topic-metadata">

**Author:** [@revanche](https://www.ruby-forum.com/u/revanche)\
**Replies:** 1\
**Last updated:** [January 23, 2008, 2:22am UTC](https://www.ruby-forum.com/t/what-exactly-does-an-html-erb-file-do/126878 "2008-01-23T02:22:34Z")

</div>

Hi everyone, I’ve been setting up a web application on my host (mediatemple) using the restful\_authentication with the guidance offered by a few help files and the video from Railscast. Everything went fine with the …

---

## [HTML 5 differences from HTML 4](https://www.ruby-forum.com/t/html-5-differences-from-html-4/126870)

<div class="topic-metadata">

**Author:** [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Replies:** 2\
**Last updated:** [January 23, 2008, 2:01am UTC](https://www.ruby-forum.com/t/html-5-differences-from-html-4/126870 "2008-01-23T02:01:32Z")

</div>

http://www.w3.org/TR/2008/WD-html5-diff-20080122/ Some interesting stuff, especially the section about New Elements/INPUT I note also that ‘accesskey’ has gone from ‘button’, and a lot of changes that move attributes &…

---

## [Restful\_authentication: Why are columns I add to user table never populated?](https://www.ruby-forum.com/t/restful-authentication-why-are-columns-i-add-to-user-table-never-populated/126837)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [January 23, 2008, 1:58am UTC](https://www.ruby-forum.com/t/restful-authentication-why-are-columns-i-add-to-user-table-never-populated/126837 "2008-01-23T01:58:02Z")

</div>

Hi, I’m using the restful\_authentication plugin that I downloaded from here – http://agilewebdevelopment.com/plugins/. I wanted to use the plugin with an existing table I have, which has a column named “user\_type\_id…

---

## [Attachment\_fu problems on updates](https://www.ruby-forum.com/t/attachment-fu-problems-on-updates/123090)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 4\
**Last updated:** [January 23, 2008, 1:46am UTC](https://www.ruby-forum.com/t/attachment-fu-problems-on-updates/123090 "2008-01-23T01:46:48Z")

</div>

On the creation of a member the member’s picture uploads as it should. However, when updating the member, while selecting a new picture, an error is thrown: can’t convert nil into String RAILS\_ROOT: /Users/chris/Docu…

---

## [Validates\_numericality\_of accepts true, is this right?](https://www.ruby-forum.com/t/validates-numericality-of-accepts-true-is-this-right/126844)

<div class="topic-metadata">

**Author:** [@apramanik](https://www.ruby-forum.com/u/apramanik)\
**Replies:** 3\
**Last updated:** [January 23, 2008, 1:44am UTC](https://www.ruby-forum.com/t/validates-numericality-of-accepts-true-is-this-right/126844 "2008-01-23T01:44:01Z")

</div>

Is validates\_numericality\_of supposed to accept true as a value for the following options class Location \< ActiveRecord::Base validates\_numericality\_of :longitude, :allow\_nil =\> true, :greater\_than\_or\_equal\_to = -180…

---

## [Assert\_select\_rjs behaving strangely](https://www.ruby-forum.com/t/assert-select-rjs-behaving-strangely/126511)

<div class="topic-metadata">

**Author:** [@eric](https://www.ruby-forum.com/u/eric)\
**Replies:** 2\
**Last updated:** [January 23, 2008, 1:34am UTC](https://www.ruby-forum.com/t/assert-select-rjs-behaving-strangely/126511 "2008-01-23T01:34:40Z")

</div>

Before, I had this in my RJS template: page\['order'\].replace\_html :partial =\> 'order' When I use assert\_select\_rjs as follows: assert\_select\_rjs :replace\_html, 'order' I get the error: No RJS statement that replaces…

---

## [Populating oracle db data for radio button on the view](https://www.ruby-forum.com/t/populating-oracle-db-data-for-radio-button-on-the-view/126871)

<div class="topic-metadata">

**Author:** [@backz](https://www.ruby-forum.com/u/backz)\
**Replies:** 0\
**Last updated:** [January 23, 2008, 12:34am UTC](https://www.ruby-forum.com/t/populating-oracle-db-data-for-radio-button-on-the-view/126871 "2008-01-23T00:34:52Z")

</div>

Hi, I am trying to populate data from oracle database table and all text fields and text areas work fine. But radio buttons does not get populated. For example, \<%= radio\_button(“attending\_ip”, ‘service’, ‘NBU’) %\>N…

---

## [Cruft in development.log](https://www.ruby-forum.com/t/cruft-in-development-log/246515)

<div class="topic-metadata">

**Author:** [@Pito](https://www.ruby-forum.com/u/Pito)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/cruft-in-development-log/246515 "2008-01-22T23:43:56Z")

</div>

Can someone tell me why, in addition to the useful error, I get all this other cruft and in my development.log and how I might get rid of it? ------ GOOD STUFF ------- Processing UsersController#show (for 127.0.0.1 a…

---

## [Ruby on Rails Carousel?](https://www.ruby-forum.com/t/ruby-on-rails-carousel/126862)

<div class="topic-metadata">

**Author:** [@philthompson](https://www.ruby-forum.com/u/philthompson)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-carousel/126862 "2008-01-22T23:39:16Z")

</div>

Hi, Does anyone have any experience using the prototype carousel from here http://prototype-carousel.xilinus.com/ originally from Bill Scott but adapted by Sebastien Gruhier for RoR… The problem is that I can’t get i…

---

## [Using Variables after Find](https://www.ruby-forum.com/t/using-variables-after-find/126860)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 5\
**Last updated:** [January 22, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/using-variables-after-find/126860 "2008-01-22T23:27:58Z")

</div>

Hello, I am still new to RoR and I’m having a very basic problem… Ok, so I can display all the results of two different tables by calling (in my case) @bes = Bes.find(:all) @prov = Import.find(:all) This works grea…

---

## [When "controller" is created?](https://www.ruby-forum.com/t/when-controller-is-created/126857)

<div class="topic-metadata">

**Author:** [@sayoyo](https://www.ruby-forum.com/u/sayoyo)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/when-controller-is-created/126857 "2008-01-22T23:19:17Z")

</div>

Hi, Does anyone know when exactly the “controller” objects are created in rails? when the http server starts? or when it is answering a http request? or … thanks you very much. Sayoyo

---

## [Mini cms functionality within an app](https://www.ruby-forum.com/t/mini-cms-functionality-within-an-app/126791)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 7\
**Last updated:** [January 22, 2008, 11:08pm UTC](https://www.ruby-forum.com/t/mini-cms-functionality-within-an-app/126791 "2008-01-22T23:08:10Z")

</div>

I need a sort of mini cms function in my app, allow a user to alter the content of the site (nothin too sophisticated). Just want them to be able to alter “fragments” of content on the pages. I do it like this and I k…

---

## [Has\_many seems funky when handling duplicate records](https://www.ruby-forum.com/t/has-many-seems-funky-when-handling-duplicate-records/126749)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [January 22, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/has-many-seems-funky-when-handling-duplicate-records/126749 "2008-01-22T22:50:24Z")

</div>

The following test fails on the last line as firm.clients.length == 2, not 4: def test\_replace\_with\_duplicates firm = Firm.find(:first) c1, c2 = companies(:first\_client),companies(:second\_client) assert\_equal firm.c…

---

## [Cutting off a Character from a String](https://www.ruby-forum.com/t/cutting-off-a-character-from-a-string/126855)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 4\
**Last updated:** [January 22, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/cutting-off-a-character-from-a-string/126855 "2008-01-22T21:49:31Z")

</div>

Hello, I just have a small question - how can I cut off the leading character of a string? For example, in my case, I have a list of telephone numbers with a 1 at the beginning… I need to say that if the string is 11 …

---

## [Earning for reading SMS](https://www.ruby-forum.com/t/earning-for-reading-sms/196579)

<div class="topic-metadata">

**Author:** [@Priyabrata\_Patra](https://www.ruby-forum.com/u/Priyabrata_Patra)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/earning-for-reading-sms/196579 "2008-01-22T21:43:17Z")

</div>

Hello, I found few genuine sites for earning through your mobile. http://www.sms2india.co.in/?user=patrapb http://www.youmint.com/network-patrapb mginger.com - This website is for sale! - mginger Resources and …

---

## [Before Filters](https://www.ruby-forum.com/t/before-filters/126815)

<div class="topic-metadata">

**Author:** [@whitewolfaustria](https://www.ruby-forum.com/u/whitewolfaustria)\
**Replies:** 4\
**Last updated:** [January 22, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/before-filters/126815 "2008-01-22T21:34:59Z")

</div>

Hi all, I am having a slight problem with a before filter. I have a page that calls a before filter to create a set of methods to call my report generator based on if the person has permissions to the report. In d…

---

## [Resizing images for display only with image\_tag()](https://www.ruby-forum.com/t/resizing-images-for-display-only-with-image-tag/126830)

<div class="topic-metadata">

**Author:** [@xobani](https://www.ruby-forum.com/u/xobani)\
**Replies:** 4\
**Last updated:** [January 22, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/resizing-images-for-display-only-with-image-tag/126830 "2008-01-22T21:00:44Z")

</div>

image\_tag() has :size option, but only takes height/width parameters. i want to be able to scale down the image by 50% because all my images are different sizes so i cannot be specific as image\_tag() wants me to be. i…

---

## [MySQL migration: trying to create "not null" boolean column (RoR 2.0)](https://www.ruby-forum.com/t/mysql-migration-trying-to-create-not-null-boolean-column-ror-2-0/126846)

<div class="topic-metadata">

**Author:** [@iledela](https://www.ruby-forum.com/u/iledela)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/mysql-migration-trying-to-create-not-null-boolean-column-ror-2-0/126846 "2008-01-22T20:56:46Z")

</div>

Hello everyone! Disclaimer: I am really, really new to Rails and this is probably a really stupid question, but I have spent SO LONG trying to find an answer and I’ve gotten nowhere. Thanks in advance for indulging m…

---

## [How to pause between mongrel stop and start in "cap deploy"](https://www.ruby-forum.com/t/how-to-pause-between-mongrel-stop-and-start-in-cap-deploy/117253)

<div class="topic-metadata">

**Author:** [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Replies:** 2\
**Last updated:** [January 22, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/how-to-pause-between-mongrel-stop-and-start-in-cap-deploy/117253 "2008-01-22T20:38:58Z")

</div>

Hi! Sometimes when doing “cap deploy”, the process finishes by: \*\* \[out :: unebo\] stopping port 6500 \*\* \[out :: unebo\] already started port 6500 command finished It seems that mongrel didn’t have the time to stop be…

---

## [Boolean values passed to content\_tag?](https://www.ruby-forum.com/t/boolean-values-passed-to-content-tag/126853)

<div class="topic-metadata">

**Author:** [@kevin\_cline](https://www.ruby-forum.com/u/kevin_cline)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/boolean-values-passed-to-content-tag/126853 "2008-01-22T20:20:25Z")

</div>

In Rails 1.2.3, if I call content\_tag(‘input’, :type =\> ‘checkbox’, :checked =\> true, :disabled =\> true), I get \<input type="checkbox" checked="true" disabled="disabled"\> I expected content\_tag to handle all boolean v…

---

## [Prob on Dreamhost](https://www.ruby-forum.com/t/prob-on-dreamhost/126852)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/prob-on-dreamhost/126852 "2008-01-22T20:15:43Z")

</div>

I created a vanilla app on Dreamhost in the hope to at least get “Welcome” to display. the URL I use is www.globalhealthsources.net/sample.com I do a remapping to ~/ ghsrc/sample.com. when I add “public” to path…

---

## [Strange issue with rmagick](https://www.ruby-forum.com/t/strange-issue-with-rmagick/126850)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/strange-issue-with-rmagick/126850 "2008-01-22T20:05:10Z")

</div>

I’m having a problem on my production site where rmagick won’t resize images. The code works on my local machne so I’m wondering what the issue could be. WORKS: Development: Rails 2.0.2, Rmagick 2.1.0, Imagemagick…

---

## [Can't expire cached pages](https://www.ruby-forum.com/t/cant-expire-cached-pages/126847)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 7:59pm UTC](https://www.ruby-forum.com/t/cant-expire-cached-pages/126847 "2008-01-22T19:59:22Z")

</div>

For some reason I can not expire a cached page. I have created a sweeper file and I know that the proper methods are being called. I have also tried just moving the expire\_page call into the controller code, but it …

---

## [Trouble loading rails generated javascript to view](https://www.ruby-forum.com/t/trouble-loading-rails-generated-javascript-to-view/126849)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/trouble-loading-rails-generated-javascript-to-view/126849 "2008-01-22T19:26:04Z")

</div>

I’ve been following Ryan’s recent railscast on creating dynamic select menus using javascript: He suggests the following method to create and load rails generated javascript: create a ‘javascripts’ controller crea…

---

## [Using :db\_file as storage type in attachment\_fu](https://www.ruby-forum.com/t/using-db-file-as-storage-type-in-attachment-fu/126019)

<div class="topic-metadata">

**Author:** [@thehunfromoz](https://www.ruby-forum.com/u/thehunfromoz)\
**Replies:** 6\
**Last updated:** [January 22, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/using-db-file-as-storage-type-in-attachment-fu/126019 "2008-01-22T18:59:51Z")

</div>

I’ve successfully been using attachment\_fu with the :file\_system storage type, but am looking to switch over to using MySQL to store the images instead. First off, the reason I’m thinking of doing this is to hold all…

---

## [Basic Rails... one-to-many and "filtering" using foreign key](https://www.ruby-forum.com/t/basic-rails-one-to-many-and-filtering-using-foreign-key/126799)

<div class="topic-metadata">

**Author:** [@MarcHoeppner](https://www.ruby-forum.com/u/MarcHoeppner)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/basic-rails-one-to-many-and-filtering-using-foreign-key/126799 "2008-01-22T18:52:10Z")

</div>

Hi everyone, my apologies in advance since this is a rather trivial question, I believe. But although I have the Pragmatic Programmers book laying on my desk, I cant quite find a clear answer to the following question…

---

## [Partials, Layouts and Collections](https://www.ruby-forum.com/t/partials-layouts-and-collections/126823)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 6:42pm UTC](https://www.ruby-forum.com/t/partials-layouts-and-collections/126823 "2008-01-22T18:42:10Z")

</div>

Hi All, I am trying to make use of the new render partial functionality where in the index view I have \<%= render :partial =\> @people%\> #in rails 2.0 it detects this as a collection and in the show \<%= render :par…

---

## [Config.action\_controller.session :secret how can I check against it?](https://www.ruby-forum.com/t/config-action-controller-session-secret-how-can-i-check-against-it/126829)

<div class="topic-metadata">

**Author:** [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Replies:** 0\
**Last updated:** [January 22, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/config-action-controller-session-secret-how-can-i-check-against-it/126829 "2008-01-22T16:52:57Z")

</div>

checking against the secret key is performed whenever a POST is sent to my webservice but how can I perform such control for other REST actions like GET I can pass the secret key as a parameter, but it’s not secret …

---

## [Getting multiple select to work: options\_for\_select](https://www.ruby-forum.com/t/getting-multiple-select-to-work-options-for-select/126828)

<div class="topic-metadata">

**Author:** [@truchty](https://www.ruby-forum.com/u/truchty)\
**Replies:** 1\
**Last updated:** [January 22, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/getting-multiple-select-to-work-options-for-select/126828 "2008-01-22T16:45:55Z")

</div>

Hi, \<%= select\_tag ‘image\_id’, options\_for\_select(Image.find(:all) {| an\_image| \[ an\_image.name, an\_image.id \] }), :multiple =\> true %\> I am in a view, and I am trying to search the image table and make a multiple s…

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

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