# Rails

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

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

---

## [Creating log of changes to active record objects](https://www.ruby-forum.com/t/creating-log-of-changes-to-active-record-objects/123781)

<div class="topic-metadata">

**Author:** [@kturner](https://www.ruby-forum.com/u/kturner)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 9:07pm UTC](https://www.ruby-forum.com/t/creating-log-of-changes-to-active-record-objects/123781 "2007-12-20T21:07:29Z")

</div>

Hi, My client wants something to track actions on objects. For instance, if one of his employees makes an edit to the system, he wants a log of what happened. I started adding the after\_create, after\_update, after\_d…

---

## [Running rake test:units when MSsql root has a password](https://www.ruby-forum.com/t/running-rake-test-units-when-mssql-root-has-a-password/123808)

<div class="topic-metadata">

**Author:** [@raghus](https://www.ruby-forum.com/u/raghus)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 8:58pm UTC](https://www.ruby-forum.com/t/running-rake-test-units-when-mssql-root-has-a-password/123808 "2007-12-20T20:58:22Z")

</div>

Is there a way to pass the root password for my local mysql installation to rake test:units. It seems to want to connect with root by default. Can I change that or pass the root pwd on the CL? c:\\ror2\\learn\>rake test:…

---

## [Ajax Div ... Edit a record](https://www.ruby-forum.com/t/ajax-div-edit-a-record/123807)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/ajax-div-edit-a-record/123807 "2007-12-20T20:47:55Z")

</div>

Hi. I have an link\_to\_remote call … which populates a list in a area. if they pick to edit an item, it does NOT edit in the div/ajax area. it clears the screen, and loses the area. i want it to be edited in the…

---

## [Make has\_many return only the latest 5 \*in order\*](https://www.ruby-forum.com/t/make-has-many-return-only-the-latest-5-in-order/123709)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 12\
**Last updated:** [December 20, 2007, 8:39pm UTC](https://www.ruby-forum.com/t/make-has-many-return-only-the-latest-5-in-order/123709 "2007-12-20T20:39:33Z")

</div>

In my app, a user has\_many resolutions, and i want @user.resolutions to return only the most recently updated five resolutions, but ordered oldest first out of those five. So, let’s say i have 12 records, which we’ll …

---

## [Authentication system](https://www.ruby-forum.com/t/authentication-system/123774)

<div class="topic-metadata">

**Author:** [@barraorion](https://www.ruby-forum.com/u/barraorion)\
**Replies:** 1\
**Last updated:** [December 20, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/authentication-system/123774 "2007-12-20T20:33:41Z")

</div>

Hello: We are trying to develop an authentication system and before we start we want to know if there is one already implemented. We have though about using restful authentication to login, simple captcha to prevent …

---

## [Nil object on post - but commit information is not empty?](https://www.ruby-forum.com/t/nil-object-on-post-but-commit-information-is-not-empty/123749)

<div class="topic-metadata">

**Author:** [@kodama](https://www.ruby-forum.com/u/kodama)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/nil-object-on-post-but-commit-information-is-not-empty/123749 "2007-12-20T19:57:47Z")

</div>

Hello Rails folks, I am trying to roll my own widget and I’m having trouble when the data gets POSTed. My widget is basically three select boxes strung together to create one big string when the data gets submitted. T…

---

## [HABTM Problem](https://www.ruby-forum.com/t/habtm-problem/123790)

<div class="topic-metadata">

**Author:** [@keaja](https://www.ruby-forum.com/u/keaja)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 7:53pm UTC](https://www.ruby-forum.com/t/habtm-problem/123790 "2007-12-20T19:53:48Z")

</div>

Hi All, I have a form that is creating a ticket model. I am trying to allow the user to assign employee’s to this newly created ticket model. I followed the complex form’s railscast, which helped a lot it but it appe…

---

## [Access this site - Project Management](https://www.ruby-forum.com/t/access-this-site-project-management/123801)

<div class="topic-metadata">

**Author:** [@malvadomx](https://www.ruby-forum.com/u/malvadomx)\
**Replies:** 1\
**Last updated:** [December 20, 2007, 7:41pm UTC](https://www.ruby-forum.com/t/access-this-site-project-management/123801 "2007-12-20T19:41:32Z")

</div>

Access this site - Project Management

---

## [Mongrel + nginx + fork](https://www.ruby-forum.com/t/mongrel-nginx-fork/123733)

<div class="topic-metadata">

**Author:** [@bincedecrabe](https://www.ruby-forum.com/u/bincedecrabe)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 7:28pm UTC](https://www.ruby-forum.com/t/mongrel-nginx-fork/123733 "2007-12-20T19:28:56Z")

</div>

I’m trying to kick off simple (yet long running) background processes from within my rails app. I’m using Tom Anderson’s spawn plugin http://rubyforge.org/projects/spawn/ to fork a child process and unhook the active…

---

## [Rails REST resources on the real world (real)](https://www.ruby-forum.com/t/rails-rest-resources-on-the-real-world-real/123681)

<div class="topic-metadata">

**Author:** [@rubenfonseca](https://www.ruby-forum.com/u/rubenfonseca)\
**Replies:** 6\
**Last updated:** [December 20, 2007, 7:05pm UTC](https://www.ruby-forum.com/t/rails-rest-resources-on-the-real-world-real/123681 "2007-12-20T19:05:13Z")

</div>

Hi @all! First of all let me congratulate all the team involved on the creation of Rails 2! What an excellent advancement on an advanced framework! I have a question about the “new” RESTful resources. Imagine I use …

---

## [Methods are not visible... I'm sure this is an easy one](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 3\
**Last updated:** [December 20, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/methods-are-not-visible-im-sure-this-is-an-easy-one/123777 "2007-12-20T18:47:02Z")

</div>

I’m adding methods to my models and for some reason all these new methods are not invisible when I call them. For example, def target\_language Language.find(self.target\_language\_id) end def bob Language.find(self.…

---

## [How do you validate dates of models](https://www.ruby-forum.com/t/how-do-you-validate-dates-of-models/123669)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 4\
**Last updated:** [December 20, 2007, 6:33pm UTC](https://www.ruby-forum.com/t/how-do-you-validate-dates-of-models/123669 "2007-12-20T18:33:35Z")

</div>

i am wondering how you deal with date validation in your models … if i have a date attribute it only eats date objects … so i when i do this u = User.new(:born =\> Date.today) it works, but this results in a nil value …

---

## [Scrap](https://www.ruby-forum.com/t/scrap/123740)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 1\
**Last updated:** [December 20, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/scrap/123740 "2007-12-20T17:47:16Z")

</div>

Experts, require ‘rubygems’ require ‘scrubyt’ google\_data = Scrubyt::Extractor.define do #Perform the action(s) fetch ‘Google’ fill\_textfield ‘q’, ‘ruby’ submit #Construct the wrapper link “Ruby P.ming Language”…

---

## [Scaffold and form generation issue](https://www.ruby-forum.com/t/scaffold-and-form-generation-issue/123776)

<div class="topic-metadata">

**Author:** [@rkrkrk](https://www.ruby-forum.com/u/rkrkrk)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 5:30pm UTC](https://www.ruby-forum.com/t/scaffold-and-form-generation-issue/123776 "2007-12-20T17:30:15Z")

</div>

Hi, I am new to rails - just installed it couple of days ago (version 2.0.2). I was going through a tutorial on scaffold and it looked as if it is extremely simple to generate the working code for a simple table in …

---

## [Sharing a database](https://www.ruby-forum.com/t/sharing-a-database/123780)

<div class="topic-metadata">

**Author:** [@Jonathan\_Spooner](https://www.ruby-forum.com/u/Jonathan_Spooner)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/sharing-a-database/123780 "2007-12-20T17:26:08Z")

</div>

Hi, I’m creating two rails applications lets call them appA and appB. They will each be running on a subdomin like appA.domin.com. I need a way to share the User table so the login/passwords will work of both. I’d…

---

## [What is "cattr\_accessor" (used in acts\_as\_audited)](https://www.ruby-forum.com/t/what-is-cattr-accessor-used-in-acts-as-audited/67406)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 8\
**Last updated:** [December 20, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/what-is-cattr-accessor-used-in-acts-as-audited/67406 "2007-12-20T17:04:27Z")

</div>

Hi, Just trying to understand what “cattr\_accessor” is in the acts\_as\_audited plugin. Any ideas? \[In particular I’m trying to understand how to create the appropriate User class so I can turn on logging of userid - …

---

## [Restful\_authentication and popup window](https://www.ruby-forum.com/t/restful-authentication-and-popup-window/123778)

<div class="topic-metadata">

**Author:** [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/restful-authentication-and-popup-window/123778 "2007-12-20T16:25:46Z")

</div>

Take a look at item #7 at http://prototype-window.xilinus.com/samples.html I’d really like the “login or register” of r\_a to d that! Wouldn’t you? Of course it would also need to be triggered programmatically, in a …

---

## [Writing to an USB Flash Drive](https://www.ruby-forum.com/t/writing-to-an-usb-flash-drive/123587)

<div class="topic-metadata">

**Author:** [@artybala](https://www.ruby-forum.com/u/artybala)\
**Replies:** 7\
**Last updated:** [December 20, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/writing-to-an-usb-flash-drive/123587 "2007-12-20T16:11:38Z")

</div>

Hi., I would like to provide my website visitors the ability to store images from the site in to a USB flash drive. User will click the image or pressing a submit button after selecting it. Can some one guide me on h…

---

## [Strange SQLite3 Error](https://www.ruby-forum.com/t/strange-sqlite3-error/123744)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/strange-sqlite3-error/123744 "2007-12-20T15:47:05Z")

</div>

Why am I getting this error? SQLite3::SQLException: SQL logic error or missing database: INSERT INTO users (“salt”, “updated\_at”, “crypted\_password”, “remember\_token\_expires\_at”, “identity\_url”, “remember\_token”, “lo…

---

## [Deleting associations in variable](https://www.ruby-forum.com/t/deleting-associations-in-variable/123775)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/deleting-associations-in-variable/123775 "2007-12-20T14:46:38Z")

</div>

Hi all, Since I cannot get my records in 1 query I query more data than wanted and delete the rendundand rows afterwards. I’m trying to remove an association after I queried the database. (This association changes sh…

---

## [Mail\_Queue Plugin working in Development, but not Production](https://www.ruby-forum.com/t/mail-queue-plugin-working-in-development-but-not-production/123668)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 2:44pm UTC](https://www.ruby-forum.com/t/mail-queue-plugin-working-in-development-but-not-production/123668 "2007-12-20T14:44:59Z")

</div>

I’ve got the Mail-Queue plugin working for development, and it was recently (2 weeks ago) working in Production mode, too. But now it’s not. This is what happens if I run “ruby script/runner MailQueue.process -e pro…

---

## [How to get query which was created by Rails Model](https://www.ruby-forum.com/t/how-to-get-query-which-was-created-by-rails-model/123691)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 3\
**Last updated:** [December 20, 2007, 1:53pm UTC](https://www.ruby-forum.com/t/how-to-get-query-which-was-created-by-rails-model/123691 "2007-12-20T13:53:51Z")

</div>

how to get query which was created by Rails Model. like ,if i write Model.find(:all) then output should be like below “select \* from models” is there any idea ?

---

## [Daemons,Email and DB](https://www.ruby-forum.com/t/daemons-email-and-db/123770)

<div class="topic-metadata">

**Author:** [@reddaly](https://www.ruby-forum.com/u/reddaly)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 1:28pm UTC](https://www.ruby-forum.com/t/daemons-email-and-db/123770 "2007-12-20T13:28:40Z")

</div>

Hey Here is my code: #!/usr/bin/env ruby #You might want to change this ENV\[“RAILS\_ENV”\] ||= “development” require File.dirname(FILE) + “/…/…/config/environment” require “net/pop” $running = true; Signal.trap(“T…

---

## [Hi to all](https://www.ruby-forum.com/t/hi-to-all/123761)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 12:55pm UTC](https://www.ruby-forum.com/t/hi-to-all/123761 "2007-12-20T12:55:59Z")

</div>

Take a look at this sites http://sonic-hentai.hentai4you.info/sonic-hentai-gallery.html sonic hentai gallery http://sonic-hentai.hentai4you.info/free-hentai-sonic.html free hentai sonic http://sonic-hentai.hentai4yo…

---

## [Problem passing "WITH QUERY EXPANSION" to mysql search](https://www.ruby-forum.com/t/problem-passing-with-query-expansion-to-mysql-search/123760)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 12:32pm UTC](https://www.ruby-forum.com/t/problem-passing-with-query-expansion-to-mysql-search/123760 "2007-12-20T12:32:14Z")

</div>

Currently my search is doing this, and works fine - @results = item.paginate(:all, :conditions =\> \[ “match(tags.name, #{conditions}) against (? in boolean mode)”, @search\_term \], :include =\> :tags, :order =\> “#{order…

---

## [Request.env and accessing raw header requests](https://www.ruby-forum.com/t/request-env-and-accessing-raw-header-requests/121416)

<div class="topic-metadata">

**Author:** [@pablo](https://www.ruby-forum.com/u/pablo)\
**Replies:** 5\
**Last updated:** [December 20, 2007, 12:29pm UTC](https://www.ruby-forum.com/t/request-env-and-accessing-raw-header-requests/121416 "2007-12-20T12:29:01Z")

</div>

I’d like to get the raw http request from a client so I can capture it warts and all. I know it’s possible to access the attributes from within a request using request.env (e.g. request.env\[“HTTP\_ACCEPT”\] to get the …

---

## [Remove association](https://www.ruby-forum.com/t/remove-association/196550)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 2\
**Last updated:** [December 20, 2007, 12:23pm UTC](https://www.ruby-forum.com/t/remove-association/196550 "2007-12-20T12:23:10Z")

</div>

Hi all, I have a user has many numbers relationship. When I query User.find(:all, :include =\> :numbers) I get all the users with their numbers. I’m looking for a method that removes the number from a user eg users\[0\]…

---

## [Backgroundrb and tasks](https://www.ruby-forum.com/t/backgroundrb-and-tasks/123752)

<div class="topic-metadata">

**Author:** [@bublik](https://www.ruby-forum.com/u/bublik)\
**Replies:** 1\
**Last updated:** [December 20, 2007, 11:48am UTC](https://www.ruby-forum.com/t/backgroundrb-and-tasks/123752 "2007-12-20T11:48:31Z")

</div>

Give me please example How i can send send email from Backgroundrb worker and How get access to my modele User my config port: “3333” timer\_sleep: 60 load\_rails: true environment: development rails\_env: developm…

---

## [Remove association](https://www.ruby-forum.com/t/remove-association/123753)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 11:16am UTC](https://www.ruby-forum.com/t/remove-association/123753 "2007-12-20T11:16:10Z")

</div>

Hi all, I have a user has many numbers relationship. When I query User.find(:all, :include =\> :numbers) I get all the users with their numbers. I’m looking for a method that removes the number from a user eg users\[0\]…

---

## [Regarding PDF Writer](https://www.ruby-forum.com/t/regarding-pdf-writer/123751)

<div class="topic-metadata">

**Author:** [@dhaval](https://www.ruby-forum.com/u/dhaval)\
**Replies:** 0\
**Last updated:** [December 20, 2007, 10:14am UTC](https://www.ruby-forum.com/t/regarding-pdf-writer/123751 "2007-12-20T10:14:02Z")

</div>

Hello guys, I have a problem with saving the pdf… This is my controller code ------------------- def getpdf pdf = PDF::Writer.new @room\_event = RoomEvent.find(:all) @table=PDF::SimpleTable.new @table.column\_order …

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

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