# Rails

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

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

---

## [Adding methods to Object in Rails -- WARNING](https://www.ruby-forum.com/t/adding-methods-to-object-in-rails-warning/127910)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [February 2, 2008, 3:59pm UTC](https://www.ruby-forum.com/t/adding-methods-to-object-in-rails-warning/127910 "2008-02-02T15:59:02Z")

</div>

I wanted to do: foo.wrap and wrap would go to a specialized wrap for some types of foo and a general Object#wrap for all the others. So I added wrap to Object class Object def wrap self end end This worked exce…

---

## [Query problem](https://www.ruby-forum.com/t/query-problem/127908)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 0\
**Last updated:** [February 2, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/query-problem/127908 "2008-02-02T14:54:40Z")

</div>

Hi all, I have users (has many) accounts I want to show all users and the account (if he has one) of a certain type. How can I query all users and if the user has a specific account, the account. If I do :conditions…

---

## [Plugin attributes for config values](https://www.ruby-forum.com/t/plugin-attributes-for-config-values/127904)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/plugin-attributes-for-config-values/127904 "2008-02-02T13:49:16Z")

</div>

A couple of discussions later I propose the attached patch for Engines. This super-minimalistic approach allows to do two things: Plugin users can set plugin attribute values in a file \[plugin\_dir\]/ config.yml. If th…

---

## [RJS with dynamic value passed into a link\_to\_function](https://www.ruby-forum.com/t/rjs-with-dynamic-value-passed-into-a-link-to-function/127899)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/rjs-with-dynamic-value-passed-into-a-link-to-function/127899 "2008-02-02T13:19:06Z")

</div>

I would like to write a link\_to\_function that is dynamic in the sense that it inserts something into a div based on the value of a hidden field. So at the moment I have page.insert\_html :bottom, :div\_name, :partial =\>…

---

## [New in Leopard-- Ruby, ROR, MySQL](https://www.ruby-forum.com/t/new-in-leopard-ruby-ror-mysql/121880)

<div class="topic-metadata">

**Author:** [@ger4ld](https://www.ruby-forum.com/u/ger4ld)\
**Replies:** 5\
**Last updated:** [February 2, 2008, 11:34am UTC](https://www.ruby-forum.com/t/new-in-leopard-ruby-ror-mysql/121880 "2008-02-02T11:34:55Z")

</div>

Hi, I have been working with ruby/ruby on rails/and mysql (latest releases) on a PC. I just purchased a new Mac with Leopard… I know it comes with ruby and ROR… I want to install the latest versions of Ruby, ROR, Gem…

---

## [Php $ mysql](https://www.ruby-forum.com/t/php-mysql/127901)

<div class="topic-metadata">

**Author:** [@smartcoder](https://www.ruby-forum.com/u/smartcoder)\
**Replies:** 0\
**Last updated:** [February 2, 2008, 11:33am UTC](https://www.ruby-forum.com/t/php-mysql/127901 "2008-02-02T11:33:16Z")

</div>

Download Project Management System developed in PHP,MySQL from

---

## [Gsub error](https://www.ruby-forum.com/t/gsub-error/127867)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 9:56am UTC](https://www.ruby-forum.com/t/gsub-error/127867 "2008-02-02T09:56:13Z")

</div>

Hi, I am trying to display a photo on the screen which is stored as binary data in MS SQL2000 database.here is what i have written in controller. def photo @person = Person.find(params\[:id\]) send\_data(@person.uploa…

---

## [Reload controller in production mode](https://www.ruby-forum.com/t/reload-controller-in-production-mode/127809)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 9:19am UTC](https://www.ruby-forum.com/t/reload-controller-in-production-mode/127809 "2008-02-02T09:19:36Z")

</div>

I have my site in production mode. I want reload the controllers. How can i do with rake? Thanks

---

## [Has\_many problem //still new at this (somewhat)](https://www.ruby-forum.com/t/has-many-problem-still-new-at-this-somewhat/127471)

<div class="topic-metadata">

**Author:** [@kaizerkaizer](https://www.ruby-forum.com/u/kaizerkaizer)\
**Replies:** 6\
**Last updated:** [February 2, 2008, 8:31am UTC](https://www.ruby-forum.com/t/has-many-problem-still-new-at-this-somewhat/127471 "2008-02-02T08:31:05Z")

</div>

So, I’m having problems displaying many images connected to a specific user (current\_user \[restful authentication\]) when visiting the current user’s “/portfolio”. This is what I thought it should look like: …

---

## [Student/Teacher app, both with login access](https://www.ruby-forum.com/t/student-teacher-app-both-with-login-access/127874)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 4\
**Last updated:** [February 2, 2008, 8:26am UTC](https://www.ruby-forum.com/t/student-teacher-app-both-with-login-access/127874 "2008-02-02T08:26:16Z")

</div>

I’m trying to find the “Rails way” of modeling users of my application. Traditionally, I’d have a “users” table with common information, along with “students” and “teachers” tables. For login purposes, I’d only be c…

---

## [Belongs\_to not working for me in 2.02?](https://www.ruby-forum.com/t/belongs-to-not-working-for-me-in-2-02/127113)

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 3\
**Last updated:** [February 2, 2008, 7:53am UTC](https://www.ruby-forum.com/t/belongs-to-not-working-for-me-in-2-02/127113 "2008-02-02T07:53:20Z")

</div>

Hey folks - thanks in advance for any help. I’m in the process of upgrading from 1.2.6 to 2.0.2. Everything’s working great in 1.2.6, got rid of all deprecation messages, etc. But I’ve been banging my head against a…

---

## [Eager include associated count?](https://www.ruby-forum.com/t/eager-include-associated-count/127880)

<div class="topic-metadata">

**Author:** [@wheels](https://www.ruby-forum.com/u/wheels)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 7:27am UTC](https://www.ruby-forum.com/t/eager-include-associated-count/127880 "2008-02-02T07:27:04Z")

</div>

So I know you can eager include associated rows with the :include, but is there a way to include just the associated count? User.find(:all, :select =\> ‘id, first\_name, last\_name, created\_at’, :limit =\> 30) I want to …

---

## [Help with a confusing scenario](https://www.ruby-forum.com/t/help-with-a-confusing-scenario/127888)

<div class="topic-metadata">

**Author:** [@CPerry](https://www.ruby-forum.com/u/CPerry)\
**Replies:** 0\
**Last updated:** [February 2, 2008, 6:18am UTC](https://www.ruby-forum.com/t/help-with-a-confusing-scenario/127888 "2008-02-02T06:18:34Z")

</div>

Hey all, I need some help planning out a scenario and was hoping that you guys could briefly explain how you would tackle the following situation… In my app., I want people to buy “credits”, very similar to iStockPho…

---

## [Rails don't supoort mysql bigint?](https://www.ruby-forum.com/t/rails-dont-supoort-mysql-bigint/127886)

<div class="topic-metadata">

**Author:** [@oldbear](https://www.ruby-forum.com/u/oldbear)\
**Replies:** 0\
**Last updated:** [February 2, 2008, 4:33am UTC](https://www.ruby-forum.com/t/rails-dont-supoort-mysql-bigint/127886 "2008-02-02T04:33:40Z")

</div>

hi rails 1.2.6 mysql 5 table:infos fields:id ,bigint(20), AUTO\_INCREMENT =90000000013 name,varchar(255) info\_controllor.rb def add @info = Info.new @info.name = “ddd111” @info.save! puts “id:”,@info.id.to\_s …

---

## [Image from database](https://www.ruby-forum.com/t/image-from-database/127853)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 2:13am UTC](https://www.ruby-forum.com/t/image-from-database/127853 "2008-02-02T02:13:08Z")

</div>

Hello, I want to displa a thumbnail image from the database. this is like when a person logs in his thumbnail will be shown. The photo will be stored in the database(MSSQL 2000) as binary data.Please help me to upload…

---

## [Rails hangs after inactivity](https://www.ruby-forum.com/t/rails-hangs-after-inactivity/127842)

<div class="topic-metadata">

**Author:** [@quirk07](https://www.ruby-forum.com/u/quirk07)\
**Replies:** 3\
**Last updated:** [February 2, 2008, 1:07am UTC](https://www.ruby-forum.com/t/rails-hangs-after-inactivity/127842 "2008-02-02T01:07:27Z")

</div>

I’m running ruby 1.8.6, WEBrick 1.3.1, & MySQL. On Localhost:3000. It works fine but if it sits idle for a few hours or more, it will hang and I needs to be restarted. Read similar problem before, said it has somethi…

---

## [Combine custom validations with helpers](https://www.ruby-forum.com/t/combine-custom-validations-with-helpers/126916)

<div class="topic-metadata">

**Author:** [@makire](https://www.ruby-forum.com/u/makire)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 12:38am UTC](https://www.ruby-forum.com/t/combine-custom-validations-with-helpers/126916 "2008-02-02T00:38:08Z")

</div>

Hi I have a model that uses several validation helpers, for example validates\_presence\_of. Now I want to add a custom validate method for a very complex validation. I override validate in the model and it works by it…

---

## [Automatically create a search form for my model](https://www.ruby-forum.com/t/automatically-create-a-search-form-for-my-model/127863)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 12:28am UTC](https://www.ruby-forum.com/t/automatically-create-a-search-form-for-my-model/127863 "2008-02-02T00:28:07Z")

</div>

Hi, Is there a way that scaffold or some other tool can be used to create a form that allows you to search for records in a model based on the fields of that model? I’ve seen scaffold generates a “list” page, but th…

---

## [Render partial in div](https://www.ruby-forum.com/t/render-partial-in-div/127860)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 12:23am UTC](https://www.ruby-forum.com/t/render-partial-in-div/127860 "2008-02-02T00:23:25Z")

</div>

I have this link which when clicked will loop and render more links and a form from a partial inside of “myDiv”: \<%= link\_to\_remote ‘MyLink’ . . . ., :update =\>“myDiv” %\> What I am trying to do is have a form\_…

---

## [Email is not being sent on host](https://www.ruby-forum.com/t/email-is-not-being-sent-on-host/127855)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 12:16am UTC](https://www.ruby-forum.com/t/email-is-not-being-sent-on-host/127855 "2008-02-02T00:16:57Z")

</div>

The simple user signup activation email is not being sent when I put my app on host, but works pretty fine on my dev machine. I am using Gmail (with smtp\_tls plugin of course) server to send email…I have tried putting…

---

## [Closing popup](https://www.ruby-forum.com/t/closing-popup/84207)

<div class="topic-metadata">

**Author:** [@claxo](https://www.ruby-forum.com/u/claxo)\
**Replies:** 6\
**Last updated:** [February 2, 2008, 12:03am UTC](https://www.ruby-forum.com/t/closing-popup/84207 "2008-02-02T00:03:19Z")

</div>

Hi, i’m using popup in my application when i have to use a form to submit some data: link\_to “Add”, {:action =\> “add\_customer”}, :popup =\> \[‘new’, ‘height=300,width=300’\] When i push submit i like that the popup clo…

---

## [Never have been able to run rake doc:app](https://www.ruby-forum.com/t/never-have-been-able-to-run-rake-doc-app/127730)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 11:24pm UTC](https://www.ruby-forum.com/t/never-have-been-able-to-run-rake-doc-app/127730 "2008-02-01T23:24:27Z")

</div>

Perhaps it’s just a Fedora thing but it would be nice to generate my application’s API $ rake doc:app --trace (in /home/storage/users/craig/svn/th-db/branches/phase5) \*\* Invoke doc:app (first\_time) \*\* Invoke doc/app…

---

## [Acts\_as\_taggable\_on\_steroids deleting unused tags?](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids-deleting-unused-tags/127869)

<div class="topic-metadata">

**Author:** [@etikette](https://www.ruby-forum.com/u/etikette)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-steroids-deleting-unused-tags/127869 "2008-02-01T23:17:24Z")

</div>

hi all im aware that there might now be a method available with this plugin to delete unused tags from the db can anyone tell me what this is? thanks marc

---

## [Help with link\_to\_remote](https://www.ruby-forum.com/t/help-with-link-to-remote/127816)

<div class="topic-metadata">

**Author:** [@masch](https://www.ruby-forum.com/u/masch)\
**Replies:** 4\
**Last updated:** [February 1, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/help-with-link-to-remote/127816 "2008-02-01T22:59:41Z")

</div>

Hi!. Is there a way to call to another controller with link\_to\_remote? Something like this: \<%= link\_to\_remote “Tests”, { :controller =\> “tests”, :action =\> “tester” } %\> Salu2…

---

## [Layout appears three times!](https://www.ruby-forum.com/t/layout-appears-three-times/127734)

<div class="topic-metadata">

**Author:** [@Juanqui](https://www.ruby-forum.com/u/Juanqui)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/layout-appears-three-times/127734 "2008-02-01T22:56:44Z")

</div>

Hey guys, I am developing an application for my university and I’m having problems with the way it’s getting rendered. I configured the main controller to use a layout called “unet-main” and when it displays on my lo…

---

## [About to start building a bilingual site](https://www.ruby-forum.com/t/about-to-start-building-a-bilingual-site/127717)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/about-to-start-building-a-bilingual-site/127717 "2008-02-01T22:49:40Z")

</div>

Hi all, I am starting a new project that involves pages in English and French. Any ideas on what Gems/Plugins to use? Thanks in advance, Daniel Rails 2.0.2, MySql

---

## [Do I have to pass the ID-parameter when using respond\_to?](https://www.ruby-forum.com/t/do-i-have-to-pass-the-id-parameter-when-using-respond-to/127719)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/do-i-have-to-pass-the-id-parameter-when-using-respond-to/127719 "2008-02-01T22:46:06Z")

</div>

Hi, I would like to append “.rss”, straight to my action, ex. “/controller/action.rss”. However it seems that I have to use “host/action/1.rss” (or another ID-parameter), otherwise I get a routing error "No route mat…

---

## [Custom helper](https://www.ruby-forum.com/t/custom-helper/127648)

<div class="topic-metadata">

**Author:** [@masch](https://www.ruby-forum.com/u/masch)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 10:37pm UTC](https://www.ruby-forum.com/t/custom-helper/127648 "2008-02-01T22:37:14Z")

</div>

Hi! I have a model like this: class Test1 attr\_accessor :counter def initialize @countter = 0 end def increase @countter += 1 end end A helper module DiscsHelper def hidden\_div\_if(condition, attribu…

---

## [How to sanitize \_before\_ going into the database?](https://www.ruby-forum.com/t/how-to-sanitize-before-going-into-the-database/127791)

<div class="topic-metadata">

**Author:** [@fjan](https://www.ruby-forum.com/u/fjan)\
**Replies:** 4\
**Last updated:** [February 1, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/how-to-sanitize-before-going-into-the-database/127791 "2008-02-01T22:36:03Z")

</div>

I use a call to the sanitize method every time I render some user input, but it would be much nicer if I could clean it up once before putting it into the database and avoid having to call the (relatively expensive) s…

---

## [Graphs and Plots in Rails](https://www.ruby-forum.com/t/graphs-and-plots-in-rails/127473)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 29\
**Last updated:** [February 1, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/graphs-and-plots-in-rails/127473 "2008-02-01T22:25:33Z")

</div>

Hi- I did a search and found some old posts on the subject, however since these things change so rapidly, I’m wondering what the best options are for creating charts and plots in a Rails app? I saw sparklines in the …

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

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