# Rails

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

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

---

## [Rails find(:all, :conditions) generates bad SQL?](https://www.ruby-forum.com/t/rails-find-all-conditions-generates-bad-sql/156819)

<div class="topic-metadata">

**Author:** [@srj](https://www.ruby-forum.com/u/srj)\
**Replies:** 3\
**Last updated:** [January 5, 2009, 2:51am UTC](https://www.ruby-forum.com/t/rails-find-all-conditions-generates-bad-sql/156819 "2009-01-05T02:51:59Z")

</div>

Hello, What is wrong with my finder method? I have the following (using Rails 2.2.2): active\_rows = Model.find(:all, :conditions =\> \["status in ?", ACTIVE\_STATUSES\]) ACTIVE\_STATUSES is a constant array with 4…

---

## [Integration test not calling destroy](https://www.ruby-forum.com/t/integration-test-not-calling-destroy/156894)

<div class="topic-metadata">

**Author:** [@avramd](https://www.ruby-forum.com/u/avramd)\
**Replies:** 0\
**Last updated:** [January 5, 2009, 1:27am UTC](https://www.ruby-forum.com/t/integration-test-not-calling-destroy/156894 "2009-01-05T01:27:11Z")

</div>

Hello, I’m writing to describe a problem I ran into, and the solution, which I’ve already found, for posterity’s sake, b/c it took a very long time to figure out. While I don’t consider myself a rails newbie, this doe…

---

## [Adding routes and link\_to](https://www.ruby-forum.com/t/adding-routes-and-link-to/156856)

<div class="topic-metadata">

**Author:** [@sobert](https://www.ruby-forum.com/u/sobert)\
**Replies:** 4\
**Last updated:** [January 5, 2009, 1:20am UTC](https://www.ruby-forum.com/t/adding-routes-and-link-to/156856 "2009-01-05T01:20:10Z")

</div>

Hello. I’ve added some routes : map.news ‘news’, :controller =\> :News, :action =\>:index map.login ‘login’, :controller =\> :Login , :action =\>:index When I go to /news or /login before adding the routes, it works well…

---

## [Including join model data](https://www.ruby-forum.com/t/including-join-model-data/156888)

<div class="topic-metadata">

**Author:** [@tlianza](https://www.ruby-forum.com/u/tlianza)\
**Replies:** 1\
**Last updated:** [January 5, 2009, 12:59am UTC](https://www.ruby-forum.com/t/including-join-model-data/156888 "2009-01-05T00:59:07Z")

</div>

I\`m using the joing model Part to access Treinando from Evento. This code works well: @treinandos = Evento.find(params\[:evento\_id\]).treinandos But the parts table has some more columns I need to retrieve addtionally. …

---

## [Trying to plan out classes/associations for a Rails project](https://www.ruby-forum.com/t/trying-to-plan-out-classes-associations-for-a-rails-project/156892)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [January 5, 2009, 12:52am UTC](https://www.ruby-forum.com/t/trying-to-plan-out-classes-associations-for-a-rails-project/156892 "2009-01-05T00:52:55Z")

</div>

Hello - I’m something of a newbie to both Ruby and Rails, and the project I’ve dreamt up is rather large and unusual, so I’m taking things slowly - doing tutorials, experimenting on the side, and so on. Now, I’m tryin…

---

## [Help with installation](https://www.ruby-forum.com/t/help-with-installation/156889)

<div class="topic-metadata">

**Author:** [@blizzyb](https://www.ruby-forum.com/u/blizzyb)\
**Replies:** 1\
**Last updated:** [January 5, 2009, 12:42am UTC](https://www.ruby-forum.com/t/help-with-installation/156889 "2009-01-05T00:42:10Z")

</div>

I’m new to ROR and have been trying persistently to resolve a problem. My environment is XP SP3, MYSQL 5.0.67.I installed Ruby then RubyGems then Rails. I can create apps and everything works except that when I go to …

---

## [Rotating images "AJAX like" on a page](https://www.ruby-forum.com/t/rotating-images-ajax-like-on-a-page/156848)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 2\
**Last updated:** [January 5, 2009, 12:39am UTC](https://www.ruby-forum.com/t/rotating-images-ajax-like-on-a-page/156848 "2009-01-05T00:39:18Z")

</div>

I’m looking to produce functionality just like what’s displayed here (Digitalagentur Leipzig – Medienfreunde) in the “A list with images and links” section. I downloaded JQuery, included this plugin, and eventually go…

---

## [How? Why? Production Woes](https://www.ruby-forum.com/t/how-why-production-woes/148127)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 6\
**Last updated:** [January 4, 2009, 10:53pm UTC](https://www.ruby-forum.com/t/how-why-production-woes/148127 "2009-01-04T22:53:11Z")

</div>

So, I can migrate without error in development, but when I migrate in production I get what’s below. The gems are the same, rails is the same version…what am I missing? \[root@uranus current\]# rake db:migrate RAILS\_EN…

---

## [Memcache-client config problem](https://www.ruby-forum.com/t/memcache-client-config-problem/109387)

<div class="topic-metadata">

**Author:** [@krates](https://www.ruby-forum.com/u/krates)\
**Replies:** 2\
**Last updated:** [January 4, 2009, 10:31pm UTC](https://www.ruby-forum.com/t/memcache-client-config-problem/109387 "2009-01-04T22:31:30Z")

</div>

I am trying to use memcache-client to store session. I have found great instructions online. However, I keep getting error and fail to start rails on radrails. I have “gem install memcache-client”: ============ gem…

---

## [Storing a static array](https://www.ruby-forum.com/t/storing-a-static-array/156884)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 5\
**Last updated:** [January 4, 2009, 10:21pm UTC](https://www.ruby-forum.com/t/storing-a-static-array/156884 "2009-01-04T22:21:52Z")

</div>

In the spirit of keeping my app DRY, i would like to store an array of strings, and call this array in a few views and possibly in my controller. Where is the best place to declare an application wide static variable? …

---

## [Merb merge: plugins or gems?](https://www.ruby-forum.com/t/merb-merge-plugins-or-gems/156882)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [January 4, 2009, 10:08pm UTC](https://www.ruby-forum.com/t/merb-merge-plugins-or-gems/156882 "2009-01-04T22:08:33Z")

</div>

I’m about to write a plugin, but i wonder: is Rails 3 going to have plugins, or is it going to work with gems, like Merb does ? If so, i should look into making it a gem right away … thx, Elise

---

## [Associations: Am I thinking right?](https://www.ruby-forum.com/t/associations-am-i-thinking-right/156886)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 2\
**Last updated:** [January 4, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/associations-am-i-thinking-right/156886 "2009-01-04T22:05:38Z")

</div>

Hello everyone, I just read the entire Associations page on the RoR Guide, and I’m wanting to see if I can run it by the pros to make sure I have it down right for my particular project. As a first test project I’m d…

---

## [Undefined method \`start\_form\_tag'](https://www.ruby-forum.com/t/undefined-method-start-form-tag/156872)

<div class="topic-metadata">

**Author:** [@cutegirl](https://www.ruby-forum.com/u/cutegirl)\
**Replies:** 5\
**Last updated:** [January 4, 2009, 9:17pm UTC](https://www.ruby-forum.com/t/undefined-method-start-form-tag/156872 "2009-01-04T21:17:53Z")

</div>

I tried to generate a form using the Rails “start\_form\_tag”, but got the error message “undefined method \`start\_form\_tag’ for #ActionView::Base:0x47b4c70”. What could be missing here. Thanks for help.

---

## [Hpricot bug](https://www.ruby-forum.com/t/hpricot-bug/156867)

<div class="topic-metadata">

**Author:** [@cellx](https://www.ruby-forum.com/u/cellx)\
**Replies:** 1\
**Last updated:** [January 4, 2009, 9:01pm UTC](https://www.ruby-forum.com/t/hpricot-bug/156867 "2009-01-04T21:01:22Z")

</div>

Hello, how could I solve my problem with hpricot under mac? I searched the same bug on google, didnÂ´t find it. Shall I reinstall my hpricot gem from my system? k2mac:demo cellx$ script/server /Users/cellx/.gem/rub…

---

## [Passing a dynamic class to translate](https://www.ruby-forum.com/t/passing-a-dynamic-class-to-translate/156617)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 1\
**Last updated:** [January 4, 2009, 8:56pm UTC](https://www.ruby-forum.com/t/passing-a-dynamic-class-to-translate/156617 "2009-01-04T20:56:49Z")

</div>

I have a single form that can be used for multiple models, in my view i origionally had “Add a New #{@element.class}” how can i write a dynamic i18n translate call? I want to do something like \<%= t ‘removed\_email\_ad…

---

## [Different view based on different model](https://www.ruby-forum.com/t/different-view-based-on-different-model/156830)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 1\
**Last updated:** [January 4, 2009, 8:56pm UTC](https://www.ruby-forum.com/t/different-view-based-on-different-model/156830 "2009-01-04T20:56:21Z")

</div>

I have a view that looks like this “Add a New #{@element.class}” where my class can be “definition”, “phrase”, etc. I want to do something like \<%= t ‘removed\_email\_address@domain.invalid’%\> so when @element is a “ph…

---

## [Using a select list for a boolean field](https://www.ruby-forum.com/t/using-a-select-list-for-a-boolean-field/156735)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 3\
**Last updated:** [January 4, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/using-a-select-list-for-a-boolean-field/156735 "2009-01-04T17:42:23Z")

</div>

Hello- I’m trying to use a select list for a boolean field in my model. I want there to be three values in the list: nil, true, and false. Here are the snippets of code I have so far: \<%= f.select :yes\_to\_terms, \[\[‘Y…

---

## [File\_column](https://www.ruby-forum.com/t/file-column/156870)

<div class="topic-metadata">

**Author:** [@Lecabel](https://www.ruby-forum.com/u/Lecabel)\
**Replies:** 0\
**Last updated:** [January 4, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/file-column/156870 "2009-01-04T17:34:10Z")

</div>

Hi, I am using file\_column insiide my rails app. I am new with programming and rails. I am trying to have three uploads inside the same view. Using file\_column only one is correctly stored. Do you have any possible …

---

## [Table associated problem using belongs\_to](https://www.ruby-forum.com/t/table-associated-problem-using-belongs-to/156854)

<div class="topic-metadata">

**Author:** [@rays](https://www.ruby-forum.com/u/rays)\
**Replies:** 3\
**Last updated:** [January 4, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/table-associated-problem-using-belongs-to/156854 "2009-01-04T17:33:35Z")

</div>

I have two tables: Table \[packages\] id name user\_name 1 PK1 Ray Table \[users\] id name full\_name 2 Ray Ray Sun My purpose is to find the full name when I find packages. So I modify Model Package to: class…

---

## [Calling class methods from included module](https://www.ruby-forum.com/t/calling-class-methods-from-included-module/156868)

<div class="topic-metadata">

**Author:** [@rasmus](https://www.ruby-forum.com/u/rasmus)\
**Replies:** 1\
**Last updated:** [January 4, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/calling-class-methods-from-included-module/156868 "2009-01-04T17:26:09Z")

</div>

Hi, I have these two ActiveRecord models: UserEvent and CoordinateEvent. The models are extended with the module MapEvent. MapEvent includes some class methods and some instance methods. Now, I want both models to us…

---

## [Error message when installing rails](https://www.ruby-forum.com/t/error-message-when-installing-rails/156843)

<div class="topic-metadata">

**Author:** [@cutegirl](https://www.ruby-forum.com/u/cutegirl)\
**Replies:** 6\
**Last updated:** [January 4, 2009, 5:17pm UTC](https://www.ruby-forum.com/t/error-message-when-installing-rails/156843 "2009-01-04T17:17:12Z")

</div>

After I entered the command “gem install rails --include-dependencies” for a while, an error message “ERROR: while executing gem… (Zlib::BufError) buffer error”. How can I fix this problem? I am new to rails and I hop…

---

## [I'm new - Need some serious help](https://www.ruby-forum.com/t/im-new-need-some-serious-help/156859)

<div class="topic-metadata">

**Author:** [@ulrich](https://www.ruby-forum.com/u/ulrich)\
**Replies:** 2\
**Last updated:** [January 4, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/im-new-need-some-serious-help/156859 "2009-01-04T14:23:04Z")

</div>

Hi, I’m just starting out to learn Ruby and do web developing as a hobby and then came across Rails. What is it exactly? The explanation on site does not exactly tell me what it is… PHP is a server-side scripting lan…

---

## [Create a logging system](https://www.ruby-forum.com/t/create-a-logging-system/156857)

<div class="topic-metadata">

**Author:** [@sobert](https://www.ruby-forum.com/u/sobert)\
**Replies:** 3\
**Last updated:** [January 4, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/create-a-logging-system/156857 "2009-01-04T13:32:37Z")

</div>

Hello. I would like to create a loggin system. I have a players model with name and passwd. Then, I would like to put the player item in the session. When I try to loggin, it create a player, so, I’m kind of lost her…

---

## [Is there any better way to do this?](https://www.ruby-forum.com/t/is-there-any-better-way-to-do-this/156834)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 4\
**Last updated:** [January 4, 2009, 8:57am UTC](https://www.ruby-forum.com/t/is-there-any-better-way-to-do-this/156834 "2009-01-04T08:57:14Z")

</div>

Is there any better way to do this? \>

---

## [Will\_paginate overwriting my user.rb?](https://www.ruby-forum.com/t/will-paginate-overwriting-my-user-rb/156851)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 4, 2009, 7:29am UTC](https://www.ruby-forum.com/t/will-paginate-overwriting-my-user-rb/156851 "2009-01-04T07:29:34Z")

</div>

In the will\_paginate plugin/gem lies a file /test/fixtures/user.rb. It seems that that user.rb is somehow overriding app/model/user.rb. How is it doing this? What can I do to stop it from destroying my app?

---

## [Related drop list](https://www.ruby-forum.com/t/related-drop-list/156849)

<div class="topic-metadata">

**Author:** [@viva\_yang](https://www.ruby-forum.com/u/viva_yang)\
**Replies:** 0\
**Last updated:** [January 4, 2009, 4:26am UTC](https://www.ruby-forum.com/t/related-drop-list/156849 "2009-01-04T04:26:46Z")

</div>

new.rhtml New pr\_cate \<%= javascript\_include\_tag 'prototype' %\> \<% form\_for(@pr\_cate) do |f| %\> \<%= f.error\_messages %\> \<%=f.select(:id, @pr\_cates.map {|u| \[u.name,u.id\]}, {:onchange =\> remote\_function( :with =\> “‘…

---

## [Will paginate and sorting](https://www.ruby-forum.com/t/will-paginate-and-sorting/156829)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 2\
**Last updated:** [January 4, 2009, 4:16am UTC](https://www.ruby-forum.com/t/will-paginate-and-sorting/156829 "2009-01-04T04:16:09Z")

</div>

Hello, I have my own functions in the controller and i want to use will paginate. when i use will paginate then i face the following problems, 1.I cannot sort the commplete results after search…i can only sort the r…

---

## [Resource api docs not working for me](https://www.ruby-forum.com/t/resource-api-docs-not-working-for-me/156701)

<div class="topic-metadata">

**Author:** [@itsastickup](https://www.ruby-forum.com/u/itsastickup)\
**Replies:** 1\
**Last updated:** [January 4, 2009, 3:29am UTC](https://www.ruby-forum.com/t/resource-api-docs-not-working-for-me/156701 "2009-01-04T03:29:19Z")

</div>

Hi, ruby 1.8.4, rails 2.2.2, mongrel 1.5.1, win xp I read in the docs that this : map.resources :articles do |article| article.resources :comments end should result in this lot: article\_comments\_url(@article) art…

---

## [Very odd NoMethodError/stack overflow](https://www.ruby-forum.com/t/very-odd-nomethoderror-stack-overflow/156792)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [January 4, 2009, 1:36am UTC](https://www.ruby-forum.com/t/very-odd-nomethoderror-stack-overflow/156792 "2009-01-04T01:36:24Z")

</div>

I’m getting this very weird error and I can’t figure out what the problem is. I’m using acts\_as\_commentable. Basically, I have a partial with this code in it: \<%= link\_to comment.user.login, profile\_path(User.…

---

## [Validation error, controller and path](https://www.ruby-forum.com/t/validation-error-controller-and-path/156841)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 0\
**Last updated:** [January 3, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/validation-error-controller-and-path/156841 "2009-01-03T23:31:44Z")

</div>

I have a controller and model called user. Then I have a controller called signup and there I have a form for adding a user which is going to an action in user. How do I make sure that I get back to that same controll…

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

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