# Rails

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

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

---

## [Controller Search Strategy](https://www.ruby-forum.com/t/controller-search-strategy/183378)

<div class="topic-metadata">

**Author:** [@sshefer](https://www.ruby-forum.com/u/sshefer)\
**Replies:** 4\
**Last updated:** [February 14, 2010, 5:07am UTC](https://www.ruby-forum.com/t/controller-search-strategy/183378 "2010-02-14T05:07:11Z")

</div>

I’m trying to create a search action for one of my controllers that can take in different params. Something I can use like an api call: …/users/search?first\_name=john&org\_id=1 Any idea how I can start this? I’d like…

---

## [Utf8 problem](https://www.ruby-forum.com/t/utf8-problem/183425)

<div class="topic-metadata">

**Author:** [@kouzma](https://www.ruby-forum.com/u/kouzma)\
**Replies:** 1\
**Last updated:** [February 14, 2010, 3:01am UTC](https://www.ruby-forum.com/t/utf8-problem/183425 "2010-02-14T03:01:25Z")

</div>

Hello. I’ve started to study ruby and rails. I added string to the model: validates\_length\_of :first\_name, :within =\> 3…64, :too\_long =\> ‘long’, :too\_short =\> ‘short’ It works. I changed error messges (I need to us…

---

## [Modifying Params Hash](https://www.ruby-forum.com/t/modifying-params-hash/183432)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 1\
**Last updated:** [February 14, 2010, 2:41am UTC](https://www.ruby-forum.com/t/modifying-params-hash/183432 "2010-02-14T02:41:01Z")

</div>

Is there a way to modify the params hash? I have an external service that is sending requests to me and I can not control they way they send the request. It is one flat hash and i would like to take some of values fro…

---

## [Migrations to load photos with attachment\_fu?](https://www.ruby-forum.com/t/migrations-to-load-photos-with-attachment-fu/119788)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 14, 2010, 2:39am UTC](https://www.ruby-forum.com/t/migrations-to-load-photos-with-attachment-fu/119788 "2010-02-14T02:39:11Z")

</div>

I’ve been studying the web this morning and trying to find examples where someone has imported photo ‘test data’ using attachment\_fu? I’ve tried this in many was using a traditional data migration like I’ve done hundr…

---

## [A (hopefully...) quick rake db:migrate question](https://www.ruby-forum.com/t/a-hopefully-quick-rake-db-migrate-question/183433)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 14, 2010, 1:33am UTC](https://www.ruby-forum.com/t/a-hopefully-quick-rake-db-migrate-question/183433 "2010-02-14T01:33:00Z")

</div>

Hey Folks, RoR noob here with a quick question. I have added a field to a table using: ruby script/generate migration add\_price\_to\_product price:decimal, and did: rake db:migrate afterwards. no change was reflecte…

---

## [Noob question : action controller exception](https://www.ruby-forum.com/t/noob-question-action-controller-exception/183428)

<div class="topic-metadata">

**Author:** [@radu\_puspana](https://www.ruby-forum.com/u/radu_puspana)\
**Replies:** 7\
**Last updated:** [February 13, 2010, 9:28pm UTC](https://www.ruby-forum.com/t/noob-question-action-controller-exception/183428 "2010-02-13T21:28:21Z")

</div>

Hi folks, can you spare some time? i could sure use it. This is the error message : ArgumentError in Store#save\_order Showing app/views/store/checkout.html.erb where line #10 raised: interning empty string Extracted…

---

## [RubyOnRails and number of projects](https://www.ruby-forum.com/t/rubyonrails-and-number-of-projects/183417)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 2\
**Last updated:** [February 13, 2010, 7:55pm UTC](https://www.ruby-forum.com/t/rubyonrails-and-number-of-projects/183417 "2010-02-13T19:55:17Z")

</div>

Hi This I am writing just of curiosity. I like ruby and rails very much. But when I watch number of rails projects in freelance sites like rentacoder or elance, it is found that the number of rails projects is very l…

---

## [Foreign key in views](https://www.ruby-forum.com/t/foreign-key-in-views/183424)

<div class="topic-metadata">

**Author:** [@andkjaer](https://www.ruby-forum.com/u/andkjaer)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 7:09pm UTC](https://www.ruby-forum.com/t/foreign-key-in-views/183424 "2010-02-13T19:09:03Z")

</div>

Hi i have the following code: class Color \< ActiveRecord::Base has\_many :products end class Product \< ActiveRecord::Base belongs\_to :color end Products index view: \<% @products.each do |product| %\> \<%=h p…

---

## [Why does config.gem mess up migration?](https://www.ruby-forum.com/t/why-does-config-gem-mess-up-migration/183387)

<div class="topic-metadata">

**Author:** [@rickm](https://www.ruby-forum.com/u/rickm)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 5:05pm UTC](https://www.ruby-forum.com/t/why-does-config-gem-mess-up-migration/183387 "2010-02-13T17:05:34Z")

</div>

I was working this morning, trying to clean up my project and I did something that sent migrations to hell-in-a-hand-basket. I tried to run rake db:migrate --trace I got the following error msg: (in /Users/richardmar…

---

## [Grouped\_options\_for\_select](https://www.ruby-forum.com/t/grouped-options-for-select/183374)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 4\
**Last updated:** [February 13, 2010, 4:20pm UTC](https://www.ruby-forum.com/t/grouped-options-for-select/183374 "2010-02-13T16:20:46Z")

</div>

Hi I have two ojects @Parent @Child that i want to nest together to create a select list for form. @Parent @Child where @Parent has\_many:Childern and Child belongs\_to:parent In the db I have a field within child tab…

---

## [Enabling debugger in initializers](https://www.ruby-forum.com/t/enabling-debugger-in-initializers/183406)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 2:57pm UTC](https://www.ruby-forum.com/t/enabling-debugger-in-initializers/183406 "2010-02-13T14:57:59Z")

</div>

Is it possible to get the debugger to run when initializers are being executed?

---

## [Save image from url to blob](https://www.ruby-forum.com/t/save-image-from-url-to-blob/183405)

<div class="topic-metadata">

**Author:** [@Frank\_in\_Tennessee](https://www.ruby-forum.com/u/Frank_in_Tennessee)\
**Replies:** 0\
**Last updated:** [February 13, 2010, 6:07am UTC](https://www.ruby-forum.com/t/save-image-from-url-to-blob/183405 "2010-02-13T06:07:50Z")

</div>

Hello, I would like to save jpg images from urls similar to the one below to a field defined as a blob, but I am not sure how to code it. Is this how it should be coded if the url was extracted? image\_file = Image.…

---

## [Store multiple check\_box of same attribute in "Search" class](https://www.ruby-forum.com/t/store-multiple-check-box-of-same-attribute-in-search-class/183184)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 2:54am UTC](https://www.ruby-forum.com/t/store-multiple-check-box-of-same-attribute-in-search-class/183184 "2010-02-13T02:54:41Z")

</div>

How do I store the value of multiple checkboxes as a result of using “check\_box” helper in a “Search” class? A “Search” class is explained here: #111 Advanced Search Form - RailsCasts. For example, a user should be …

---

## [No such file to load -- linguistics.rb](https://www.ruby-forum.com/t/no-such-file-to-load-linguistics-rb/183343)

<div class="topic-metadata">

**Author:** [@saboor](https://www.ruby-forum.com/u/saboor)\
**Replies:** 2\
**Last updated:** [February 13, 2010, 12:19am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-linguistics-rb/183343 "2010-02-13T00:19:00Z")

</div>

hi i want to convert no to words so using linguistics.rb; while using it linguistics.rb i am receiving an error no such file to load – linguistics.rb i have installed gem for it linguistics \<1.0.8\> code=\> require…

---

## [Log access denied](https://www.ruby-forum.com/t/log-access-denied/183390)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 2\
**Last updated:** [February 12, 2010, 11:19pm UTC](https://www.ruby-forum.com/t/log-access-denied/183390 "2010-02-12T23:19:54Z")

</div>

Problem: Mongrel cannot start because access to log is denied. I just switched to a new development laptop (Snow Leopard). I think I installed everything I needed. I git clone the application I am developing from t…

---

## [What happens to RJS in Rails 3](https://www.ruby-forum.com/t/what-happens-to-rjs-in-rails-3/183388)

<div class="topic-metadata">

**Author:** [@Emery\_F](https://www.ruby-forum.com/u/Emery_F)\
**Replies:** 2\
**Last updated:** [February 12, 2010, 9:29pm UTC](https://www.ruby-forum.com/t/what-happens-to-rjs-in-rails-3/183388 "2010-02-12T21:29:52Z")

</div>

I know that Rails 3 ideal of unobtrusive javascript will result in the removal of all inline javascript. But where does that leave RJS? It looks like PrototypeGenerator is still a part of the Rails core, so I’m going …

---

## [Rails 2.2.2 and mysql issue on ubuntu](https://www.ruby-forum.com/t/rails-2-2-2-and-mysql-issue-on-ubuntu/159100)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 8\
**Last updated:** [February 12, 2010, 8:38pm UTC](https://www.ruby-forum.com/t/rails-2-2-2-and-mysql-issue-on-ubuntu/159100 "2010-02-12T20:38:31Z")

</div>

Hi there, It has been a while i did not use rails. I have upgraded to rails 2.2.2 and I tried to run my application, i got this error !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install th…

---

## [Googlebots - sitemaps](https://www.ruby-forum.com/t/googlebots-sitemaps/183367)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 6\
**Last updated:** [February 12, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/googlebots-sitemaps/183367 "2010-02-12T18:13:47Z")

</div>

I am close to launching a web site and so I have directed Google (via Webmaster Tools) to index parts of the site via a sitemap (a rather interesting approach to testing I might add). Anyway, there are places where I …

---

## [ActiveRecord Transaction Rollback not happening/Postgres](https://www.ruby-forum.com/t/activerecord-transaction-rollback-not-happening-postgres/183376)

<div class="topic-metadata">

**Author:** [@smarter](https://www.ruby-forum.com/u/smarter)\
**Replies:** 2\
**Last updated:** [February 12, 2010, 6:03pm UTC](https://www.ruby-forum.com/t/activerecord-transaction-rollback-not-happening-postgres/183376 "2010-02-12T18:03:59Z")

</div>

I have these settings using postgresql gem with Postgres 8.4 Installed: development: adapter: postgresql host: localhost database: db\_development username: postgres password: postgres encoding: utf8 Code snippet …

---

## [Repeated methods in rjs](https://www.ruby-forum.com/t/repeated-methods-in-rjs/183317)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 36\
**Last updated:** [February 12, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/repeated-methods-in-rjs/183317 "2010-02-12T17:52:24Z")

</div>

Is there a way to use any kind of helper or something if you do the same thing on every rjs call? Like render a flash box div?

---

## [A little more help with a collection](https://www.ruby-forum.com/t/a-little-more-help-with-a-collection/183373)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 3\
**Last updated:** [February 12, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/a-little-more-help-with-a-collection/183373 "2010-02-12T17:21:25Z")

</div>

Month: \<%= select\_tag (:month, options\_for\_select(\[\[“January”, 1\], \[“February”, 2\], \[“March”, 3\], \[“April”, 4\], \[“May”, 5\], \[“June”, 6\], \[“July”, 7\], \[“August”, 8\], \[“September”, 9\], \[“October”, 10\], \[“November”, 11\], \[…

---

## [3-second-n00b question](https://www.ruby-forum.com/t/3-second-n00b-question/183368)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 8\
**Last updated:** [February 12, 2010, 3:58pm UTC](https://www.ruby-forum.com/t/3-second-n00b-question/183368 "2010-02-12T15:58:50Z")

</div>

Hi there, my short question: Assume I have these 2 cases in my code : ============================ :name =\> h(agent.firstname) \[…\] :name =\> h(agent.sharedname) To stay DRY, I want this to become just 1 line, by rep…

---

## [Rails Upgrade / Installation Error](https://www.ruby-forum.com/t/rails-upgrade-installation-error/183364)

<div class="topic-metadata">

**Author:** [@Lee\_Brown](https://www.ruby-forum.com/u/Lee_Brown)\
**Replies:** 1\
**Last updated:** [February 12, 2010, 3:55pm UTC](https://www.ruby-forum.com/t/rails-upgrade-installation-error/183364 "2010-02-12T15:55:48Z")

</div>

I have been learning Ror, and developing my first application. I unfortunately am also relatively new to the mac, so please forgive my ignorance if I did something blatantly ridiculous. I have been using rails 2.2.2.…

---

## [Belongs\_to and has\_many](https://www.ruby-forum.com/t/belongs-to-and-has-many/183349)

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 3\
**Last updated:** [February 12, 2010, 3:36pm UTC](https://www.ruby-forum.com/t/belongs-to-and-has-many/183349 "2010-02-12T15:36:35Z")

</div>

Hi all I have a model called,article which belongs\_to user so in article.rb belongs\_to :user and in user.rb has\_many :posts, :dependent =\> :nullify, :class\_name =\> ‘Article’ so now @user.posts is giving the posts o…

---

## [Syntax error](https://www.ruby-forum.com/t/syntax-error/183355)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [February 12, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/syntax-error/183355 "2010-02-12T15:30:44Z")

</div>

Does my below code make sense…is it right? \<%@profile = UserPrivilege.find\_all\_by\_user\_id(4)%\> \<%= options\_from\_collection\_for\_select(Profile.find(:all,:conditions =\> {:id =\> “#{@profile.map{|s| s.profile\_id}}”},‘id’,…

---

## [Modular applications within Rails 3](https://www.ruby-forum.com/t/modular-applications-within-rails-3/183366)

<div class="topic-metadata">

**Author:** [@joshnesbitt](https://www.ruby-forum.com/u/joshnesbitt)\
**Replies:** 0\
**Last updated:** [February 12, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/modular-applications-within-rails-3/183366 "2010-02-12T14:49:10Z")

</div>

Hey all, I’m looking for a smart way to create modular applications with Rails 3. Prior to Rails 3 I have been using engines and GIT sub-modules to maintain separate code bases however i was wondering if there is a b…

---

## [Session based Routing](https://www.ruby-forum.com/t/session-based-routing/183305)

<div class="topic-metadata">

**Author:** [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Replies:** 5\
**Last updated:** [February 12, 2010, 2:04pm UTC](https://www.ruby-forum.com/t/session-based-routing/183305 "2010-02-12T14:04:41Z")

</div>

Hi, I’m developing a site with a Login on the frontpage, so when you logged in you will see another “thing” than if you are not logged in. For Example you will see some explanations about the site if you are a visit…

---

## [Where can I find the pre-defined constants for the "head" method? e.g. "return head(:method\_not\_al](https://www.ruby-forum.com/t/where-can-i-find-the-pre-defined-constants-for-the-head-method-e-g-return-head-method-not-al/183351)

<div class="topic-metadata">

**Author:** [@greghauptmann](https://www.ruby-forum.com/u/greghauptmann)\
**Replies:** 3\
**Last updated:** [February 12, 2010, 1:39pm UTC](https://www.ruby-forum.com/t/where-can-i-find-the-pre-defined-constants-for-the-head-method-e-g-return-head-method-not-al/183351 "2010-02-12T13:39:31Z")

</div>

Hi, Where can I find the pre-defined constants for the “head” method? e.g. “return head(:method\_not\_allowed)” =\> implies “:method\_not\_allowed” must come from somewhere

---

## [Ruby gems --\> no such file to load - fastthread](https://www.ruby-forum.com/t/ruby-gems-no-such-file-to-load-fastthread/171318)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 4\
**Last updated:** [February 12, 2010, 1:23pm UTC](https://www.ruby-forum.com/t/ruby-gems-no-such-file-to-load-fastthread/171318 "2010-02-12T13:23:21Z")

</div>

I am having quite a time with a project. I had a server up and running without a problem. I then started to deploy a project to a separate directory and then the original project crashed so the web site is offline. …

---

## [Rails 2.3.5 and 3.0 side by side](https://www.ruby-forum.com/t/rails-2-3-5-and-3-0-side-by-side/183362)

<div class="topic-metadata">

**Author:** [@bigos](https://www.ruby-forum.com/u/bigos)\
**Replies:** 0\
**Last updated:** [February 12, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/rails-2-3-5-and-3-0-side-by-side/183362 "2010-02-12T12:13:29Z")

</div>

Hi All, Yesterday I have spent whole day installing Rails 3.0 in a virtual machine and then installing them side by side on a development machine, which runs Linux Mint 8. I already had Ruby 1.8.7 and Ruby 1.9.1p243 …

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

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