# Rails

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

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

---

## [Around\_filter HELP!](https://www.ruby-forum.com/t/around-filter-help/124535)

<div class="topic-metadata">

**Author:** [@spokra](https://www.ruby-forum.com/u/spokra)\
**Replies:** 2\
**Last updated:** [December 31, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/around-filter-help/124535 "2007-12-31T22:10:59Z")

</div>

why do i keep getting the error: it’s an Object that has a before and after method!!! A filter must be a Symbol, Proc, Method, or object responding to filter, after or before. around\_filter MyTimer.new class MyTime…

---

## [Agile Web Dev w/Rails - Password Change](https://www.ruby-forum.com/t/agile-web-dev-w-rails-password-change/124662)

<div class="topic-metadata">

**Author:** [@musty](https://www.ruby-forum.com/u/musty)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/agile-web-dev-w-rails-password-change/124662 "2007-12-31T22:08:04Z")

</div>

Happy New Year everyone. Just wondering if anyone has coded the ability to allow a user to change their password following the way the book (second edition) implements administration. Seems like I should be able to c…

---

## [Make text bold question](https://www.ruby-forum.com/t/make-text-bold-question/225984)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/make-text-bold-question/225984 "2007-12-31T21:45:16Z")

</div>

Hello, IÂ´ve posted the following to the “Ruby” forum but it should be here at “Ruby on Rails” instead. The problem is that when I perform a search the and get the results. I want that searchwords will be highlighted …

---

## [Help With Update method](https://www.ruby-forum.com/t/help-with-update-method/124491)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 20\
**Last updated:** [December 31, 2007, 8:22pm UTC](https://www.ruby-forum.com/t/help-with-update-method/124491 "2007-12-31T20:22:19Z")

</div>

Hi everybody, I have some problem with rails update method. My actual mysql query is like: Update accounts set balance=balance+1000 where id=1 I tried with rails method update like : Account.update(1,{:balance=\>bala…

---

## [What is meant by this: def foo=(foo) ... end?](https://www.ruby-forum.com/t/what-is-meant-by-this-def-foo-foo-end/124663)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/what-is-meant-by-this-def-foo-foo-end/124663 "2007-12-31T20:05:56Z")

</div>

I saw in episode #75 that creating a method in the Product model will update attributes related to a different model (Picture): def picture\_attributes=(picture\_attributes) … end I’m unclear as to the first line: de…

---

## [A validation question (trying to make a censorship function)](https://www.ruby-forum.com/t/a-validation-question-trying-to-make-a-censorship-function/124582)

<div class="topic-metadata">

**Author:** [@taro](https://www.ruby-forum.com/u/taro)\
**Replies:** 6\
**Last updated:** [December 31, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/a-validation-question-trying-to-make-a-censorship-function/124582 "2007-12-31T19:55:24Z")

</div>

I’m trying to make a rails forum application, and of course, I want to censor any bad words people may post in my text models. That said, I wondered if, in Rails 1.2.5, there were any validations method that could do…

---

## [Can't run console](https://www.ruby-forum.com/t/cant-run-console/124648)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 3\
**Last updated:** [December 31, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/cant-run-console/124648 "2007-12-31T19:54:49Z")

</div>

Hello, When I try to run scrip/console I get this: Loading development environment (Rails 2.0.2) /opt/rails//lib/ruby/1.8/irb/completion.rb:10:in require': no such file to load -- readline (LoadError) from /opt/rails/…

---

## [Actions when testing resources with namespaces](https://www.ruby-forum.com/t/actions-when-testing-resources-with-namespaces/124661)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 0\
**Last updated:** [December 31, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/actions-when-testing-resources-with-namespaces/124661 "2007-12-31T19:46:03Z")

</div>

Hello, I have an admin tool in the namespace admin in this way: map.namespace :admin do |admin| admin.resources :products end and I’ve also have a map.resources :products except that the last one is nice (or tries…

---

## [Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist](https://www.ruby-forum.com/t/fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doesnt-exist/124610)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/fatal-error-cant-open-and-lock-privilege-tables-table-mysql-host-doesnt-exist/124610 "2007-12-31T18:56:21Z")

</div>

I’m using instant rails with mysql Front. Does anyone know why I may be getting this error message and what to do about it???

---

## [Help with implementation strategy](https://www.ruby-forum.com/t/help-with-implementation-strategy/124608)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/help-with-implementation-strategy/124608 "2007-12-31T18:52:50Z")

</div>

Hey guys, I’m hoping someone can help me with a strategy to implement the following: I have a voting system with a models/tables for votes, links, and users. In the view I want to go through the collection of links…

---

## [Simple RoR layout/css/html abstraction](https://www.ruby-forum.com/t/simple-ror-layout-css-html-abstraction/124504)

<div class="topic-metadata">

**Author:** [@JK\_Sieber](https://www.ruby-forum.com/u/JK_Sieber)\
**Replies:** 4\
**Last updated:** [December 31, 2007, 6:39pm UTC](https://www.ruby-forum.com/t/simple-ror-layout-css-html-abstraction/124504 "2007-12-31T18:39:58Z")

</div>

Hello all, I came from Java/C++ backend /server development and now is trying to go into more web-app mind. I have been playing with RoR for a moment, and really love it. The biggest hurdle for me is, that as a non…

---

## [Passing instance variable between controllers](https://www.ruby-forum.com/t/passing-instance-variable-between-controllers/124575)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 6:33pm UTC](https://www.ruby-forum.com/t/passing-instance-variable-between-controllers/124575 "2007-12-31T18:33:32Z")

</div>

Hello, I have two controllers mailinglist\_controller and mailtemplate\_controller The mailinglist controller has an instance variable @mailinglist. how can I to use the instance variable @mailinglists from controller …

---

## [Popup\_javascript\_function](https://www.ruby-forum.com/t/popup-javascript-function/124556)

<div class="topic-metadata">

**Author:** [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 6:23pm UTC](https://www.ruby-forum.com/t/popup-javascript-function/124556 "2007-12-31T18:23:35Z")

</div>

Hi, Would someone please explain how to use the popup\_javascript\_function in urlhelper. I need to have a popup window opened when a user click on a link and I think that action is written for that purpose. Unfortuna…

---

## [BlueHost and Ruby Deployment](https://www.ruby-forum.com/t/bluehost-and-ruby-deployment/124549)

<div class="topic-metadata">

**Author:** [@pkRuby](https://www.ruby-forum.com/u/pkRuby)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 6:17pm UTC](https://www.ruby-forum.com/t/bluehost-and-ruby-deployment/124549 "2007-12-31T18:17:09Z")

</div>

Hi all, I just recently started with Ruby on Rails, got to say it’s pretty impressive… I have written a small application that I would like to test now on a shared server. Since I have never done that before a little…

---

## [Parsing string to datetime month & day reversed](https://www.ruby-forum.com/t/parsing-string-to-datetime-month-day-reversed/124490)

<div class="topic-metadata">

**Author:** [@bsc\_dev](https://www.ruby-forum.com/u/bsc_dev)\
**Replies:** 3\
**Last updated:** [December 31, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/parsing-string-to-datetime-month-day-reversed/124490 "2007-12-31T18:12:28Z")

</div>

Hello, I have a parse that reads in a file and populates my database. The problem is that when I use Time.parse it interprets the second digit as the month rather than the day. For example: Input: 12-04-2007 21:15:5…

---

## [How to implement restful to homepage?](https://www.ruby-forum.com/t/how-to-implement-restful-to-homepage/124632)

<div class="topic-metadata">

**Author:** [@Kei\_Simone](https://www.ruby-forum.com/u/Kei_Simone)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/how-to-implement-restful-to-homepage/124632 "2007-12-31T17:59:01Z")

</div>

To all: Hi, I am unfamiliar with rails and restful design, please guide me. let’s say I generated a scaffold\_resource for the model User so now when I click on users/show/1 i get details of the User model, etc… the …

---

## [Nil handling in ActiveRecord et al](https://www.ruby-forum.com/t/nil-handling-in-activerecord-et-al/124440)

<div class="topic-metadata">

**Author:** [@Pito](https://www.ruby-forum.com/u/Pito)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/nil-handling-in-activerecord-et-al/124440 "2007-12-31T17:44:52Z")

</div>

My database has a column called birthday. The model has a method: def age return (birthday.nil? ? -1 : DateTime.now.year - birthday.year) end When called from a validation method on a new record, I get: NameError i…

---

## [2.02 problems with sqlite3 - not finding data](https://www.ruby-forum.com/t/2-02-problems-with-sqlite3-not-finding-data/124596)

<div class="topic-metadata">

**Author:** [@MilesTogoe](https://www.ruby-forum.com/u/MilesTogoe)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/2-02-problems-with-sqlite3-not-finding-data/124596 "2007-12-31T17:41:22Z")

</div>

I upgraded to Rails 2.02 and created a new project. I created a table with migrations. It’s there. At sqlite3 prompt I add a record. I can select \* and see the data. But Mymodel.find(:all) returns nothing. Even …

---

## [Generate a fixture tempate](https://www.ruby-forum.com/t/generate-a-fixture-tempate/124655)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 31, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/generate-a-fixture-tempate/124655 "2007-12-31T17:26:44Z")

</div>

Hi all, I just coded a little rails plugin to generate the fixture template of a given model. Example: rake db:fixtures:template Model=Job will return: job: id: category\_id: company: description: instructions: …

---

## [Plugins/Gems taking long time to download](https://www.ruby-forum.com/t/plugins-gems-taking-long-time-to-download/124399)

<div class="topic-metadata">

**Author:** [@bdude](https://www.ruby-forum.com/u/bdude)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/plugins-gems-taking-long-time-to-download/124399 "2007-12-31T17:22:03Z")

</div>

When I try to install a gem/plugin, the script takes a while to even start downloading; and when it does, it downloads as if it’s being artificially capped - much slower then my regular internet connection. Would anyo…

---

## [How do we locate our attachment\_fu photos in Windows XP?](https://www.ruby-forum.com/t/how-do-we-locate-our-attachment-fu-photos-in-windows-xp/124654)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 31, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/how-do-we-locate-our-attachment-fu-photos-in-windows-xp/124654 "2007-12-31T17:21:28Z")

</div>

Simply put: I don’t understand the reasoning behind where photos are stored in the :file\_system option of attachment\_fu? has\_attachment :content\_type =\> :image, :storage =\> :file\_system, :max\_size =\> 2.megabytes, …

---

## [Need Help, getting Big Decimal error on a simple calculation](https://www.ruby-forum.com/t/need-help-getting-big-decimal-error-on-a-simple-calculation/124649)

<div class="topic-metadata">

**Author:** [@jooma2](https://www.ruby-forum.com/u/jooma2)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/need-help-getting-big-decimal-error-on-a-simple-calculation/124649 "2007-12-31T16:46:58Z")

</div>

Ok this is driving me nuts. Here’s my issue in it’s most basic form. I have a table with a column called amount that was set to :decimal, :precision =\> 8, :scale =\> 2 In my controller I try to do something like this. …

---

## [Cookies and Foreign Classes](https://www.ruby-forum.com/t/cookies-and-foreign-classes/124642)

<div class="topic-metadata">

**Author:** [@ngm](https://www.ruby-forum.com/u/ngm)\
**Replies:** 3\
**Last updated:** [December 31, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/cookies-and-foreign-classes/124642 "2007-12-31T16:36:26Z")

</div>

Hi guys, I have a method inside a controller that has many lines of code (some of them used to generate/read cookies). In order to keep the code readable and use the object-oriented power of Ruby, I created a foreign…

---

## [Find method](https://www.ruby-forum.com/t/find-method/124651)

<div class="topic-metadata">

**Author:** [@fishman2001](https://www.ruby-forum.com/u/fishman2001)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/find-method/124651 "2007-12-31T16:06:34Z")

</div>

Hi, quick question may be simple to answer, how can I use the find method to get the last 20 entries in my mysql table: Sports.find(:(last 20 entries please), :conditions none) cheers.fishman()

---

## [Acts as ferret not working with apache/instant rails](https://www.ruby-forum.com/t/acts-as-ferret-not-working-with-apache-instant-rails/124647)

<div class="topic-metadata">

**Author:** [@chief3rd](https://www.ruby-forum.com/u/chief3rd)\
**Replies:** 0\
**Last updated:** [December 31, 2007, 3:30pm UTC](https://www.ruby-forum.com/t/acts-as-ferret-not-working-with-apache-instant-rails/124647 "2007-12-31T15:30:51Z")

</div>

Ferret and acts as ferret work fine in webrick but not instant rails which uses the apache server. the server simply closes, no log messages or error messages stored. the same goes on my production server which only s…

---

## [Sortable lists within categories?](https://www.ruby-forum.com/t/sortable-lists-within-categories/124644)

<div class="topic-metadata">

**Author:** [@jawgaping](https://www.ruby-forum.com/u/jawgaping)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/sortable-lists-within-categories/124644 "2007-12-31T14:46:18Z")

</div>

Hello, I would like to have many sortable lists each within it’s own category item. I would like the categories to be sortable as well as to be able to sort items from within each category into different categories. …

---

## [Episode 73 resulting in error: undefined method \`stringify\_keys!' for "33":String](https://www.ruby-forum.com/t/episode-73-resulting-in-error-undefined-method-stringify-keys-for-33-string/124641)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 2\
**Last updated:** [December 31, 2007, 2:29pm UTC](https://www.ruby-forum.com/t/episode-73-resulting-in-error-undefined-method-stringify-keys-for-33-string/124641 "2007-12-31T14:29:52Z")

</div>

I’m working with a similar model in Episode 73, (my scenario is editing multiple pictures for a product using attachment\_fu). And I’m getting an error when I try the technique suggested: ./views/admin/\_form.rhtml \<% …

---

## [Rails and Databases](https://www.ruby-forum.com/t/rails-and-databases/124638)

<div class="topic-metadata">

**Author:** [@Haris\_G](https://www.ruby-forum.com/u/Haris_G)\
**Replies:** 6\
**Last updated:** [December 31, 2007, 2:08pm UTC](https://www.ruby-forum.com/t/rails-and-databases/124638 "2007-12-31T14:08:08Z")

</div>

Hello, I am new to RoR and have several questions. I have an existing DB and I want to develop an application that uses this existing DB. How do I import this DB into my application. What I mean is, I dont want t…

---

## [Problem while using ActionMailer with rails 1.1.6](https://www.ruby-forum.com/t/problem-while-using-actionmailer-with-rails-1-1-6/124643)

<div class="topic-metadata">

**Author:** [@vinod](https://www.ruby-forum.com/u/vinod)\
**Replies:** 0\
**Last updated:** [December 31, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/problem-while-using-actionmailer-with-rails-1-1-6/124643 "2007-12-31T14:06:23Z")

</div>

Hi, all I am new to rails. While I tried to send email by configuring the email sending than my application could not started. My environment.rb is as follows : Be sure to restart your web server when you modify thi…

---

## [Has many through button](https://www.ruby-forum.com/t/has-many-through-button/124624)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 1\
**Last updated:** [December 31, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/has-many-through-button/124624 "2007-12-31T13:09:35Z")

</div>

I’m working on three files to get a button working: http://strawr.googlecode.com/svn/trunk/app/controllers/ categories\_controller.rb http://strawr.googlecode.com/svn/trunk/app/helpers/application\_helper.rb http://str…

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

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