# Rails

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

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

---

## [How can I make a textbox uneditable?](https://www.ruby-forum.com/t/how-can-i-make-a-textbox-uneditable/133409)

<div class="topic-metadata">

**Author:** [@megax](https://www.ruby-forum.com/u/megax)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/how-can-i-make-a-textbox-uneditable/133409 "2008-03-31T18:17:29Z")

</div>

I want to make this textbox indeitable but im not sure how to use ruby to do this can anyone help? my textbox: \<%= f.text\_field :item\_name %\>

---

## [Ferret gem installation](https://www.ruby-forum.com/t/ferret-gem-installation/133430)

<div class="topic-metadata">

**Author:** [@noratsaraswat](https://www.ruby-forum.com/u/noratsaraswat)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/ferret-gem-installation/133430 "2008-03-31T18:01:49Z")

</div>

Building native extensions. This could take a while… ERROR: While executing gem … (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install ferret creating Makefile …

---

## [iAsk: showing UTC as PST with to\_pst?](https://www.ruby-forum.com/t/iask-showing-utc-as-pst-with-to-pst/133063)

<div class="topic-metadata">

**Author:** [@Rie](https://www.ruby-forum.com/u/Rie)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/iask-showing-utc-as-pst-with-to-pst/133063 "2008-03-31T17:37:36Z")

</div>

Does anybody out there know how to change UTC to PST? I’ve been banging my heads on the wall since yesterday and what I know is only set time to PST instead of UTC. Please help… m:x arie$ script/console Loading devel…

---

## [Pop out a float layer](https://www.ruby-forum.com/t/pop-out-a-float-layer/133272)

<div class="topic-metadata">

**Author:** [@beexk](https://www.ruby-forum.com/u/beexk)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 5:33pm UTC](https://www.ruby-forum.com/t/pop-out-a-float-layer/133272 "2008-03-31T17:33:49Z")

</div>

Does rails has plugin which can pop out a float layer/dialog and make all of the elements in the base page forbidden?(covered by another layer) Or could you give me another guideline to implement it? Thank you very m…

---

## [How to get all the user\_id from Session](https://www.ruby-forum.com/t/how-to-get-all-the-user-id-from-session/133423)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 3\
**Last updated:** [March 31, 2008, 5:28pm UTC](https://www.ruby-forum.com/t/how-to-get-all-the-user-id-from-session/133423 "2008-03-31T17:28:45Z")

</div>

Using session can record users’ id when users log in, like session\[:user\_id\]. If I want to know how many users are online, so how can I get all the users’s id from session? Thanks!

---

## [Best way to serve/upload documents](https://www.ruby-forum.com/t/best-way-to-serve-upload-documents/133395)

<div class="topic-metadata">

**Author:** [@miken700](https://www.ruby-forum.com/u/miken700)\
**Replies:** 3\
**Last updated:** [March 31, 2008, 5:04pm UTC](https://www.ruby-forum.com/t/best-way-to-serve-upload-documents/133395 "2008-03-31T17:04:44Z")

</div>

I have two projects where the entire site’s contents are only available to logged in users. These users can share documents and files. Is there a best practice for handling a situation like this? Is there a way I can…

---

## [Recurring Invoice Logic](https://www.ruby-forum.com/t/recurring-invoice-logic/133195)

<div class="topic-metadata">

**Author:** [@keaja](https://www.ruby-forum.com/u/keaja)\
**Replies:** 3\
**Last updated:** [March 31, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/recurring-invoice-logic/133195 "2008-03-31T16:58:32Z")

</div>

Never done recurring invoices before so wondering if this logic makes sense: Cron job runs at 4am each night and runs some ruby like this: pseudocode: For Each Invoice.due\_date == Date.today Invoice.new(:due\_date =\> …

---

## [Problem in installlation of ferret search plugin in rails application](https://www.ruby-forum.com/t/problem-in-installlation-of-ferret-search-plugin-in-rails-application/133402)

<div class="topic-metadata">

**Author:** [@norat](https://www.ruby-forum.com/u/norat)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 4:47pm UTC](https://www.ruby-forum.com/t/problem-in-installlation-of-ferret-search-plugin-in-rails-application/133402 "2008-03-31T16:47:18Z")

</div>

When i went to installation ferret in my rails application then i have faced a problem that is look like this ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions into the /var/lib…

---

## [Rails Ajax questions](https://www.ruby-forum.com/t/rails-ajax-questions/133364)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/rails-ajax-questions/133364 "2008-03-31T16:33:40Z")

</div>

Hi, So I have a controller action that populated an instance variable @links. The Links are rendered as partials and displayed down the page in a div. What I want to do is: on clicking a link (from a dropdown menu)…

---

## [Strange behavior of while loop](https://www.ruby-forum.com/t/strange-behavior-of-while-loop/133414)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [March 31, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/strange-behavior-of-while-loop/133414 "2008-03-31T16:25:51Z")

</div>

hai all, I am very new to Ruby and when I am doing some small program I found the strange output for my program. Please let me know why this is happening… num = 10.1 while num \< 10.5 puts "num = " + num.to\_s num =…

---

## [Date won't save in mysql](https://www.ruby-forum.com/t/date-wont-save-in-mysql/196628)

<div class="topic-metadata">

**Author:** [@DrRocket](https://www.ruby-forum.com/u/DrRocket)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/date-wont-save-in-mysql/196628 "2008-03-31T16:00:53Z")

</div>

Hi everyone, hope someone can help… I’m working on an app, one function of which is to store a list of gigs for a band. I’m using datebalks as my datepicker in a form in my app, then run the result through Chronic to …

---

## [Remapping routes dynamically?](https://www.ruby-forum.com/t/remapping-routes-dynamically/133328)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/remapping-routes-dynamically/133328 "2008-03-31T15:44:49Z")

</div>

I’m trying to figure out how to merge the utility of namespaces with user roles. For example, I have a very simple system of buyers and sellers and a user is either part of a buyer account or a seller account (not bot…

---

## [Can rjs be called from a javascript function](https://www.ruby-forum.com/t/can-rjs-be-called-from-a-javascript-function/133311)

<div class="topic-metadata">

**Author:** [@bbqbaker](https://www.ruby-forum.com/u/bbqbaker)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 3:36pm UTC](https://www.ruby-forum.com/t/can-rjs-be-called-from-a-javascript-function/133311 "2008-03-31T15:36:53Z")

</div>

is it possible to call a rjs file from a javascript function??

---

## [Custom Column Data Types ... no way](https://www.ruby-forum.com/t/custom-column-data-types-no-way/133428)

<div class="topic-metadata">

**Author:** [@nikwest](https://www.ruby-forum.com/u/nikwest)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 3:33pm UTC](https://www.ruby-forum.com/t/custom-column-data-types-no-way/133428 "2008-03-31T15:33:21Z")

</div>

Hi all, first I am knew to RoR, so please excuse if this is a stupid question. I am fighting to get RoR work with custom postgres database types. I am using pg\_shere types like scircle, spoint … Is there a way to def…

---

## [Open popup to close, update div in parent window?](https://www.ruby-forum.com/t/open-popup-to-close-update-div-in-parent-window/133309)

<div class="topic-metadata">

**Author:** [@bbqbaker](https://www.ruby-forum.com/u/bbqbaker)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 3:32pm UTC](https://www.ruby-forum.com/t/open-popup-to-close-update-div-in-parent-window/133309 "2008-03-31T15:32:46Z")

</div>

i have a form where a user can open a popup to add categories. when the window is closed, id like the dropdown list in the form to get refreshed via rjs. however, i am having trouble updating the drop down since i can…

---

## [Quick validation question](https://www.ruby-forum.com/t/quick-validation-question/133305)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/quick-validation-question/133305 "2008-03-31T15:30:24Z")

</div>

Hi, just a quick one. How can I access session values in validation? Here’s what I’m trying to do… validates\_numericality\_of :points, :less\_than\_or\_equal\_to =\> session\[:user\]\[:points\] And this is the message I get …

---

## [How do I get a javascript variable into rails](https://www.ruby-forum.com/t/how-do-i-get-a-javascript-variable-into-rails/133376)

<div class="topic-metadata">

**Author:** [@sweiss](https://www.ruby-forum.com/u/sweiss)\
**Replies:** 6\
**Last updated:** [March 31, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/how-do-i-get-a-javascript-variable-into-rails/133376 "2008-03-31T15:02:33Z")

</div>

I have looked around and I am either not understanding something, or just can’t find a way to get a javascript variable posted to into rails. I have a javascript that runds and takes input from a user, and I need to g…

---

## [Role based restriction for fields (not views or actions)](https://www.ruby-forum.com/t/role-based-restriction-for-fields-not-views-or-actions/133297)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 4\
**Last updated:** [March 31, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/role-based-restriction-for-fields-not-views-or-actions/133297 "2008-03-31T14:45:07Z")

</div>

I have an application that requires some complex access rules. Certain fields can only be edited by certain roles. I am using restful\_authentication and role\_requirement plugins so I am fine with restricting an entir…

---

## [Update\_attributes() Error](https://www.ruby-forum.com/t/update-attributes-error/133422)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/update-attributes-error/133422 "2008-03-31T14:12:56Z")

</div>

Follow the book Agile Web D. with Rails, copy the depot’s Model User. And my Users table has another two fields, address and email. When I tried to update these two fields, the code like user = User.find(1) user.upd…

---

## [Database design help](https://www.ruby-forum.com/t/database-design-help/133380)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/database-design-help/133380 "2008-03-31T14:08:16Z")

</div>

Hi, I’m coding a little application to make couples profile. The problem is I just don’t know how to create my databases so that their are no bottlenecks and that I can have a relation. The way I see it is that their …

---

## [Female, 18-25, Arizona, United States &#9792;&#9794;](https://www.ruby-forum.com/t/female-18-25-arizona-united-states-9792-9794/133421)

<div class="topic-metadata">

**Author:** [@Verona\_dsm](https://www.ruby-forum.com/u/Verona_dsm)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/female-18-25-arizona-united-states-9792-9794/133421 "2008-03-31T14:06:28Z")

</div>

Female, 18-25, Arizona, United States :female\_sign::male\_sign: http://h1.ripway.com/NYforum/arizona.htm :smiling\_face:

---

## [Does anyone have any idea about how to install LibXML](https://www.ruby-forum.com/t/does-anyone-have-any-idea-about-how-to-install-libxml/105407)

<div class="topic-metadata">

**Author:** [@Vivian\_Aranha](https://www.ruby-forum.com/u/Vivian_Aranha)\
**Replies:** 1\
**Last updated:** [March 31, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/does-anyone-have-any-idea-about-how-to-install-libxml/105407 "2008-03-31T12:32:02Z")

</div>

I am having problems installing LibXML on my windows machine…

---

## [ÐžÐ²Ð¾Ñ‰ÐµÑ€ÐµÐ·ÐºÐ° nicer dicer (Ð¾Ð²Ð¾Ñ‰ÐµÑ€ÐµÐ·ÐºÐ° Ð½Ð°Ð¹ÑÐµÑ€ Ð´Ð°Ð¹ÑÐµÑ€) (ÐšÐÐ )](https://www.ruby-forum.com/t/dzd-d-n-d-n-d-d-d-d-nicer-dicer-d-d-d-n-d-n-d-d-d-d-d-d-d-n-d-n-d-d-d-n-d-n-dsd-d/133411)

<div class="topic-metadata">

**Author:** [@ShopBody.ru](https://www.ruby-forum.com/u/ShopBody.ru)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 12:15pm UTC](https://www.ruby-forum.com/t/dzd-d-n-d-n-d-d-d-d-nicer-dicer-d-d-d-n-d-n-d-d-d-d-d-d-d-n-d-n-d-d-d-n-d-n-dsd-d/133411 "2008-03-31T12:15:41Z")

</div>

ï×ÏÝÅÒÅÚËÁ Nicer Dicer ÏÔÌÉÞÎÏ ÐÏÄÈÏÄÉÔ ÄÌÑ ÒÅÚËÉ ÌÕËÁ, ÐÅÒÃÁ, ÓÅÌØÄÅÒÅÑ, ÔÏÍÁÔÏ×, ×ÁÒÅÎÙÈ ÑÉÃ, ÚÅÌÅÎÉ, ÓÙÒÁ, ÞÅÓÎÏËÁ, ÑÂÌÏË É ÇÒÕÛ. õÍÅÎØÛÁÅÔ ×ÒÅÍÑ ÐÒÉÇÏÔÏ×ÌÅÎÉÑ × ÐÏÌÏ×ÉÎÕ. òÅÖÅÔ É ÎÁÒÅÚÁÅÔ ÂÏÌØÛÅ ÏÄÎÉÍ ÂÙÓÔÒÙÍ Ä×ÉÖ…

---

## [Problem with Flickr need help](https://www.ruby-forum.com/t/problem-with-flickr-need-help/133410)

<div class="topic-metadata">

**Author:** [@megax](https://www.ruby-forum.com/u/megax)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 11:46am UTC](https://www.ruby-forum.com/t/problem-with-flickr-need-help/133410 "2008-03-31T11:46:40Z")

</div>

I was able to add Flickr to my website at home but at my university it will not run. The only thing I can think is the problem is that it is run from the USB and at home the usb comes up as G: where as at university i…

---

## [How to put this datetime in a new form?](https://www.ruby-forum.com/t/how-to-put-this-datetime-in-a-new-form/133290)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 9\
**Last updated:** [March 31, 2008, 11:08am UTC](https://www.ruby-forum.com/t/how-to-put-this-datetime-in-a-new-form/133290 "2008-03-31T11:08:47Z")

</div>

I have this is my new form: \<table\> \<tr\> \<th\>\<%= \_('Sales date') %\>\</th\> \</tr\> \<tr\> \<td\> \<%= f.datetime\_select :sales\_date %\>\</td\> \</tr\> \</table\> With this code I’m showing year, month, day and hour. I …

---

## [Questions about copying parameters](https://www.ruby-forum.com/t/questions-about-copying-parameters/133404)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 10:46am UTC](https://www.ruby-forum.com/t/questions-about-copying-parameters/133404 "2008-03-31T10:46:13Z")

</div>

Hi, What I am doing is: Category 1 | \_\_\_\_\_\_|\_\_\_\_\_\_\_\_\_ | | Category 2 Category ? \_\_\_\_|\_\_\_\_ | | | Topic ? Topic 1 Topic 2 What I …

---

## [When do you use initializer vs environments/\*.rb](https://www.ruby-forum.com/t/when-do-you-use-initializer-vs-environments-rb/133264)

<div class="topic-metadata">

**Author:** [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 10:21am UTC](https://www.ruby-forum.com/t/when-do-you-use-initializer-vs-environments-rb/133264 "2008-03-31T10:21:09Z")

</div>

Hi, I am setting up my smtp settings. In the past I would put them in config/environments/development.rb for my development environment and config/environments/production.rb for my production envrionment. However Ra…

---

## [Requiring User to Select Categories -- (on Post Creation)](https://www.ruby-forum.com/t/requiring-user-to-select-categories-on-post-creation/133403)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 0\
**Last updated:** [March 31, 2008, 9:55am UTC](https://www.ruby-forum.com/t/requiring-user-to-select-categories-on-post-creation/133403 "2008-03-31T09:55:18Z")

</div>

Hello, I’m having trouble with validation. I want to require the user to select a category before a post is successfully created. I’m using has\_many :through for posts and categories as follows: class Post \< ActiveRe…

---

## [Using :binary columns in models](https://www.ruby-forum.com/t/using-binary-columns-in-models/133114)

<div class="topic-metadata">

**Author:** [@Col\_W](https://www.ruby-forum.com/u/Col_W)\
**Replies:** 2\
**Last updated:** [March 31, 2008, 9:34am UTC](https://www.ruby-forum.com/t/using-binary-columns-in-models/133114 "2008-03-31T09:34:29Z")

</div>

I am creating little personal flags for each user and since they are small I think it would be best to store them as a blob (:binary), but I can’ find anything that i understand. Can anyone point me at a tutorial on h…

---

## [Problems with rspec, models and relationships in 2.0](https://www.ruby-forum.com/t/problems-with-rspec-models-and-relationships-in-2-0/132465)

<div class="topic-metadata">

**Author:** [@Col\_W](https://www.ruby-forum.com/u/Col_W)\
**Replies:** 6\
**Last updated:** [March 31, 2008, 9:33am UTC](https://www.ruby-forum.com/t/problems-with-rspec-models-and-relationships-in-2-0/132465 "2008-03-31T09:33:19Z")

</div>

I have a couple of problems which are kinda related, so I’ll out them both here. I’ve been trying out rspec for the first time and I’m new to has\_many :through relationships, so excuse me. I want to relate a User to a…

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

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