# Rails

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

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

---

## [Laopt is faster than server](https://www.ruby-forum.com/t/laopt-is-faster-than-server/157405)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 4\
**Last updated:** [January 12, 2009, 1:35pm UTC](https://www.ruby-forum.com/t/laopt-is-faster-than-server/157405 "2009-01-12T13:35:59Z")

</div>

I’m running the same app with the same database. In development (my laptop which has 2GB of RAM running Debian): Cache write (will save 32.97ms): Product.count Rendered shared/\_search (36.8ms) Rendered shared/\_footer…

---

## [Linking 2 Mysql tables with each other](https://www.ruby-forum.com/t/linking-2-mysql-tables-with-each-other/157495)

<div class="topic-metadata">

**Author:** [@bubbie](https://www.ruby-forum.com/u/bubbie)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 1:23pm UTC](https://www.ruby-forum.com/t/linking-2-mysql-tables-with-each-other/157495 "2009-01-12T13:23:12Z")

</div>

hello, For school i’m making a website for music cd’s I’m a beginner with RoR so I run into problems. At the moment I made 2 mysql tables, one with Genres and one with CD’s when I click on the genre -\> show, then i’l…

---

## [Help with Namespaces](https://www.ruby-forum.com/t/help-with-namespaces/157497)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 1:09pm UTC](https://www.ruby-forum.com/t/help-with-namespaces/157497 "2009-01-12T13:09:11Z")

</div>

This is frustrating the hell out of me! I have an application in which the controllers are split into two groups, public and private. In my routes file, I’ve split them into namespaces: map.namespace :private do |pri…

---

## [Reordering associated "has\_many" objects](https://www.ruby-forum.com/t/reordering-associated-has-many-objects/157503)

<div class="topic-metadata">

**Author:** [@jens](https://www.ruby-forum.com/u/jens)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 12:59pm UTC](https://www.ruby-forum.com/t/reordering-associated-has-many-objects/157503 "2009-01-12T12:59:53Z")

</div>

Hi, I have two objects, lets call them Collection and Foobar (see below). I want to be able to specify the order of foobars in a collection using e.g. @collection.foobar\_order = \[4, 2, 1, 0, 3\] @collection.save…

---

## [About attachment\_fu](https://www.ruby-forum.com/t/about-attachment-fu/157496)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 11:40am UTC](https://www.ruby-forum.com/t/about-attachment-fu/157496 "2009-01-12T11:40:15Z")

</div>

hi… i have one bookshop project.whose database table is as follows create\_table :books do |t| t.string :title t.text :description t.string :image\_url t.decimal :price t.datetime :date\_available end I want to use…

---

## [About magick library](https://www.ruby-forum.com/t/about-magick-library/157494)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 10:58am UTC](https://www.ruby-forum.com/t/about-magick-library/157494 "2009-01-12T10:58:33Z")

</div>

hi… I am using attachment\_fu in my project i want to know that which of following library is good please help me 1\>imagemagick 2\>RMagic

---

## [Opensocial container](https://www.ruby-forum.com/t/opensocial-container/157493)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 10:45am UTC](https://www.ruby-forum.com/t/opensocial-container/157493 "2009-01-12T10:45:33Z")

</div>

I’ve been working on a ruby/rails implementation of an opensocial container, and I’m curious how many people would actually be interested in such a beast if it was open source. Even with a container you still have s…

---

## [How can I delete a file?](https://www.ruby-forum.com/t/how-can-i-delete-a-file/157462)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 9:02am UTC](https://www.ruby-forum.com/t/how-can-i-delete-a-file/157462 "2009-01-12T09:02:36Z")

</div>

I want to delete a file that is in public/system/photos/original/1/photo.jpg. How can I delete it?

---

## [CSV Import with Nested Set problem](https://www.ruby-forum.com/t/csv-import-with-nested-set-problem/157488)

<div class="topic-metadata">

**Author:** [@rnewbee](https://www.ruby-forum.com/u/rnewbee)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 8:23am UTC](https://www.ruby-forum.com/t/csv-import-with-nested-set-problem/157488 "2009-01-12T08:23:33Z")

</div>

Hi all, Am struggling to get this to work: I am importing CSV file into the database. This is my code def import file = params\[:import\]\[:file\] row\_count=0 FasterCSV.parse(file, :headers =\> true) do |food| …

---

## [Extra Dynamic Partials in Custom Layouts](https://www.ruby-forum.com/t/extra-dynamic-partials-in-custom-layouts/157487)

<div class="topic-metadata">

**Author:** [@sifix](https://www.ruby-forum.com/u/sifix)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 8:20am UTC](https://www.ruby-forum.com/t/extra-dynamic-partials-in-custom-layouts/157487 "2009-01-12T08:20:23Z")

</div>

Hallo, I am quite new to rails an now I am planing to create a new project and I am laying out the design. What I want to do is that the users to change dynamically through the admin area of the site the position …

---

## [Url\_for, routes, and the current url](https://www.ruby-forum.com/t/url-for-routes-and-the-current-url/157483)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 8:20am UTC](https://www.ruby-forum.com/t/url-for-routes-and-the-current-url/157483 "2009-01-12T08:20:22Z")

</div>

I need to generate 2 types of URL and have defined my routes as: map.country\_yes “/:country/ yes”, :controller=\>“posts”, :action=\>“country”, :yes=\>true map.country\_no “/:country/ no”, :controller=\>“posts”, :action…

---

## [Textile and h problems](https://www.ruby-forum.com/t/textile-and-h-problems/157481)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 6:36am UTC](https://www.ruby-forum.com/t/textile-and-h-problems/157481 "2009-01-12T06:36:42Z")

</div>

I installed Redcloth into my app so that it could use Textile. However, it seems that textilize (the function used to parse the Textile stuff) and h aren’t compatible. If I do \<%= textilize h @mymessage %\> it doesn’t …

---

## [Confused about line of code in "The Rails Way"](https://www.ruby-forum.com/t/confused-about-line-of-code-in-the-rails-way/157475)

<div class="topic-metadata">

**Author:** [@Teedub](https://www.ruby-forum.com/u/Teedub)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 2:53am UTC](https://www.ruby-forum.com/t/confused-about-line-of-code-in-the-rails-way/157475 "2009-01-12T02:53:53Z")

</div>

I am reading Obie’s book (again) and I am confused about a line on page 450. This is the book that says “Covers Rails 2.0” in a yellow circle on the cover. The erb code is: \<% remote\_form\_for :addition, @addition, :u…

---

## [Versionning system](https://www.ruby-forum.com/t/versionning-system/157149)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 9\
**Last updated:** [January 12, 2009, 2:35am UTC](https://www.ruby-forum.com/t/versionning-system/157149 "2009-01-12T02:35:44Z")

</div>

Hi all. I want to apologize, I guess this is not the best place to post this but I’m interested to know what RoR developers think. What would be a good open source versionning system for somebody that has never used …

---

## [How to rename and xml element](https://www.ruby-forum.com/t/how-to-rename-and-xml-element/157472)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 2:18am UTC](https://www.ruby-forum.com/t/how-to-rename-and-xml-element/157472 "2009-01-12T02:18:46Z")

</div>

Is there an easy way to rename an element within an XML file after I have called object.to\_xml?

---

## [Rake vs Ruby for running tests (error discrepency)](https://www.ruby-forum.com/t/rake-vs-ruby-for-running-tests-error-discrepency/64349)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 5\
**Last updated:** [January 12, 2009, 1:32am UTC](https://www.ruby-forum.com/t/rake-vs-ruby-for-running-tests-error-discrepency/64349 "2009-01-12T01:32:56Z")

</div>

I’m having (to me) a strange problem with errors when running my tests with rake as opposed to using ruby. If I do rake test:units I get this error for several tests, but not all: Error: test\_player\_has\_game\_statis…

---

## [Large uploads with attchment-fu](https://www.ruby-forum.com/t/large-uploads-with-attchment-fu/157446)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 4\
**Last updated:** [January 12, 2009, 12:43am UTC](https://www.ruby-forum.com/t/large-uploads-with-attchment-fu/157446 "2009-01-12T00:43:59Z")

</div>

Hi I am trying to upload 30mb files with attachment-fu, these seem to just hang. (works file for small image files) I am using mongrel cluster and nginx… Does anyone have any advice? Thanks Richard

---

## [Named\_scope on has\_many, find all records that don't have elements in that association](https://www.ruby-forum.com/t/named-scope-on-has-many-find-all-records-that-dont-have-elements-in-that-association/157468)

<div class="topic-metadata">

**Author:** [@gabriele](https://www.ruby-forum.com/u/gabriele)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 12:21am UTC](https://www.ruby-forum.com/t/named-scope-on-has-many-find-all-records-that-dont-have-elements-in-that-association/157468 "2009-01-12T00:21:43Z")

</div>

Hi, I have a Customer model that has\_many :addresses, is there a way (via named scope or any other method that’s … ehm … model side) to obtain all the Customers that don’t have any addresses at all (for which the as…

---

## [Can error\_message\_on display multiple errors?](https://www.ruby-forum.com/t/can-error-message-on-display-multiple-errors/157426)

<div class="topic-metadata">

**Author:** [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 12:19am UTC](https://www.ruby-forum.com/t/can-error-message-on-display-multiple-errors/157426 "2009-01-12T00:19:58Z")

</div>

Is there an easy way to make error\_message\_on display more than just one error message? I know I could create a custom form builder, but it looks complicated and I would rather learn that when I have more time.

---

## [Problem updating sqlite database with active record](https://www.ruby-forum.com/t/problem-updating-sqlite-database-with-active-record/157470)

<div class="topic-metadata">

**Author:** [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/problem-updating-sqlite-database-with-active-record/157470 "2009-01-11T23:34:34Z")

</div>

I am trying to use active record outside of rails using sqlite3-ruby (on OSX Tiger). This worked find with ruby 1.8. After installing Ruby 1.9 using MacPorts (and installing rails and sqlite-ruby gem) I am getting an…

---

## [ActiveRecord: Can't store a class derived from AR::Base](https://www.ruby-forum.com/t/activerecord-cant-store-a-class-derived-from-ar-base/157400)

<div class="topic-metadata">

**Author:** [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Replies:** 4\
**Last updated:** [January 11, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/activerecord-cant-store-a-class-derived-from-ar-base/157400 "2009-01-11T21:06:27Z")

</div>

Hi, try to use ActiveRecord for my little standalone application, without the rails environment. Here is my first try 8\<-------------------------------------------------- Main if FILE == $0 then ActiveRecord::Base.e…

---

## [Rails Hosting](https://www.ruby-forum.com/t/rails-hosting/157044)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 18\
**Last updated:** [January 11, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/rails-hosting/157044 "2009-01-11T20:33:34Z")

</div>

Hi- I’ve done some searching, but since there are many options, I’d like to get some feedback from the group at large. I have a couple of Rails apps that will likely not see too much traffic and I would like to find …

---

## [Storing localized date into DB](https://www.ruby-forum.com/t/storing-localized-date-into-db/157463)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 7:53pm UTC](https://www.ruby-forum.com/t/storing-localized-date-into-db/157463 "2009-01-11T19:53:35Z")

</div>

receiving a date string param\[:company\]\[:contracted\_on\] like “11/01/2009” (format “%e/%m/%Y”) what should I write to convert the params into an acceptable DateTime attribute in the DB, ? (in a before\_save in my …

---

## [Is "scaffold" deprecated?](https://www.ruby-forum.com/t/is-scaffold-deprecated/157459)

<div class="topic-metadata">

**Author:** [@cutegirl](https://www.ruby-forum.com/u/cutegirl)\
**Replies:** 1\
**Last updated:** [January 11, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/is-scaffold-deprecated/157459 "2009-01-11T18:03:00Z")

</div>

I used “scaffold” in my controller. But an error messaged said it is an undefined method. What is the correspoinding new method to this one? Thanks

---

## [Bad sql after :conditions =\>](https://www.ruby-forum.com/t/bad-sql-after-conditions/157454)

<div class="topic-metadata">

**Author:** [@gotar](https://www.ruby-forum.com/u/gotar)\
**Replies:** 6\
**Last updated:** [January 11, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/bad-sql-after-conditions/157454 "2009-01-11T17:25:19Z")

</div>

I’ve something like that: in layout : links looks that : \<%= link\_to month.strftime(’%B, %Y’), “/?y=#{month.strftime(”%Y")}&m=#{month.strftime("%m")}" %\> in controler I’ve : if params\[:y\] && params\[:m\] @posts = Po…

---

## [Params\[:xxx\]](https://www.ruby-forum.com/t/params-xxx/157402)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 12\
**Last updated:** [January 11, 2009, 4:28pm UTC](https://www.ruby-forum.com/t/params-xxx/157402 "2009-01-11T16:28:54Z")

</div>

If I have what is params\[:???\] params\[:user\[city\]\] ???

---

## [Rails as RESTful web service](https://www.ruby-forum.com/t/rails-as-restful-web-service/157438)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [January 11, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/rails-as-restful-web-service/157438 "2009-01-11T15:27:47Z")

</div>

Dear all, Is it possible to use rails as a RESTful web service? Has anyone done this before? Is there any drawback when doing this? Could anyone share their experiences? Thanks in advance.

---

## [Confirming (via javascript) before save](https://www.ruby-forum.com/t/confirming-via-javascript-before-save/157457)

<div class="topic-metadata">

**Author:** [@felipegiotto](https://www.ruby-forum.com/u/felipegiotto)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/confirming-via-javascript-before-save/157457 "2009-01-11T15:07:49Z")

</div>

Hello all, I have the following scenario. The user will input a name for the student to be added, since you can have duplicate names, the user will be the one in charge of checking if he is not adding the same stud…

---

## [Why does ActiveRecord allow perception of success when updating an ID, however it doesn't really wor](https://www.ruby-forum.com/t/why-does-activerecord-allow-perception-of-success-when-updating-an-id-however-it-doesnt-really-wor/157439)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 6\
**Last updated:** [January 11, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/why-does-activerecord-allow-perception-of-success-when-updating-an-id-however-it-doesnt-really-wor/157439 "2009-01-11T13:32:40Z")

</div>

Hi, Why does ActiveRecord allow perception of success when updating an ID, however it doesn’t really work(i.e. no change in database)? Here’s an example. The update of “id” versus update of a non-existent attribute. …

---

## [Finding eval unique values in a name column](https://www.ruby-forum.com/t/finding-eval-unique-values-in-a-name-column/157380)

<div class="topic-metadata">

**Author:** [@rakenewuser](https://www.ruby-forum.com/u/rakenewuser)\
**Replies:** 2\
**Last updated:** [January 11, 2009, 7:20am UTC](https://www.ruby-forum.com/t/finding-eval-unique-values-in-a-name-column/157380 "2009-01-11T07:20:53Z")

</div>

Hi, How to have an output using eval for a unique values in a “name” calumn? Data; {:name=\>“maria”, :name=\>“lorie”, :name=\>“maria”, :name=\>“smith”, :name=\>“maria”} {:name=\>“maria”, :name=\>“den”, :name=\>“maria”, :nam…

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

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