# Rails

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

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

---

## [@ vs self in models?](https://www.ruby-forum.com/t/vs-self-in-models/91268)

<div class="topic-metadata">

**Author:** [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Replies:** 3\
**Last updated:** [April 6, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/vs-self-in-models/91268 "2007-04-06T20:00:26Z")

</div>

i’ve seen both of these syntaxes before and have also used both in my own models: class Foo def get\_bar @bar end end and class Foo def get\_bar self.bar end end seemingly with no difference… i’m a nuby though…

---

## [Setting headers in TestRequest](https://www.ruby-forum.com/t/setting-headers-in-testrequest/91322)

<div class="topic-metadata">

**Author:** [@Rod](https://www.ruby-forum.com/u/Rod)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/setting-headers-in-testrequest/91322 "2007-04-06T19:18:19Z")

</div>

Hi. I’m using HTTP Basic auth for some of my REST interfaces, so I want to run tests setting the HTTP AUTHORIZATION header. But I can’t find a way to do it in the functional test. I can see the response headers in @…

---

## [App ignores cached pages and re-caches them again and again](https://www.ruby-forum.com/t/app-ignores-cached-pages-and-re-caches-them-again-and-again/91234)

<div class="topic-metadata">

**Author:** [@tharealpatton](https://www.ruby-forum.com/u/tharealpatton)\
**Replies:** 3\
**Last updated:** [April 6, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/app-ignores-cached-pages-and-re-caches-them-again-and-again/91234 "2007-04-06T18:42:39Z")

</div>

I’m wondering if anyone has any ideas on what would cause rails to write the cached page, but the app ignore the caches pages and instead cache it again and again on every request? I’m setting config.action\_controller…

---

## [Fwd: mongrel cluster restart with capistrano fails but manua](https://www.ruby-forum.com/t/fwd-mongrel-cluster-restart-with-capistrano-fails-but-manua/91273)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 1\
**Last updated:** [April 6, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/fwd-mongrel-cluster-restart-with-capistrano-fails-but-manua/91273 "2007-04-06T18:03:49Z")

</div>

\---------- Forwarded message ---------- From: Michael S. removed\_email\_address@domain.invalid Date: Apr 3, 2007 12:23 PM Subject: mongrel cluster restart with capistrano fails but manually works To: removed\_email\_ad…

---

## [Unknown constant when using habtm?](https://www.ruby-forum.com/t/unknown-constant-when-using-habtm/91316)

<div class="topic-metadata">

**Author:** [@JamesR](https://www.ruby-forum.com/u/JamesR)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/unknown-constant-when-using-habtm/91316 "2007-04-06T17:59:11Z")

</div>

Hello, I have a Post AR and a Category AR. The Post has\_and\_belongs\_to\_many :Categories. When I attempt to call destroy() on a post object, I am getting the following error. uninitalized Constant Post::Categories. I…

---

## [Mongrels slower than Webrick?](https://www.ruby-forum.com/t/mongrels-slower-than-webrick/91311)

<div class="topic-metadata">

**Author:** [@Joram](https://www.ruby-forum.com/u/Joram)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/mongrels-slower-than-webrick/91311 "2007-04-06T17:18:41Z")

</div>

Hi list, I’ve just run my testscript 100 times to see if mongrel really was that fast as the internet suggested. Both webrick as mongrel are run in production mode, with the same tests. Both are run as a single proc…

---

## [Deploying rails as a sub-url](https://www.ruby-forum.com/t/deploying-rails-as-a-sub-url/91274)

<div class="topic-metadata">

**Author:** [@msoulier](https://www.ruby-forum.com/u/msoulier)\
**Replies:** 6\
**Last updated:** [April 6, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/deploying-rails-as-a-sub-url/91274 "2007-04-06T17:01:34Z")

</div>

Hello, I want to deploy a rails app as a sub-url to an existing site. So, I’m using ProxyPass in apache to proxy urls for /foo to localhost on port 10000, where mongrel is listening. Unfortunately, the helper functi…

---

## [How to deploy a tagged version instead of trunk?](https://www.ruby-forum.com/t/how-to-deploy-a-tagged-version-instead-of-trunk/91246)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 2\
**Last updated:** [April 6, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/how-to-deploy-a-tagged-version-instead-of-trunk/91246 "2007-04-06T16:54:47Z")

</div>

What is the best approach for deploying a tagged release to production instead of the trunk? This happens, for example, when you want to apply a small patch to production, but can’t deploy the entire trunk. I took a …

---

## [\[ANN\] Toffee Plugin 0.2 - Automated Admin Screens](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971)

<div class="topic-metadata">

**Author:** [@davidf](https://www.ruby-forum.com/u/davidf)\
**Replies:** 5\
**Last updated:** [April 6, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971 "2007-04-06T16:42:51Z")

</div>

Toffee is a plugin that gives you automatic controller-less admin screens for your Rails models. Simply going to the URL /admin/model\_name will bring up an admin screen for that model, allowing you to view, edit, crea…

---

## [HABTM, getting join model vars](https://www.ruby-forum.com/t/habtm-getting-join-model-vars/91297)

<div class="topic-metadata">

**Author:** [@bartz](https://www.ruby-forum.com/u/bartz)\
**Replies:** 3\
**Last updated:** [April 6, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/habtm-getting-join-model-vars/91297 "2007-04-06T16:30:15Z")

</div>

Hello all, I having a lot of difficulty wrapping my head around the following. I’m building a site for musicians, who can post Events where they perform. So, Profile has\_many :events, and Event habtm :profiles. Howev…

---

## [Remove all tabs and spaces](https://www.ruby-forum.com/t/remove-all-tabs-and-spaces/91310)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 4:03pm UTC](https://www.ruby-forum.com/t/remove-all-tabs-and-spaces/91310 "2007-04-06T16:03:57Z")

</div>

hi, do you know a tool/script/something to remove all spaces and tabs and maybe also returns in the html to “compress” the page? maybe something that can be called automatically during the deploy, so i can keep in my …

---

## [How to execute create table on fly](https://www.ruby-forum.com/t/how-to-execute-create-table-on-fly/91291)

<div class="topic-metadata">

**Author:** [@feng](https://www.ruby-forum.com/u/feng)\
**Replies:** 4\
**Last updated:** [April 6, 2007, 3:42pm UTC](https://www.ruby-forum.com/t/how-to-execute-create-table-on-fly/91291 "2007-04-06T15:42:04Z")

</div>

dear all, I’m a Rails newbie and i have some problem. I’m using MySQL. I want to excute some complexity query, and I need to create some table to hold temp query result. I want to know how to execute some SQL query …

---

## [Mongrel Clusters on Windows](https://www.ruby-forum.com/t/mongrel-clusters-on-windows/91229)

<div class="topic-metadata">

**Author:** [@aginghipster](https://www.ruby-forum.com/u/aginghipster)\
**Replies:** 3\
**Last updated:** [April 6, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/mongrel-clusters-on-windows/91229 "2007-04-06T15:37:53Z")

</div>

I have set-up mongrel clusters by individual steps. What I mean by this is that I tried to use mongrel\_clusters plugin and failed. Using mongrel clusters I did: mongrel\_rails cluster::configure -e development \\ -p 820…

---

## [Possible bug in ActiveRecord::Base#to\_xml and caching](https://www.ruby-forum.com/t/possible-bug-in-activerecord-base-to-xml-and-caching/91309)

<div class="topic-metadata">

**Author:** [@jruyle](https://www.ruby-forum.com/u/jruyle)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/possible-bug-in-activerecord-base-to-xml-and-caching/91309 "2007-04-06T15:31:42Z")

</div>

So I’ve got this weird problem showing up in the production environment to where when I grab xml from resources, the xml results get cached, but not used. This means that every subsequent request appends the results …

---

## [Howto test RJS templates?](https://www.ruby-forum.com/t/howto-test-rjs-templates/91247)

<div class="topic-metadata">

**Author:** [@cmanruby](https://www.ruby-forum.com/u/cmanruby)\
**Replies:** 2\
**Last updated:** [April 6, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/howto-test-rjs-templates/91247 "2007-04-06T14:55:16Z")

</div>

Hi, The following code works, but I don’t know how to test ist properly: In the view there is a simple link\_to\_remote: | | \<%= link\_to\_remote “Create New”, :url =\> new\_category\_url %\> | Essentially, when I c…

---

## [?: Quasi Aspect Oriented Programming with Plugins](https://www.ruby-forum.com/t/quasi-aspect-oriented-programming-with-plugins/91302)

<div class="topic-metadata">

**Author:** [@wybo](https://www.ruby-forum.com/u/wybo)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/quasi-aspect-oriented-programming-with-plugins/91302 "2007-04-06T14:11:31Z")

</div>

If you’ve been programming for a while you’ve probably heard of Aspect Oriented Programming. Now AOP is good, as it reduces complexity for developers and when combined with modules it also allows system administrators…

---

## [Textmate Ruby/Rails Developers - Your input re required snip](https://www.ruby-forum.com/t/textmate-ruby-rails-developers-your-input-re-required-snip/91301)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 1:59pm UTC](https://www.ruby-forum.com/t/textmate-ruby-rails-developers-your-input-re-required-snip/91301 "2007-04-06T13:59:58Z")

</div>

Hi all, The ever increasing Ruby & Rails support in Netbeans continues. The latest post is at http://blogs.sun.com/tor/entry/ruby\_screenshot\_of\_the\_week7 which now includes textmate bundles/snippet type support + m…

---

## [How to call submit buttons through javascript!](https://www.ruby-forum.com/t/how-to-call-submit-buttons-through-javascript/91286)

<div class="topic-metadata">

**Author:** [@prot](https://www.ruby-forum.com/u/prot)\
**Replies:** 1\
**Last updated:** [April 6, 2007, 9:44am UTC](https://www.ruby-forum.com/t/how-to-call-submit-buttons-through-javascript/91286 "2007-04-06T09:44:43Z")

</div>

i need to call submit button on href could you ppl plz help me out wit this situation… \<%= start\_form\_tag %\> \<%= submit\_tag %\> instead of ths i want using javascript \<%= end\_form\_tag %\>

---

## [Attachment\_fu rake plugin test aborting](https://www.ruby-forum.com/t/attachment-fu-rake-plugin-test-aborting/91283)

<div class="topic-metadata">

**Author:** [@lambo4jos](https://www.ruby-forum.com/u/lambo4jos)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 8:20am UTC](https://www.ruby-forum.com/t/attachment-fu-rake-plugin-test-aborting/91283 "2007-04-06T08:20:30Z")

</div>

What does define INLINEDIR or HOME in environment? Does that mean the Environment Variables for windows? If so, what is the value i set these environment variables too? Please help. I have been on this problem for a…

---

## [Problem with loading acts\_as\_authenticated plugin](https://www.ruby-forum.com/t/problem-with-loading-acts-as-authenticated-plugin/91068)

<div class="topic-metadata">

**Author:** [@laurent](https://www.ruby-forum.com/u/laurent)\
**Replies:** 1\
**Last updated:** [April 6, 2007, 7:52am UTC](https://www.ruby-forum.com/t/problem-with-loading-acts-as-authenticated-plugin/91068 "2007-04-06T07:52:27Z")

</div>

I currently develop a little app, and i installed the acts\_as\_authenticated plugin Everything worked fine til yesterday evening. While working on CSS sheet, then testing iteratively : nothing worked. Checking the dev…

---

## [My mongrel keeps shutting down](https://www.ruby-forum.com/t/my-mongrel-keeps-shutting-down/91219)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 1\
**Last updated:** [April 6, 2007, 7:20am UTC](https://www.ruby-forum.com/t/my-mongrel-keeps-shutting-down/91219 "2007-04-06T07:20:25Z")

</div>

I’m on a VPS running CentOS. I startup my server with: mongrel\_rails start -d -p 3000 -e production and it runs for a while. But later I receive ‘502 Bad Gateway’ errors implying my mongrel has crapped out. So in t…

---

## [How To: Browser version, OS Version?](https://www.ruby-forum.com/t/how-to-browser-version-os-version/91239)

<div class="topic-metadata">

**Author:** [@Lennard](https://www.ruby-forum.com/u/Lennard)\
**Replies:** 1\
**Last updated:** [April 6, 2007, 7:16am UTC](https://www.ruby-forum.com/t/how-to-browser-version-os-version/91239 "2007-04-06T07:16:25Z")

</div>

Hi all, What should do the trick If I want to find out what the clients Browser Version en OS Version is? Is there a special kind of method for this? (just like finding out what the ip of the client is with the follow…

---

## [How to Build a Rescission Calendar in Rails](https://www.ruby-forum.com/t/how-to-build-a-rescission-calendar-in-rails/91279)

<div class="topic-metadata">

**Author:** [@gr0k](https://www.ruby-forum.com/u/gr0k)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 6:41am UTC](https://www.ruby-forum.com/t/how-to-build-a-rescission-calendar-in-rails/91279 "2007-04-06T06:41:31Z")

</div>

Hey everyone, I’m sorta new to ruby on rails and I need a little help in thinking through something with a calendar. I have a client that wants a rescission calendar on his site. Best example of this would be found at …

---

## [Ruby doc errorr](https://www.ruby-forum.com/t/ruby-doc-errorr/91280)

<div class="topic-metadata">

**Author:** [@raj](https://www.ruby-forum.com/u/raj)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 6:37am UTC](https://www.ruby-forum.com/t/ruby-doc-errorr/91280 "2007-04-06T06:37:44Z")

</div>

authenticated\_test\_helper.rb: m. RDoc failure in vendor/plugins/acts\_as\_authenticated/generators/authenticated/te mplates/authenticated\_test\_helper.rb at or around line 113 column 4 Before reporting this, could yo…

---

## [Anyway to dry this up?](https://www.ruby-forum.com/t/anyway-to-dry-this-up/91276)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 6:27am UTC](https://www.ruby-forum.com/t/anyway-to-dry-this-up/91276 "2007-04-06T06:27:23Z")

</div>

Is there a way to take this common route pattern: map.category ‘/by/:type/:category’, :controller =\> ‘category’, :action =\> ‘show’, :page\_number =\> ‘1’ map.connect ‘/by/:type/:category/page/:page\_number’, :controller …

---

## [Gangtsa on rails](https://www.ruby-forum.com/t/gangtsa-on-rails/91272)

<div class="topic-metadata">

**Author:** [@S\_ugly](https://www.ruby-forum.com/u/S_ugly)\
**Replies:** 0\
**Last updated:** [April 6, 2007, 6:01am UTC](https://www.ruby-forum.com/t/gangtsa-on-rails/91272 "2007-04-06T06:01:20Z")

</div>

a rap about rails: http://crookedhideout.com/blog\_entry/show/10

---

## [Web brick is it that bad](https://www.ruby-forum.com/t/web-brick-is-it-that-bad/91265)

<div class="topic-metadata">

**Author:** [@Camo](https://www.ruby-forum.com/u/Camo)\
**Replies:** 3\
**Last updated:** [April 6, 2007, 5:44am UTC](https://www.ruby-forum.com/t/web-brick-is-it-that-bad/91265 "2007-04-06T05:44:19Z")

</div>

Hey guys, I’ve been a .net developer for a long while and started getting in to rails lately, I was just wondering thou, is there any reason to use say apache or lighttpd over web brick for development. From playing …

---

## [Rails Server](https://www.ruby-forum.com/t/rails-server/91252)

<div class="topic-metadata">

**Author:** [@mick](https://www.ruby-forum.com/u/mick)\
**Replies:** 5\
**Last updated:** [April 6, 2007, 4:57am UTC](https://www.ruby-forum.com/t/rails-server/91252 "2007-04-06T04:57:17Z")

</div>

Hi, I use the standard rails webrick server to run my web application on my local machine (I access it through http://localhost:3000 etc etc) but I was wondering if there was a way I can access it from the web, e.g. …

---

## [Relationships in RoR](https://www.ruby-forum.com/t/relationships-in-ror/102741)

<div class="topic-metadata">

**Author:** [@Shanon](https://www.ruby-forum.com/u/Shanon)\
**Replies:** 2\
**Last updated:** [April 6, 2007, 4:52am UTC](https://www.ruby-forum.com/t/relationships-in-ror/102741 "2007-04-06T04:52:17Z")

</div>

How does one setup relations between table I have the has\_many and belongs\_to in the correct places (hopefully) but i think i have the migrations in the incorrect order A user can create many jobs so i have user has…

---

## [Finder\_sql and sql injection?](https://www.ruby-forum.com/t/finder-sql-and-sql-injection/91262)

<div class="topic-metadata">

**Author:** [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Replies:** 2\
**Last updated:** [April 6, 2007, 4:11am UTC](https://www.ruby-forum.com/t/finder-sql-and-sql-injection/91262 "2007-04-06T04:11:30Z")

</div>

The example from the api for has\_many looks like: has\_many :subscribers, :class\_name =\> “Person”, :finder\_sql =\> 'SELECT DISTINCT people.\* ’ + 'FROM people p, post\_subscriptions ps ’ + 'WHERE ps.post\_id = #{id} AND p…

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

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