# Rails

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

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

---

## [Basic question about logic in views](https://www.ruby-forum.com/t/basic-question-about-logic-in-views/120443)

<div class="topic-metadata">

**Author:** [@tomn](https://www.ruby-forum.com/u/tomn)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 12:51am UTC](https://www.ruby-forum.com/t/basic-question-about-logic-in-views/120443 "2007-11-17T00:51:29Z")

</div>

Another newbie basic question. Here is a made up example: I will have a 5 x 5 table display with numbers 11, 21, 31, 41, 51, in the first row numbers 12, 22, 23, 24, 25 in the second row etc. The table boxes will dis…

---

## [Form\_remote\_tag/partials/cycle](https://www.ruby-forum.com/t/form-remote-tag-partials-cycle/120446)

<div class="topic-metadata">

**Author:** [@corywilkerson](https://www.ruby-forum.com/u/corywilkerson)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 12:17am UTC](https://www.ruby-forum.com/t/form-remote-tag-partials-cycle/120446 "2007-11-17T00:17:20Z")

</div>

All, Running into a small issue that I’m not sure how to eloquently resolve. I have a partial that reads something similar to: http://pastebin.com/m16c4295e… The problem is when I invoke this partial from an action (…

---

## [Difference between \[0..0\] and \[0\]](https://www.ruby-forum.com/t/difference-between-0-0-and-0/120439)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 12:03am UTC](https://www.ruby-forum.com/t/difference-between-0-0-and-0/120439 "2007-11-17T00:03:28Z")

</div>

I am trying to get at the first character in a string and when I say @string\[0\] I get an integer value, but when I say @string\[0…0\] I get the character. Why is that? Thanks, -S

---

## [Check File Uploads for Viruses](https://www.ruby-forum.com/t/check-file-uploads-for-viruses/197157)

<div class="topic-metadata">

**Author:** [@TTDaVeTT](https://www.ruby-forum.com/u/TTDaVeTT)\
**Replies:** 0\
**Last updated:** [November 16, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/check-file-uploads-for-viruses/197157 "2007-11-16T23:55:51Z")

</div>

I am currently developing a social networking site using RoR that uses the attachment\_fu plugin to handle image uploads. I also want to enable users to upload photoshop files, but am worried about security vulnerabil…

---

## [Public folder simple question](https://www.ruby-forum.com/t/public-folder-simple-question/120077)

<div class="topic-metadata">

**Author:** [@gianluca\_t](https://www.ruby-forum.com/u/gianluca_t)\
**Replies:** 4\
**Last updated:** [November 16, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/public-folder-simple-question/120077 "2007-11-16T23:18:25Z")

</div>

Hi to all, I’ve a simple question: does it possible to change the public folder address based on database value into application controller ? This because I must handle a multidomain rails application and I must sep…

---

## [Strange Mongrel 500 error](https://www.ruby-forum.com/t/strange-mongrel-500-error/120425)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 2\
**Last updated:** [November 16, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/strange-mongrel-500-error/120425 "2007-11-16T22:36:50Z")

</div>

Hi, When I start mongrel as a non root user, I will get an 500. In my log/production.log I see this: file /home/paul/rails/Test/releases/20071115232111/tmp/sessions// ruby\_sess.9a975fe464a2f6ba not readable … when …

---

## [Do you have to install Rmagick plugin to use acts\_as\_attachment](https://www.ruby-forum.com/t/do-you-have-to-install-rmagick-plugin-to-use-acts-as-attachment/120436)

<div class="topic-metadata">

**Author:** [@slindsey3000](https://www.ruby-forum.com/u/slindsey3000)\
**Replies:** 0\
**Last updated:** [November 16, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/do-you-have-to-install-rmagick-plugin-to-use-acts-as-attachment/120436 "2007-11-16T22:26:19Z")

</div>

Do I need to install the Rmagick pluggin before I install the acts\_as\_attachment plugin. my acts as attachment is not working. Thanks!

---

## [Find](https://www.ruby-forum.com/t/find/120415)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 5\
**Last updated:** [November 16, 2007, 8:41pm UTC](https://www.ruby-forum.com/t/find/120415 "2007-11-16T20:41:43Z")

</div>

Hi all, I would like to modify this find\_by\_sql to work using just the normal find. User.find\_by\_sql(“SELECT \* FROM users WHERE role = " + params\[:user\]\[:role\] + " and first LIKE A%”) this works, I just don’t like d…

---

## [256MB of RAM enough for ruby on rails and mysql?](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355)

<div class="topic-metadata">

**Author:** [@dave](https://www.ruby-forum.com/u/dave)\
**Replies:** 4\
**Last updated:** [November 16, 2007, 7:08pm UTC](https://www.ruby-forum.com/t/256mb-of-ram-enough-for-ruby-on-rails-and-mysql/120355 "2007-11-16T19:08:45Z")

</div>

Hi, I was wondering if 256MB of RAM is enough to run a ruby on rails server and mysql server. My application does not do any complex queries, but it does deal with quite a lot of data (potentially tables as large as 1…

---

## [Rolling Counts](https://www.ruby-forum.com/t/rolling-counts/120356)

<div class="topic-metadata">

**Author:** [@shane](https://www.ruby-forum.com/u/shane)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 6:41pm UTC](https://www.ruby-forum.com/t/rolling-counts/120356 "2007-11-16T18:41:48Z")

</div>

Hi I just wondered if anyone has come up with an elegant solution to rolling counts for a RoR app? Our requirement is to show most viewed items for the past week … with this rolling each day. Currently we are showin…

---

## [Newb - variable returns # sign?](https://www.ruby-forum.com/t/newb-variable-returns-sign/120372)

<div class="topic-metadata">

**Author:** [@john95127](https://www.ruby-forum.com/u/john95127)\
**Replies:** 4\
**Last updated:** [November 16, 2007, 6:17pm UTC](https://www.ruby-forum.com/t/newb-variable-returns-sign/120372 "2007-11-16T18:17:46Z")

</div>

Hi Gurus- I want to return the variety from the species table based on the active record link to inventory table class Species \< ActiveRecord::Base has\_many :inventories end class Inventory \< ActiveRecord::Base be…

---

## [Temporaly silencing the rails log](https://www.ruby-forum.com/t/temporaly-silencing-the-rails-log/120405)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/temporaly-silencing-the-rails-log/120405 "2007-11-16T18:00:05Z")

</div>

Hi! I want to do what subject say. Is there any elegant way to do this: ??? Silence the log inside the block attached to the method call. def silence\_logger orig= nil ObjectSpace.each\_object(::Logger) do |logger| lo…

---

## [Why does Rails generate random numbers: thing?1194897572?](https://www.ruby-forum.com/t/why-does-rails-generate-random-numbers-thing-1194897572/120103)

<div class="topic-metadata">

**Author:** [@fredistic](https://www.ruby-forum.com/u/fredistic)\
**Replies:** 3\
**Last updated:** [November 16, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/why-does-rails-generate-random-numbers-thing-1194897572/120103 "2007-11-16T17:20:47Z")

</div>

Rails generated: from: \<%= image\_tag("/images/Art/mediumg.png", :size =\> “121x160”) %\> The filename is appended with a question mark and a random number. What’s it for? It does the same thing on link tags. Also,…

---

## [Automatically load JS file with View](https://www.ruby-forum.com/t/automatically-load-js-file-with-view/120299)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 10\
**Last updated:** [November 16, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/automatically-load-js-file-with-view/120299 "2007-11-16T16:59:09Z")

</div>

hi guys, i am quite new to RoR and i was wondering if it is possible to achieve an automatic load of a javascript file for a view… it should work completely magically :slight\_smile: like with the rjs files… when i ha…

---

## [Script in lib that uses active records fails with \`method\_missing': undefined local variable or met](https://www.ruby-forum.com/t/script-in-lib-that-uses-active-records-fails-with-method-missing-undefined-local-variable-or-met/120403)

<div class="topic-metadata">

**Author:** [@Obelix](https://www.ruby-forum.com/u/Obelix)\
**Replies:** 2\
**Last updated:** [November 16, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/script-in-lib-that-uses-active-records-fails-with-method-missing-undefined-local-variable-or-met/120403 "2007-11-16T16:34:31Z")

</div>

I have written a simple script in the lib directory that accesses an active record that ‘acts\_as\_taggable’ I get this error when I run the script. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/ active\_rec…

---

## [RoR Web service](https://www.ruby-forum.com/t/ror-web-service/120404)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 0\
**Last updated:** [November 16, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/ror-web-service/120404 "2007-11-16T16:14:00Z")

</div>

Hello Can anyone tell me the available web services for ROR? Thanks Dhaval P.

---

## [Check File Uploads for Viruses](https://www.ruby-forum.com/t/check-file-uploads-for-viruses/120383)

<div class="topic-metadata">

**Author:** [@TTDaVeTT](https://www.ruby-forum.com/u/TTDaVeTT)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/check-file-uploads-for-viruses/120383 "2007-11-16T15:51:47Z")

</div>

I am currently developing a social networking site using RoR that uses the attachment\_fu plugin to handle image uploads. I also want to enable users to upload photoshop files, but am worried about security vulnerabil…

---

## [Using a legacy table with a column named 'type'](https://www.ruby-forum.com/t/using-a-legacy-table-with-a-column-named-type/120346)

<div class="topic-metadata">

**Author:** [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Replies:** 2\
**Last updated:** [November 16, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/using-a-legacy-table-with-a-column-named-type/120346 "2007-11-16T15:51:08Z")

</div>

I have a legacy database I use to pull data from and one of the tables has a column named ‘type’. This cause the following sql to be generated (which doesn’t work): SELECT \* FROM technical\_hint WHERE ( (technical\_hint…

---

## [How will Rails 2.0 build prefix's into nexted paths?](https://www.ruby-forum.com/t/how-will-rails-2-0-build-prefixs-into-nexted-paths/120396)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/how-will-rails-2-0-build-prefixs-into-nexted-paths/120396 "2007-11-16T15:41:11Z")

</div>

I’ve recently observed a reply by David Black ( http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/fea4376838ac9396?hl=en ) where he described that a routing statement like this; map.resources :proje…

---

## [ActionView::Helpers::SanitizeHelper.sanitize docs](https://www.ruby-forum.com/t/actionview-sanitizehelper-sanitize-docs/120397)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 16, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/actionview-sanitizehelper-sanitize-docs/120397 "2007-11-16T15:11:51Z")

</div>

Hello, First sentence of sanitize() method doc says: “This sanitize helper will html encode all tags and strip all attributes that aren’t specifically allowed.” But sanitize(“ foo should html encode”) == “foo should…

---

## [Check File Uploads for Viruses](https://www.ruby-forum.com/t/check-file-uploads-for-viruses/196518)

<div class="topic-metadata">

**Author:** [@TTDaVeTT](https://www.ruby-forum.com/u/TTDaVeTT)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/check-file-uploads-for-viruses/196518 "2007-11-16T14:51:17Z")

</div>

I am currently developing a social networking site using RoR that uses the attachment\_fu plugin to handle image uploads. I also want to enable users to upload photoshop files, but am worried about security vulnerabil…

---

## [FUN with FLEX/RAILS](https://www.ruby-forum.com/t/fun-with-flex-rails/120207)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 1:21pm UTC](https://www.ruby-forum.com/t/fun-with-flex-rails/120207 "2007-11-16T13:21:02Z")

</div>

I finally found some time to install flex yesterday and I found it really really interesting! Running a huge photo competition I’ve always had THE big problem: users getting mad (and doing bad http things) trying to …

---

## [Trivial syntax error: Unexpected ')'](https://www.ruby-forum.com/t/trivial-syntax-error-unexpected/120385)

<div class="topic-metadata">

**Author:** [@mukesh23singh](https://www.ruby-forum.com/u/mukesh23singh)\
**Replies:** 3\
**Last updated:** [November 16, 2007, 12:52pm UTC](https://www.ruby-forum.com/t/trivial-syntax-error-unexpected/120385 "2007-11-16T12:52:18Z")

</div>

I am a Rails newbie but have programmed other languages/frameworks earlier. There’s a trivial syntax error I can’t for the life of me figure out. I am following the well-known Ruby On InstantRails tutorial from here: …

---

## [Drop dwon list prob in creation & validation](https://www.ruby-forum.com/t/drop-dwon-list-prob-in-creation-validation/120387)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 0\
**Last updated:** [November 16, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/drop-dwon-list-prob-in-creation-validation/120387 "2007-11-16T12:40:49Z")

</div>

hi i want to create a drop down list in the where the data of it will be taken from a database table. so i cam across the following way. one is don in the HTML way and other one is done in the ROR way. ##############…

---

## [Resetting fixtures for each iteration within a single test](https://www.ruby-forum.com/t/resetting-fixtures-for-each-iteration-within-a-single-test/120223)

<div class="topic-metadata">

**Author:** [@Bas\_van\_Westing](https://www.ruby-forum.com/u/Bas_van_Westing)\
**Replies:** 4\
**Last updated:** [November 16, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/resetting-fixtures-for-each-iteration-within-a-single-test/120223 "2007-11-16T12:04:09Z")

</div>

Hi, I want to reset the fixture data manually during a single test. I know this action is performed between tests, but I need to trigger it within a single test. I need this because I have a directory full of test da…

---

## [Removing accents from sentences (ex: url creations) - what's](https://www.ruby-forum.com/t/removing-accents-from-sentences-ex-url-creations-whats/112835)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 3\
**Last updated:** [November 16, 2007, 11:38am UTC](https://www.ruby-forum.com/t/removing-accents-from-sentences-ex-url-creations-whats/112835 "2007-11-16T11:38:58Z")

</div>

Hi! I could not find it so far - but maybe rails i18n is the right list for that question: is there something already available somewhere in the ruby space to remove accents and other diacritics from a string ? (lik…

---

## [Calling to a specfic controler](https://www.ruby-forum.com/t/calling-to-a-specfic-controler/120269)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 14\
**Last updated:** [November 16, 2007, 10:43am UTC](https://www.ruby-forum.com/t/calling-to-a-specfic-controler/120269 "2007-11-16T10:43:04Z")

</div>

hi i have created a rhtml file name as new.rhtml and in thir i have created the form as follows \<% form\_for :form\_file, :url =\> { :action =\> “create” }, :html =\> { :multipart =\> true } do |g| %\> \<%= g.file\_field :…

---

## [How to check if a file is in the folder "/admin"?](https://www.ruby-forum.com/t/how-to-check-if-a-file-is-in-the-folder-admin/120368)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 1\
**Last updated:** [November 16, 2007, 9:59am UTC](https://www.ruby-forum.com/t/how-to-check-if-a-file-is-in-the-folder-admin/120368 "2007-11-16T09:59:50Z")

</div>

I have a folder called “admin” to hold all of the administrator’s files. If I wanted to check if a file is inside the “/admin” folder (e.g. /admin/tasks/list.rhtml), how would I do it?

---

## [Max File Upload & Max Execution Time](https://www.ruby-forum.com/t/max-file-upload-max-execution-time/118668)

<div class="topic-metadata">

**Author:** [@balaji](https://www.ruby-forum.com/u/balaji)\
**Replies:** 2\
**Last updated:** [November 16, 2007, 9:53am UTC](https://www.ruby-forum.com/t/max-file-upload-max-execution-time/118668 "2007-11-16T09:53:24Z")

</div>

Hi I have a application where i am allowing users to upload high resolution images ( most of them are more than 4.5 MB in size ) because of the file size i am getting server timeout errors , can anyone suggest me ,ho…

---

## [Leading CMS](https://www.ruby-forum.com/t/leading-cms/120362)

<div class="topic-metadata">

**Author:** [@agilehack](https://www.ruby-forum.com/u/agilehack)\
**Replies:** 0\
**Last updated:** [November 16, 2007, 7:58am UTC](https://www.ruby-forum.com/t/leading-cms/120362 "2007-11-16T07:58:04Z")

</div>

just wanted to see what you guys feel is the leading ruby on rails CMS right now. Project types would mostly be static websites, sometimes leading to more dynamic content. I have been looking at a bunch of them as I…

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

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