# Rails

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

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

---

## [Function to escape queries?](https://www.ruby-forum.com/t/function-to-escape-queries/121909)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [December 2, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/function-to-escape-queries/121909 "2007-12-02T20:15:20Z")

</div>

I am writing a raw query and need to escape a variable that the user can modify. Similar to :conditions =\> \[“whatever = ?”, var\]. What function does this use behind the scenes? Thanks!

---

## [Better way for select list for belongs\_to?](https://www.ruby-forum.com/t/better-way-for-select-list-for-belongs-to/121875)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 3\
**Last updated:** [December 2, 2007, 8:11pm UTC](https://www.ruby-forum.com/t/better-way-for-select-list-for-belongs-to/121875 "2007-12-02T20:11:49Z")

</div>

I’m currently doing all of this just to have a drop-down list of Courses for a particular student: ===== edit template ===== \<%= f.select :course, @courses, :selected =\> @student.course.id %\> ===== students controller…

---

## [Expire\_action in model possible](https://www.ruby-forum.com/t/expire-action-in-model-possible/121857)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 3\
**Last updated:** [December 2, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/expire-action-in-model-possible/121857 "2007-12-02T20:06:05Z")

</div>

Hi all, Is it possible to use expire\_action in a model? I tried: after\_save :clean\_balance\_cache clean\_balance\_cache holds the expire\_action method. But then I get an error: undefined method \`expire\_action’ for #De…

---

## [A Problem after installation of ruby on windows xp](https://www.ruby-forum.com/t/a-problem-after-installation-of-ruby-on-windows-xp/121871)

<div class="topic-metadata">

**Author:** [@vamsi](https://www.ruby-forum.com/u/vamsi)\
**Replies:** 3\
**Last updated:** [December 2, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/a-problem-after-installation-of-ruby-on-windows-xp/121871 "2007-12-02T18:44:11Z")

</div>

Hi i’ve installed ruby and rails on my pc based on windows Xp, and when i attempt to run a ruby program it simply displays " ruby is not recognized as an internal or external coomand" even though i set the path to c…

---

## [Clarification needed between class \<\< ClassName and class ClassName](https://www.ruby-forum.com/t/clarification-needed-between-class-classname-and-class-classname/121783)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 13\
**Last updated:** [December 2, 2007, 6:41pm UTC](https://www.ruby-forum.com/t/clarification-needed-between-class-classname-and-class-classname/121783 "2007-12-02T18:41:13Z")

</div>

I’m in the middle of Why’s Poignent guide, and this one has me stumped. Let’s say MyClass exists. I want to add to it. So far, all the examples have done: class MyClass def new\_method … end end Now he adds: clas…

---

## [\[ANN\]Â walkthrough: Rails 2.0 startup process](https://www.ruby-forum.com/t/ann-a-walkthrough-rails-2-0-startup-process/121907)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/ann-a-walkthrough-rails-2-0-startup-process/121907 "2007-12-02T18:27:25Z")

</div>

I haven’t found a complete big-picture walkthrough for the Rails startup process when I looked for one recently. There are some really useful resources about this but they are for Rails 1.2 and each of them only cover…

---

## [Multiple Versions of Rails Installed](https://www.ruby-forum.com/t/multiple-versions-of-rails-installed/121894)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 3\
**Last updated:** [December 2, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/multiple-versions-of-rails-installed/121894 "2007-12-02T17:47:36Z")

</div>

Can you have multiple Versions of Rails Installed? And if you do, how do you say to use a particular version?

---

## [Use logger class](https://www.ruby-forum.com/t/use-logger-class/121891)

<div class="topic-metadata">

**Author:** [@shafi](https://www.ruby-forum.com/u/shafi)\
**Replies:** 2\
**Last updated:** [December 2, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/use-logger-class/121891 "2007-12-02T17:39:24Z")

</div>

Hello all, i wanna use logger to log all errors and exceptions that occurs in run time, so i create new file “logfile.log” and put it in /log path in rails application and put these lines of code in environment.rb fil…

---

## [User registeration and submit information](https://www.ruby-forum.com/t/user-registeration-and-submit-information/121162)

<div class="topic-metadata">

**Author:** [@Waleed\_H](https://www.ruby-forum.com/u/Waleed_H)\
**Replies:** 2\
**Last updated:** [December 2, 2007, 5:37pm UTC](https://www.ruby-forum.com/t/user-registeration-and-submit-information/121162 "2007-12-02T17:37:38Z")

</div>

Hello All, I have create web base form to submit information, but I do not want anyone submit I would like user first register and login via his email & password then he can submit the information via the form and upd…

---

## [Launchd, mongrel, capistrano, sudo hookup for Mac OS X](https://www.ruby-forum.com/t/launchd-mongrel-capistrano-sudo-hookup-for-mac-os-x/121900)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 5:35pm UTC](https://www.ruby-forum.com/t/launchd-mongrel-capistrano-sudo-hookup-for-mac-os-x/121900 "2007-12-02T17:35:55Z")

</div>

I won’t bore you with the details of how and why. I have my mongrels running under the “apache” user id. In /Library/LaunchDaemons (on the server) create files called org.rubyforge.mongrel.8000 org.rubyforge.mongrel…

---

## [Creating Custom Avatars in RoR](https://www.ruby-forum.com/t/creating-custom-avatars-in-ror/121862)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 2, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/creating-custom-avatars-in-ror/121862 "2007-12-02T17:22:56Z")

</div>

I’ve seen tutorials on how to do this with PHP, and I’m wondering how I can get started on this type of thing with RoR. In case you don’t know what I’m talking about, here’s a tutorial of how to do this in PHP: http:…

---

## [Hosting for my mephisto blog + git/svn](https://www.ruby-forum.com/t/hosting-for-my-mephisto-blog-git-svn/121844)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 2\
**Last updated:** [December 2, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/hosting-for-my-mephisto-blog-git-svn/121844 "2007-12-02T17:11:12Z")

</div>

I’ve been running my blog and git/svn repos on Slicehost for a while now, and haven’t had any problems. However at this point any time spent managing the server is time wasted - I’ve just got a ton of stuff to do. I…

---

## [New installation and migration](https://www.ruby-forum.com/t/new-installation-and-migration/121898)

<div class="topic-metadata">

**Author:** [@saulinux](https://www.ruby-forum.com/u/saulinux)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 4:58pm UTC](https://www.ruby-forum.com/t/new-installation-and-migration/121898 "2007-12-02T16:58:56Z")

</div>

Hi everybody My first post so be patient. I’d installed a full functional rubyrails system on ubuntu 7.10 server. A collegue of mine has given me a copy of his application and I’m trying to migrate it to my new serv…

---

## [Advice two almost identical controllers](https://www.ruby-forum.com/t/advice-two-almost-identical-controllers/121879)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 3\
**Last updated:** [December 2, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/advice-two-almost-identical-controllers/121879 "2007-12-02T16:39:02Z")

</div>

Hi List, I have a table called invoices where I store all the invoices, the ones that I create and the ones that I received. They have the same fields, the same views, the same data, but I must differentiate between …

---

## [Rails 2.0](https://www.ruby-forum.com/t/rails-2-0/121856)

<div class="topic-metadata">

**Author:** [@Piotr\_N](https://www.ruby-forum.com/u/Piotr_N)\
**Replies:** 5\
**Last updated:** [December 2, 2007, 4:02pm UTC](https://www.ruby-forum.com/t/rails-2-0/121856 "2007-12-02T16:02:40Z")

</div>

using rails 1.2.6, is it worth switching to 2.0 now ?

---

## [Creating new HaBtM?](https://www.ruby-forum.com/t/creating-new-habtm/121893)

<div class="topic-metadata">

**Author:** [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Replies:** 1\
**Last updated:** [December 2, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/creating-new-habtm/121893 "2007-12-02T16:00:55Z")

</div>

Ok, I must be lame. Can’t figure out how to create a new entry in my HABTM models. I just want to add a new book with two authors… How do I do it? class Author \< ActiveRecord::Base has\_and\_belongs\_to\_many :books end …

---

## [Script/server doesn't work](https://www.ruby-forum.com/t/script-server-doesnt-work/121446)

<div class="topic-metadata">

**Author:** [@syed](https://www.ruby-forum.com/u/syed)\
**Replies:** 12\
**Last updated:** [December 2, 2007, 3:19pm UTC](https://www.ruby-forum.com/t/script-server-doesnt-work/121446 "2007-12-02T15:19:21Z")

</div>

Hi, I installed Ruby,rubygems and rails via command prompt. Then I created a project rails ajaxonrails. But when I execute script/server from inside ajaxonrails folder windows gives me an error saying that ‘script’ is…

---

## [Capistrano and acts\_as\_solr](https://www.ruby-forum.com/t/capistrano-and-acts-as-solr/121840)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 1\
**Last updated:** [December 2, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/capistrano-and-acts-as-solr/121840 "2007-12-02T14:46:34Z")

</div>

I’m trying to setup a capistrano 1.4 task to start/stop solr on our production server. The basic setup is pretty straightforward: desc “SymLink /vendors/plugins/acts\_as\_solr/solr to /shared/solr” task :symlink\_solr, …

---

## [Pagination and custom parameters](https://www.ruby-forum.com/t/pagination-and-custom-parameters/121890)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 12:48pm UTC](https://www.ruby-forum.com/t/pagination-and-custom-parameters/121890 "2007-12-02T12:48:08Z")

</div>

hello again, I have in a controller this: @invoice\_pages, @invoices = paginate (:invoices, :conditions =\> \[‘enterprise\_id = ? AND tipus = ?’, session\[:user\_enterprise\_id\] , params\[:kind\]\], :order =\> ‘data …

---

## [\[ANN\] Personalise Site - Now implicitly gains geo data](https://www.ruby-forum.com/t/ann-personalise-site-now-implicitly-gains-geo-data/121886)

<div class="topic-metadata">

**Author:** [@ss\_1982](https://www.ruby-forum.com/u/ss_1982)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/ann-personalise-site-now-implicitly-gains-geo-data/121886 "2007-12-02T12:08:42Z")

</div>

The second version of the Personalise Site plugin has just been released and now includes methods to implicitly gain a users geo data. These additions are intended to be used to further customise and improve a users b…

---

## [How to append some action into already available controller?](https://www.ruby-forum.com/t/how-to-append-some-action-into-already-available-controller/121818)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 3\
**Last updated:** [December 2, 2007, 11:42am UTC](https://www.ruby-forum.com/t/how-to-append-some-action-into-already-available-controller/121818 "2007-12-02T11:42:09Z")

</div>

how to append some action into already available controller with corresponding views (\*.rhtml) .for example ruby/script generate controller admin action1 action2… here admin is already available controller with some a…

---

## [Parsing a referer into routes?](https://www.ruby-forum.com/t/parsing-a-referer-into-routes/121870)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 6:18am UTC](https://www.ruby-forum.com/t/parsing-a-referer-into-routes/121870 "2007-12-02T06:18:15Z")

</div>

Is there any built-in way to take a full URI (http://host/controller/ action/id) and parse it into a route (following all the currently- defined routing rules) with :controller, :action, and :id? In other words, I’d l…

---

## [Looking for a powerful login generator](https://www.ruby-forum.com/t/looking-for-a-powerful-login-generator/121819)

<div class="topic-metadata">

**Author:** [@dcarneiro](https://www.ruby-forum.com/u/dcarneiro)\
**Replies:** 4\
**Last updated:** [December 2, 2007, 3:04am UTC](https://www.ruby-forum.com/t/looking-for-a-powerful-login-generator/121819 "2007-12-02T03:04:51Z")

</div>

Hi guys, I am looking for a powerful login generator. I used goldberg plugin for my website. it is generally OK. but it’s a little simple. Anyone got better ones?

---

## [Rails Tutorial - mySQL doesn't connect in InstantRails](https://www.ruby-forum.com/t/rails-tutorial-mysql-doesnt-connect-in-instantrails/121864)

<div class="topic-metadata">

**Author:** [@tdellaringa](https://www.ruby-forum.com/u/tdellaringa)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 2:09am UTC](https://www.ruby-forum.com/t/rails-tutorial-mysql-doesnt-connect-in-instantrails/121864 "2007-12-02T02:09:49Z")

</div>

For those of you familiar with InstantRails or even MySQL I guess, I’m working through the Agile Depot tutorial, and when I tried to create the DB I got the following: C:\\work\\depot\>mysqladmin -u root create depot\_dev…

---

## [UTF8 Regex in 1.2.x](https://www.ruby-forum.com/t/utf8-regex-in-1-2-x/121861)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 1:56am UTC](https://www.ruby-forum.com/t/utf8-regex-in-1-2-x/121861 "2007-12-02T01:56:29Z")

</div>

So, I’ve been pounding the web for info on UTF8 in Ruby and Rails the past couple days to concoct some validations that allow UTF8 characters. I have discovered that with the patches applied in Rails 1.2, I can get a …

---

## [Integration test post: problem](https://www.ruby-forum.com/t/integration-test-post-problem/121849)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 1\
**Last updated:** [December 1, 2007, 10:09pm UTC](https://www.ruby-forum.com/t/integration-test-post-problem/121849 "2007-12-01T22:09:47Z")

</div>

Hi All I’m trying to submit a from in an Integration test. I have the following form: ... ... The test: post: :login, :params =\> { :field1 =\> 'blabla', :field2 =\> 'blalba' } Running the test the line above…

---

## [InstantRails vs. RubyStack](https://www.ruby-forum.com/t/instantrails-vs-rubystack/121843)

<div class="topic-metadata">

**Author:** [@tdellaringa](https://www.ruby-forum.com/u/tdellaringa)\
**Replies:** 4\
**Last updated:** [December 1, 2007, 10:03pm UTC](https://www.ruby-forum.com/t/instantrails-vs-rubystack/121843 "2007-12-01T22:03:32Z")

</div>

I’ve been poking around Ruby and Rails tutorials after being away from it since 05. I want to get into developing Rails applications, and I have plans for 2 of them, but first I need to get up to speed. So, Rails envi…

---

## [:include doesn't work with belongs\_to](https://www.ruby-forum.com/t/include-doesnt-work-with-belongs-to/121800)

<div class="topic-metadata">

**Author:** [@Mozmonkey](https://www.ruby-forum.com/u/Mozmonkey)\
**Replies:** 4\
**Last updated:** [December 1, 2007, 8:37pm UTC](https://www.ruby-forum.com/t/include-doesnt-work-with-belongs-to/121800 "2007-12-01T20:37:31Z")

</div>

I’m having issues getting :include to eagerly load data in a “belongs\_to” association. Here’s the breakdown: Users have friends and an avatar image. If I am loading all the user’s friends I want to also eagerly load…

---

## [Adding and modifying parameters to present url](https://www.ruby-forum.com/t/adding-and-modifying-parameters-to-present-url/121841)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 1, 2007, 7:41pm UTC](https://www.ruby-forum.com/t/adding-and-modifying-parameters-to-present-url/121841 "2007-12-01T19:41:57Z")

</div>

Hello, I’m having problems creating a new link that points to the same action, with the same existing params, but that would also add a param or modify an existing one. For example, I have: http://www.mysite.com/sea…

---

## [Filter query results from URL hash](https://www.ruby-forum.com/t/filter-query-results-from-url-hash/121838)

<div class="topic-metadata">

**Author:** [@Pootsy](https://www.ruby-forum.com/u/Pootsy)\
**Replies:** 0\
**Last updated:** [December 1, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/filter-query-results-from-url-hash/121838 "2007-12-01T18:44:27Z")

</div>

Hi, I’m developing a very simple product catalogue. Different product types and categories for each type. I’d like to filter the results on my browse controller based on the values that have been appended to the URL. …

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

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