# Rails

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

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

---

## [How does the controller "know" about the model?](https://www.ruby-forum.com/t/how-does-the-controller-know-about-the-model/193630)

<div class="topic-metadata">

**Author:** [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Replies:** 16\
**Last updated:** [August 24, 2010, 10:15am UTC](https://www.ruby-forum.com/t/how-does-the-controller-know-about-the-model/193630 "2010-08-24T10:15:09Z")

</div>

I am going through the Depot application tutorial in the Agile book and have a question… How is that I can put a reference to my model (i.e. @products = Produts.all) in my store controller (or any other for that matte…

---

## [Cannot migrate database, strange error!](https://www.ruby-forum.com/t/cannot-migrate-database-strange-error/193757)

<div class="topic-metadata">

**Author:** [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Replies:** 1\
**Last updated:** [August 24, 2010, 10:01am UTC](https://www.ruby-forum.com/t/cannot-migrate-database-strange-error/193757 "2010-08-24T10:01:05Z")

</div>

Im using restful authentication, and i changed the username model from login to username. The error is Mysql::Error: Key column ‘login’ doesn’t exist in table: CREATE UNIQUE INDEX index\_users\_on\_login Heres the trac…

---

## [Hiring Ruby on Rails Developers in Austin](https://www.ruby-forum.com/t/hiring-ruby-on-rails-developers-in-austin/193781)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 9:54am UTC](https://www.ruby-forum.com/t/hiring-ruby-on-rails-developers-in-austin/193781 "2010-08-24T09:54:03Z")

</div>

If you are a Ruby on Rails Developer and are interested in the job market, please contact me to hear about several opportunities here in Austin. We are looking for developers with front end, back end and/or managemen…

---

## [I18n v0.4.2](https://www.ruby-forum.com/t/i18n-v0-4-2/193777)

<div class="topic-metadata">

**Author:** [@lo\_pan](https://www.ruby-forum.com/u/lo_pan)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 9:01am UTC](https://www.ruby-forum.com/t/i18n-v0-4-2/193777 "2010-08-24T09:01:58Z")

</div>

Hi, Can we get an i18n v0.4.2 gem before rails 3 is released? Thanks, Lawrence

---

## [Autocomplete text field with HABTM association - PLEASE HELP](https://www.ruby-forum.com/t/autocomplete-text-field-with-habtm-association-please-help/193774)

<div class="topic-metadata">

**Author:** [@agilehack](https://www.ruby-forum.com/u/agilehack)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 6:42am UTC](https://www.ruby-forum.com/t/autocomplete-text-field-with-habtm-association-please-help/193774 "2010-08-24T06:42:03Z")

</div>

can anyone help me work this functionality out? I actually have 3 classes each with a HABTM relationships with each other but right now I am just trying to get one to work. I have 2 models, ‘employees’ and ‘practice…

---

## [French characters not showing in form error messages](https://www.ruby-forum.com/t/french-characters-not-showing-in-form-error-messages/193771)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 6:03am UTC](https://www.ruby-forum.com/t/french-characters-not-showing-in-form-error-messages/193771 "2010-08-24T06:03:20Z")

</div>

I have a form for the user to fill out and submit. If the user does not supply all of the required information a red box with details about the missing information is shown to the user. The problem is that these erro…

---

## [Recommendations for Google Checkout integration](https://www.ruby-forum.com/t/recommendations-for-google-checkout-integration/193760)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [August 24, 2010, 5:00am UTC](https://www.ruby-forum.com/t/recommendations-for-google-checkout-integration/193760 "2010-08-24T05:00:47Z")

</div>

All, I need to be able to integrate with Google checkout. Does anyone have advice for which gem/plugin would be most appropriate to use to integrate with it? Many thanks, Wes

---

## [Rails 3 RC: Access Mailer classes from rake task?](https://www.ruby-forum.com/t/rails-3-rc-access-mailer-classes-from-rake-task/193770)

<div class="topic-metadata">

**Author:** [@yuri](https://www.ruby-forum.com/u/yuri)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 4:57am UTC](https://www.ruby-forum.com/t/rails-3-rc-access-mailer-classes-from-rake-task/193770 "2010-08-24T04:57:52Z")

</div>

Anyone know if there’s something special required for code running from Rake, e.g. resque jobs, to be able to see app mailer classes? Access to model code is no problem, but anything that hits FooMailer, for example, …

---

## [Detecting a New Session](https://www.ruby-forum.com/t/detecting-a-new-session/193765)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 2:20am UTC](https://www.ruby-forum.com/t/detecting-a-new-session/193765 "2010-08-24T02:20:24Z")

</div>

Is there a way to determine if the current request is the first request of the Rails session? I could create a session variable to accomplish this, but it would be nice if you could do something like request.new\_sess…

---

## [MYSQL Result Hash Problem](https://www.ruby-forum.com/t/mysql-result-hash-problem/193718)

<div class="topic-metadata">

**Author:** [@sudheendra](https://www.ruby-forum.com/u/sudheendra)\
**Replies:** 2\
**Last updated:** [August 24, 2010, 2:18am UTC](https://www.ruby-forum.com/t/mysql-result-hash-problem/193718 "2010-08-24T02:18:51Z")

</div>

Hi, Is there any way to iterate through MySQL Result Hash multiple times ? Current Problem: After One iteration, second iteration no records. Need your help at the earliest. Regards, Sudheendra

---

## [Memory Leak](https://www.ruby-forum.com/t/memory-leak/193764)

<div class="topic-metadata">

**Author:** [@mrpunkin](https://www.ruby-forum.com/u/mrpunkin)\
**Replies:** 0\
**Last updated:** [August 24, 2010, 1:52am UTC](https://www.ruby-forum.com/t/memory-leak/193764 "2010-08-24T01:52:27Z")

</div>

Can anyone tell me how I can find out what lines of code or what objects are causing us memory issues? According to all the memory tools we have used it is either a String or an Array, since both those take up tons of …

---

## [Trying to get a list of households with one person in them](https://www.ruby-forum.com/t/trying-to-get-a-list-of-households-with-one-person-in-them/193748)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 5\
**Last updated:** [August 24, 2010, 1:20am UTC](https://www.ruby-forum.com/t/trying-to-get-a-list-of-households-with-one-person-in-them/193748 "2010-08-24T01:20:42Z")

</div>

in my models, household has\_many :people and people has\_one :household household has a name field, and people has household\_id the closest I got was: @test = Household.count :all, :group =\> ‘people.household\_id’, :joi…

---

## [MongoDb MongoMapper and Rails Oh MY!](https://www.ruby-forum.com/t/mongodb-mongomapper-and-rails-oh-my/193753)

<div class="topic-metadata">

**Author:** [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Replies:** 1\
**Last updated:** [August 23, 2010, 11:28pm UTC](https://www.ruby-forum.com/t/mongodb-mongomapper-and-rails-oh-my/193753 "2010-08-23T23:28:16Z")

</div>

For the past couple of hours I am trying to insert a simple document into MongoDb database using Rails and MongoMapper. There is no error but the document never gets inserted. Here is my simple class: class Post incl…

---

## [Dynamic Routes](https://www.ruby-forum.com/t/dynamic-routes/193754)

<div class="topic-metadata">

**Author:** [@Luigi\_MaselliSS](https://www.ruby-forum.com/u/Luigi_MaselliSS)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 11:19pm UTC](https://www.ruby-forum.com/t/dynamic-routes/193754 "2010-08-23T23:19:57Z")

</div>

Hi, do you have a clean way to manage dynamic routes? There is a suggestion here with render\_component but it is deprecated… Thanks

---

## [Rails 3 routing for namespaced controllers](https://www.ruby-forum.com/t/rails-3-routing-for-namespaced-controllers/193756)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 11:16pm UTC](https://www.ruby-forum.com/t/rails-3-routing-for-namespaced-controllers/193756 "2010-08-23T23:16:59Z")

</div>

Hi, I need to use legacy-style routing. And it’s namespaced. According to Rails Routing from the Outside In — Ruby on Rails Guides, it should be like the following. match ‘:controller(/:action(/:id))’, :controller =\> …

---

## [Button function in rails](https://www.ruby-forum.com/t/button-function-in-rails/193750)

<div class="topic-metadata">

**Author:** [@ithelp85](https://www.ruby-forum.com/u/ithelp85)\
**Replies:** 1\
**Last updated:** [August 23, 2010, 10:23pm UTC](https://www.ruby-forum.com/t/button-function-in-rails/193750 "2010-08-23T22:23:51Z")

</div>

I want to create a button function on a main page that updates the database, without having to open the form and editing and updating through the form. Anyone know how to do this, if it is possible? Thanks in advance…

---

## [SWFupload and Rails 3](https://www.ruby-forum.com/t/swfupload-and-rails-3/193751)

<div class="topic-metadata">

**Author:** [@heldopslippers](https://www.ruby-forum.com/u/heldopslippers)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 10:14pm UTC](https://www.ruby-forum.com/t/swfupload-and-rails-3/193751 "2010-08-23T22:14:39Z")

</div>

He Guys! I have a problem with swfupload and have been on it for hours! … i have no hair left on my head ! i am trying to get the swfupload working with rails 3 Of course i am able to upload with a simple file\_field. …

---

## [Favicon for api.rubyonrails.org documentation pages](https://www.ruby-forum.com/t/favicon-for-api-rubyonrails-org-documentation-pages/193749)

<div class="topic-metadata">

**Author:** [@sayeo87](https://www.ruby-forum.com/u/sayeo87)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 10:09pm UTC](https://www.ruby-forum.com/t/favicon-for-api-rubyonrails-org-documentation-pages/193749 "2010-08-23T22:09:48Z")

</div>

It kind of annoys me that all the api.rubyonrails.org documentation pages don’t have a Favicon. Would whoever is in charge of that be interested in adding one? Thanks, Suan

---

## [Trying to get a list of households with one person in them](https://www.ruby-forum.com/t/trying-to-get-a-list-of-households-with-one-person-in-them/193747)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 9:59pm UTC](https://www.ruby-forum.com/t/trying-to-get-a-list-of-households-with-one-person-in-them/193747 "2010-08-23T21:59:15Z")

</div>

@test = Household.count :all, :group =\> ‘people.household\_id’, :joins =\> :people

---

## [Field name with "-"](https://www.ruby-forum.com/t/field-name-with/193742)

<div class="topic-metadata">

**Author:** [@holyboy](https://www.ruby-forum.com/u/holyboy)\
**Replies:** 1\
**Last updated:** [August 23, 2010, 9:13pm UTC](https://www.ruby-forum.com/t/field-name-with/193742 "2010-08-23T21:13:08Z")

</div>

Hello. I’m tryes to write webGUI for application’s database. This application uses pre-defined field names, for i.e. “session-timers” and I can’t change its. In the users.rb writes: def index @sipusers=User.all en…

---

## [Rake task can't find installed gems](https://www.ruby-forum.com/t/rake-task-cant-find-installed-gems/193738)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 7:07pm UTC](https://www.ruby-forum.com/t/rake-task-cant-find-installed-gems/193738 "2010-08-23T19:07:13Z")

</div>

I’m running a rake task and it complains there are “Missing gems” even though they are indeed installed. However from further inspection, it appears it is not looking in my GEM PATH (/usr/local/lib/ruby/1.8) but inste…

---

## [Help me... how to convert amchart to pdf](https://www.ruby-forum.com/t/help-me-how-to-convert-amchart-to-pdf/193685)

<div class="topic-metadata">

**Author:** [@anton\_effendi](https://www.ruby-forum.com/u/anton_effendi)\
**Replies:** 5\
**Last updated:** [August 23, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/help-me-how-to-convert-amchart-to-pdf/193685 "2010-08-23T18:55:58Z")

</div>

Hi Guys I need help… I want to making 1 controller for covert html to pdf… But that html have amchart (swf). When I tried convert, the swf not loadded… Any body can help me Please??? – Senior Rails Developer Anto…

---

## [ActiveRecord::StatementInvalid Mysql::Error: MySQL server has gone away](https://www.ruby-forum.com/t/activerecord-statementinvalid-mysql-mysql-server-has-gone-away/193734)

<div class="topic-metadata">

**Author:** [@anywho](https://www.ruby-forum.com/u/anywho)\
**Replies:** 0\
**Last updated:** [August 23, 2010, 6:53pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-mysql-mysql-server-has-gone-away/193734 "2010-08-23T18:53:37Z")

</div>

Suddenly exceptional is sending emails about Mysql having gone away in production. This had not been an issue until, well, today. No changes have even been made. We see this with an internal product as well. Does anyo…

---

## [Date\_select equivalent for form\_tag?](https://www.ruby-forum.com/t/date-select-equivalent-for-form-tag/193725)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 2\
**Last updated:** [August 23, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/date-select-equivalent-for-form-tag/193725 "2010-08-23T17:56:14Z")

</div>

Is there an equivalent for date\_select to be used in a form\_tag block?

---

## [Link\_to\_function](https://www.ruby-forum.com/t/link-to-function/193726)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 5\
**Last updated:** [August 23, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/link-to-function/193726 "2010-08-23T17:52:08Z")

</div>

I require some information, displayed at the top of a page, to change onclick. The information is in the following form: Name Job role Description... \<%= link\_to "read more", :controller =\> "controller", :action =\> "…

---

## [Implementing project management and event types](https://www.ruby-forum.com/t/implementing-project-management-and-event-types/193568)

<div class="topic-metadata">

**Author:** [@richardsugg](https://www.ruby-forum.com/u/richardsugg)\
**Replies:** 4\
**Last updated:** [August 23, 2010, 3:19pm UTC](https://www.ruby-forum.com/t/implementing-project-management-and-event-types/193568 "2010-08-23T15:19:17Z")

</div>

I am implemented a simple project management application. Each project has various events, and each event can be a different type. Some event information is common, such as name, start date, close date, and comments.…

---

## [Devise and Mailer](https://www.ruby-forum.com/t/devise-and-mailer/193722)

<div class="topic-metadata">

**Author:** [@zurich\_by\_night](https://www.ruby-forum.com/u/zurich_by_night)\
**Replies:** 2\
**Last updated:** [August 23, 2010, 2:36pm UTC](https://www.ruby-forum.com/t/devise-and-mailer/193722 "2010-08-23T14:36:33Z")

</div>

Hello all, I am trying to get Devise and Mailer to work together. Whenever I send an email for the "Forget password’ section. It says: “You will receive an email with instructions about how to reset your password in a…

---

## [Come on, share your Rails powered sites with others.//Fwd: A tornado powered site to show any proje](https://www.ruby-forum.com/t/come-on-share-your-rails-powered-sites-with-others-fwd-a-tornado-powered-site-to-show-any-proje/192931)

<div class="topic-metadata">

**Author:** [@Stone\_Puzzle](https://www.ruby-forum.com/u/Stone_Puzzle)\
**Replies:** 1\
**Last updated:** [August 23, 2010, 2:10pm UTC](https://www.ruby-forum.com/t/come-on-share-your-rails-powered-sites-with-others-fwd-a-tornado-powered-site-to-show-any-proje/192931 "2010-08-23T14:10:12Z")

</div>

Ruby on Rails powered sites list http://ror.poweredsites.org The source code of this site is available at http://www.bitbucket.org/felinx/poweredsites ---------- Forwarded message ---------- From: Felinx L. removed\_e…

---

## [When after\_save isn't after the save](https://www.ruby-forum.com/t/when-after-save-isnt-after-the-save/193488)

<div class="topic-metadata">

**Author:** [@IAmNan](https://www.ruby-forum.com/u/IAmNan)\
**Replies:** 11\
**Last updated:** [August 23, 2010, 2:09pm UTC](https://www.ruby-forum.com/t/when-after-save-isnt-after-the-save/193488 "2010-08-23T14:09:02Z")

</div>

I have a Production model, which represents a farmer’s crop. After create (via after\_save) I call a method that creates one or more Supply models, which represent a week of anticipated product harvest. After each of t…

---

## [My first gem](https://www.ruby-forum.com/t/my-first-gem/193681)

<div class="topic-metadata">

**Author:** [@PsiPro](https://www.ruby-forum.com/u/PsiPro)\
**Replies:** 2\
**Last updated:** [August 23, 2010, 10:55am UTC](https://www.ruby-forum.com/t/my-first-gem/193681 "2010-08-23T10:55:15Z")

</div>

Hello all, I just published my first gem, I’ve extracted it out from a project I’m working on and just hope it would be useful to others, and get some community improvment/suggestions. The code is located on github h…

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

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