# Rails

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

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

---

## [Problem with array](https://www.ruby-forum.com/t/problem-with-array/144496)

<div class="topic-metadata">

**Author:** [@andrewdon](https://www.ruby-forum.com/u/andrewdon)\
**Replies:** 7\
**Last updated:** [July 30, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/problem-with-array/144496 "2008-07-30T21:08:01Z")

</div>

I have a list of 3 “report\_admins” in my database, and when I send an email I need to email to go to all 3 admins, So in the controller I put… @report\_admins = ReportAdmin.find(:all) Then I told ActionMailer this… @…

---

## [NULL datetime field inserted when value is assigned to model object](https://www.ruby-forum.com/t/null-datetime-field-inserted-when-value-is-assigned-to-model-object/144550)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/null-datetime-field-inserted-when-value-is-assigned-to-model-object/144550 "2008-07-30T21:06:47Z")

</div>

This is pretty baffling. I have the following model object: create\_table “activities”, :force =\> true do |t| t.integer “user\_id”, :limit =\> 11 t.datetime “created\_at” t.datetime “updated\_at” t.integer “locatio…

---

## [Gears on Rails](https://www.ruby-forum.com/t/gears-on-rails/143219)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 2\
**Last updated:** [July 30, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/gears-on-rails/143219 "2008-07-30T21:06:12Z")

</div>

Dear all I am not sure whether anyone of you managed to use gears on rails I have seen the home page of the project. But i did not get the concept. I googled for a more descriptive tutorial. Anyone has a sample of co…

---

## [Need to convert whole letter in uppercase](https://www.ruby-forum.com/t/need-to-convert-whole-letter-in-uppercase/144497)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 3\
**Last updated:** [July 30, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/need-to-convert-whole-letter-in-uppercase/144497 "2008-07-30T21:05:36Z")

</div>

Hi I need to convert whole user entered text in my whole project into upper-case and also save it as a upper-case letter in database.If any one knows please help.

---

## [Is there any way to limit upload size RELIABLY using Apache and Mongrel BEFORE upload completes?](https://www.ruby-forum.com/t/is-there-any-way-to-limit-upload-size-reliably-using-apache-and-mongrel-before-upload-completes/144546)

<div class="topic-metadata">

**Author:** [@DavidB](https://www.ruby-forum.com/u/DavidB)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/is-there-any-way-to-limit-upload-size-reliably-using-apache-and-mongrel-before-upload-completes/144546 "2008-07-30T21:05:36Z")

</div>

I posted an issue yesterday, and perhaps I did not post it clearly enough. I am curious to see if it is possible to limit a file upload reliably so that someone does not try to upload a 100mb or 1gb photo for example.…

---

## [Visual\_effect](https://www.ruby-forum.com/t/visual-effect/144544)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/visual-effect/144544 "2008-07-30T20:30:38Z")

</div>

page\[:control\].visual\_effect :slide\_down that works fine, but when I use :toggle\_slide and I click on the link\_to\_remote, the rjs error pops up, anyone know why? Thanks!

---

## [A gem to draw shapes and text](https://www.ruby-forum.com/t/a-gem-to-draw-shapes-and-text/144541)

<div class="topic-metadata">

**Author:** [@amrita](https://www.ruby-forum.com/u/amrita)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/a-gem-to-draw-shapes-and-text/144541 "2008-07-30T19:50:04Z")

</div>

Can someone point me to a good graphing library in RoR to draw shapes and text mostly? I am aware of RMagick, but it looks like it is heavyweight and consumes a lot of memory. Is that right? Other packages such as scr…

---

## [Testing includes](https://www.ruby-forum.com/t/testing-includes/144529)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 2\
**Last updated:** [July 30, 2008, 7:46pm UTC](https://www.ruby-forum.com/t/testing-includes/144529 "2008-07-30T19:46:50Z")

</div>

Should one be testing things like ‘include FooBar’ when testing a model? Where FooBar is an externally maintained and separately tested module. Thanks, ~ Mark

---

## [Getting the number of pages of a pdf file](https://www.ruby-forum.com/t/getting-the-number-of-pages-of-a-pdf-file/144539)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 7:44pm UTC](https://www.ruby-forum.com/t/getting-the-number-of-pages-of-a-pdf-file/144539 "2008-07-30T19:44:47Z")

</div>

Hi! I think everything is in the title… I did not find anything on the internet. Is Pdf::Writer able to do that?? Thanks. aurels

---

## [Export to Calendar](https://www.ruby-forum.com/t/export-to-calendar/144534)

<div class="topic-metadata">

**Author:** [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/export-to-calendar/144534 "2008-07-30T19:05:34Z")

</div>

Hi, I know that I can use icalendar gem to export the calendar to ical format. How to export to Google, Yahoo and Outlook calendar? Something similar to this: http://ruby.meetup.com/6/calendar/8393134/ Thanks, Bala

---

## [Best way to do default values](https://www.ruby-forum.com/t/best-way-to-do-default-values/144533)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/best-way-to-do-default-values/144533 "2008-07-30T19:02:47Z")

</div>

I’m working on a Role-based user authentication model, where a user habtm roles, and roles habtm rights. My problem is that I know that I need specific Role instances right off the bat, so how do i go about ensuring t…

---

## [Sqlite3-ruby](https://www.ruby-forum.com/t/sqlite3-ruby/144531)

<div class="topic-metadata">

**Author:** [@toospoiled](https://www.ruby-forum.com/u/toospoiled)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby/144531 "2008-07-30T18:41:27Z")

</div>

How can I get back a file from a blob? I have saved a file into a SQLite3::Blob object and then into a db, but now I want to do the reverse operation and I can’t do it. Thanks for help

---

## [Hampton's Ruby Survey 2008](https://www.ruby-forum.com/t/hamptons-ruby-survey-2008/144468)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [July 30, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/hamptons-ruby-survey-2008/144468 "2008-07-30T18:29:52Z")

</div>

if you have a minute, i’d really appreciate people taking my survey! http://survey.hamptoncatlin.com -hampton.

---

## [New to ror and confused](https://www.ruby-forum.com/t/new-to-ror-and-confused/144310)

<div class="topic-metadata">

**Author:** [@rpierry](https://www.ruby-forum.com/u/rpierry)\
**Replies:** 12\
**Last updated:** [July 30, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/new-to-ror-and-confused/144310 "2008-07-30T17:44:12Z")

</div>

Hi, I have been learning ROR for less than a month. I am having problems getting my head around models and controllers. I want to have 2 tables called players and results in my DB. I want to be able to access them in…

---

## [STI & collection\_select](https://www.ruby-forum.com/t/sti-collection-select/196767)

<div class="topic-metadata">

**Author:** [@DJDJDJ](https://www.ruby-forum.com/u/DJDJDJ)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/sti-collection-select/196767 "2008-07-30T17:15:32Z")

</div>

I am not understanding how to utilize collection\_select with a single table inheritance model I have been given to use so I hope someone can tell me what I am not thinking of. Suppose there is a look-up table called C…

---

## [Combining find results from multiple tables/models](https://www.ruby-forum.com/t/combining-find-results-from-multiple-tables-models/144523)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 3\
**Last updated:** [July 30, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/combining-find-results-from-multiple-tables-models/144523 "2008-07-30T17:10:52Z")

</div>

Hi all, I’m wondering if it’s possible to merge/combine find results from multiple tables. I have a customers model and customers have invoices and payments. I need to combine the results from the invoice and payme…

---

## [Halt file upload if maximum size is reached. Is that possible?](https://www.ruby-forum.com/t/halt-file-upload-if-maximum-size-is-reached-is-that-possible/144527)

<div class="topic-metadata">

**Author:** [@pahagon](https://www.ruby-forum.com/u/pahagon)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/halt-file-upload-if-maximum-size-is-reached-is-that-possible/144527 "2008-07-30T17:02:04Z")

</div>

Hi guys. I’m building a rapidshare-like app, and as such each user has a disk quota. It’s possible to prevent a file save if it exceeds the free space, but I searched for an way to do the same during the file upload.…

---

## [STI & collection\_select](https://www.ruby-forum.com/t/sti-collection-select/144522)

<div class="topic-metadata">

**Author:** [@DJDJDJ](https://www.ruby-forum.com/u/DJDJDJ)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 4:21pm UTC](https://www.ruby-forum.com/t/sti-collection-select/144522 "2008-07-30T16:21:02Z")

</div>

I am not understanding how to utilize collection\_select with a single table inheritance model I have been given to use so I hope someone can tell me what I am not thinking of. Suppose there is a look-up table called C…

---

## [Submitting fields in a table row](https://www.ruby-forum.com/t/submitting-fields-in-a-table-row/144367)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 2\
**Last updated:** [July 30, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/submitting-fields-in-a-table-row/144367 "2008-07-30T16:06:23Z")

</div>

Hello, I have a table with each row containing some data and the last column being a button called “Edit”. You click “Edit” and the whole row becomes editable (through AJAX and rjs) with form elements replacing each…

---

## [Trouble routing with sub controller](https://www.ruby-forum.com/t/trouble-routing-with-sub-controller/144516)

<div class="topic-metadata">

**Author:** [@jack](https://www.ruby-forum.com/u/jack)\
**Replies:** 1\
**Last updated:** [July 30, 2008, 3:56pm UTC](https://www.ruby-forum.com/t/trouble-routing-with-sub-controller/144516 "2008-07-30T15:56:59Z")

</div>

Hello, I’ve got an app that is working fine on my local system such that a URL like this http://localhost:3000/admin/customer/list routes to controller =\> admin/customer, action =\> list and something like this http…

---

## [Getting id in an array](https://www.ruby-forum.com/t/getting-id-in-an-array/144395)

<div class="topic-metadata">

**Author:** [@vanight](https://www.ruby-forum.com/u/vanight)\
**Replies:** 3\
**Last updated:** [July 30, 2008, 3:51pm UTC](https://www.ruby-forum.com/t/getting-id-in-an-array/144395 "2008-07-30T15:51:27Z")

</div>

Hi, I’m begining with rails I need to get an array of all id of a table. name of my model is ContentGroup so I tried ContentGroup.find(:all, :order=\>“ASC”) but I have an array of objet and I only need the ids. How c…

---

## [Google Map rendering bug when not displayed by default](https://www.ruby-forum.com/t/google-map-rendering-bug-when-not-displayed-by-default/144059)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 1\
**Last updated:** [July 30, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/google-map-rendering-bug-when-not-displayed-by-default/144059 "2008-07-30T15:23:34Z")

</div>

I’m not sure if this is a bug with the Google Maps renders or if I’m just doing something wrong. I am using the “livepipe ui control tabs”:http://livepipe.net/control to display different pieces of data on a page, no …

---

## [Way to limit file upload size using file\_column or attachment\_fu](https://www.ruby-forum.com/t/way-to-limit-file-upload-size-using-file-column-or-attachment-fu/144464)

<div class="topic-metadata">

**Author:** [@DavidB](https://www.ruby-forum.com/u/DavidB)\
**Replies:** 2\
**Last updated:** [July 30, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/way-to-limit-file-upload-size-using-file-column-or-attachment-fu/144464 "2008-07-30T15:18:17Z")

</div>

While I know this can be done with some flas based solutions, how can one limit the size of an upload to an RoR application within the application rather than via apache’s configuration? I just don’t want anyone tryin…

---

## [Render :action apparently invalid](https://www.ruby-forum.com/t/render-action-apparently-invalid/144511)

<div class="topic-metadata">

**Author:** [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/render-action-apparently-invalid/144511 "2008-07-30T14:44:52Z")

</div>

According to the output of my spec tests: Using something like render :action =\> “edit” is now invalid… even though when I do the action in the browser Rails complains of no such thing. Rails and RSpec are at the la…

---

## [IIS and ActiveDirectory integration](https://www.ruby-forum.com/t/iis-and-activedirectory-integration/144503)

<div class="topic-metadata">

**Author:** [@acras](https://www.ruby-forum.com/u/acras)\
**Replies:** 2\
**Last updated:** [July 30, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/iis-and-activedirectory-integration/144503 "2008-07-30T14:26:08Z")

</div>

Hi, Does anyone has experienced or know something about RoR running under IIS with Active Directory authentication? Thanks Ricardo A. removed\_email\_address@domain.invalid Acras Sistemas +55+41-3232-6404 www.acra…

---

## [Field security best practice](https://www.ruby-forum.com/t/field-security-best-practice/144505)

<div class="topic-metadata">

**Author:** [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Replies:** 1\
**Last updated:** [July 30, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/field-security-best-practice/144505 "2008-07-30T13:46:54Z")

</div>

Suppose i have a model (userprofile) which may be altered by users and admins, only 1 field (roll) may only be altered by admins. of course i can exclude that field from the view if the users is not an admin, but i su…

---

## [Upcase](https://www.ruby-forum.com/t/upcase/144501)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 4\
**Last updated:** [July 30, 2008, 1:20pm UTC](https://www.ruby-forum.com/t/upcase/144501 "2008-07-30T13:20:27Z")

</div>

Hi I am having one form there around 30 text field is there.after submitting the form the details should be save in database in capital letter. i tried with CSS text-transform:uppercase; but in frontend it showing c…

---

## [Activeresource](https://www.ruby-forum.com/t/activeresource/144382)

<div class="topic-metadata">

**Author:** [@bishal](https://www.ruby-forum.com/u/bishal)\
**Replies:** 3\
**Last updated:** [July 30, 2008, 11:33am UTC](https://www.ruby-forum.com/t/activeresource/144382 "2008-07-30T11:33:50Z")

</div>

Can somebody explain how can we go throught the process of restful authentication via activeresource. I have gone through it but the concept is still vague for me.

---

## [Timezone support breaks \_before\_type\_cast method](https://www.ruby-forum.com/t/timezone-support-breaks-before-type-cast-method/144499)

<div class="topic-metadata">

**Author:** [@sean-lerner](https://www.ruby-forum.com/u/sean-lerner)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 11:02am UTC](https://www.ruby-forum.com/t/timezone-support-breaks-before-type-cast-method/144499 "2008-07-30T11:02:48Z")

</div>

Some code in my current project validates date time format using \_before\_type\_cast method. But after adding "config.time\_zone = “UTC” in environment.rb, we can’t get string raw values of some date time columns using \_…

---

## [The error occurred while evaluating nil](https://www.ruby-forum.com/t/the-error-occurred-while-evaluating-nil/144489)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 5\
**Last updated:** [July 30, 2008, 7:51am UTC](https://www.ruby-forum.com/t/the-error-occurred-while-evaluating-nil/144489 "2008-07-30T07:51:08Z")

</div>

Hi I ahve a code like \<%@attachment=ServiceDeskActivityAttachment.find\_by\_service\_desk\_activity\_id(@sd\_activities\[loop\_index\].id) %\> \<% if !@attachment.blank? %\> \<%= puts ‘is empty’%\> Attachment File Name …

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

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