# Rails

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

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

---

## [DRYing some controller code](https://www.ruby-forum.com/t/drying-some-controller-code/140366)

<div class="topic-metadata">

**Author:** [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Replies:** 0\
**Last updated:** [June 13, 2008, 10:22am UTC](https://www.ruby-forum.com/t/drying-some-controller-code/140366 "2008-06-13T10:22:56Z")

</div>

def index if not @contest.nil? @videos = Video.paginate( :all, :include =\> { :ad =\> :contest }, :page =\> params\[ :page \], :conditions =\> \[ “videos.state = ‘published’ AND contests.slug = ?”, @contest.slug \] ) else …

---

## [How do you reconcile foreign keys for forms?](https://www.ruby-forum.com/t/how-do-you-reconcile-foreign-keys-for-forms/140329)

<div class="topic-metadata">

**Author:** [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 10:19am UTC](https://www.ruby-forum.com/t/how-do-you-reconcile-foreign-keys-for-forms/140329 "2008-06-13T10:19:57Z")

</div>

Hi all, I’m looking to resolve foreign keys for forms – similar to the way “streamlined” does it. Although the actual value stored in an object is the foreign key integer, I’d like the actual name of the item displa…

---

## [How to pack models, controllers into a Plugin](https://www.ruby-forum.com/t/how-to-pack-models-controllers-into-a-plugin/140354)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 9:50am UTC](https://www.ruby-forum.com/t/how-to-pack-models-controllers-into-a-plugin/140354 "2008-06-13T09:50:21Z")

</div>

We have been using rails to build a application platform for years. Because some of projects are completely different, we have to branch our trunk and make changes in branch. But among trunk and branches, they do have…

---

## [PDF in rails](https://www.ruby-forum.com/t/pdf-in-rails/140360)

<div class="topic-metadata">

**Author:** [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Replies:** 4\
**Last updated:** [June 13, 2008, 9:17am UTC](https://www.ruby-forum.com/t/pdf-in-rails/140360 "2008-06-13T09:17:00Z")

</div>

Hi All, I am generating pdf in rails by using rupdf plugin.Now i want to customize the layout for the pdf. Searched a lot but couldn’t find anything relevant. Any suggessions? Thanks Arpit

---

## [Need some info regarding Rspec](https://www.ruby-forum.com/t/need-some-info-regarding-rspec/140351)

<div class="topic-metadata">

**Author:** [@kittu21](https://www.ruby-forum.com/u/kittu21)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 9:12am UTC](https://www.ruby-forum.com/t/need-some-info-regarding-rspec/140351 "2008-06-13T09:12:33Z")

</div>

Hi guys, Can any on eof you please suggest me some useful URLs or Books regarding RSpec. Thanks in Advance!! Regards, Kittu.

---

## [How to force download with Amazon S3](https://www.ruby-forum.com/t/how-to-force-download-with-amazon-s3/140362)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 0\
**Last updated:** [June 13, 2008, 8:34am UTC](https://www.ruby-forum.com/t/how-to-force-download-with-amazon-s3/140362 "2008-06-13T08:34:15Z")

</div>

I’m using amazon s3 to offer users large file downloads to save on bandwidth. I’ve found the file with the s3 object and can send the url to access the file, but I want to force the download instead of pulling it up …

---

## [Weird Character Encoding Issue in ActionMailer](https://www.ruby-forum.com/t/weird-character-encoding-issue-in-actionmailer/140314)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 7:47am UTC](https://www.ruby-forum.com/t/weird-character-encoding-issue-in-actionmailer/140314 "2008-06-13T07:47:34Z")

</div>

Hey, I have my application setup so that e-mail templates are stored in the database, and each time an e-mail is sent out, a new entry is entered into the database with the email\_template\_id, what e-mail-specific var…

---

## [Collection\_select](https://www.ruby-forum.com/t/collection-select/140357)

<div class="topic-metadata">

**Author:** [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Replies:** 0\
**Last updated:** [June 13, 2008, 7:35am UTC](https://www.ruby-forum.com/t/collection-select/140357 "2008-06-13T07:35:22Z")

</div>

\<%= collection\_select(:project, :id,{@arc\_projects),:id,:name,options ={:prompt =\> “–Archived Projects–”})%\> i use this code to retrive archieved project.and its works also… but if i want to show a dropdown which c…

---

## [Has anyone seen how to do pop-ups via controllers?](https://www.ruby-forum.com/t/has-anyone-seen-how-to-do-pop-ups-via-controllers/140199)

<div class="topic-metadata">

**Author:** [@newrubygirl](https://www.ruby-forum.com/u/newrubygirl)\
**Replies:** 7\
**Last updated:** [June 13, 2008, 6:51am UTC](https://www.ruby-forum.com/t/has-anyone-seen-how-to-do-pop-ups-via-controllers/140199 "2008-06-13T06:51:40Z")

</div>

I’ve got the pop-up window opening if I click on a link, but now I want to do something else. After a record is created, I want to go the edit page and open up a pop-up window. Any ideas on how to make that work? Th…

---

## [Need Help](https://www.ruby-forum.com/t/need-help/140353)

<div class="topic-metadata">

**Author:** [@prionko](https://www.ruby-forum.com/u/prionko)\
**Replies:** 0\
**Last updated:** [June 13, 2008, 6:26am UTC](https://www.ruby-forum.com/t/need-help/140353 "2008-06-13T06:26:05Z")

</div>

Hi, I have a webpage , where I can insert word counts for a single document file that I upload.I want a feature such that when I insert the word count for the document a pop-up should come up saying the price for up…

---

## [String "fwrite();" causes 503 error (Passenger or apache?)](https://www.ruby-forum.com/t/string-fwrite-causes-503-error-passenger-or-apache/140342)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 2:42am UTC](https://www.ruby-forum.com/t/string-fwrite-causes-503-error-passenger-or-apache/140342 "2008-06-13T02:42:16Z")

</div>

Hi, While testing a rails application on DreamHost (mod\_rails), I found a really weird problem. If I submit form data which includes “fwrite();” (with semi-colon but without quotes), I get 503 error (Server temporari…

---

## [Attachment\_fu & multiple directories](https://www.ruby-forum.com/t/attachment-fu-multiple-directories/140332)

<div class="topic-metadata">

**Author:** [@avramd](https://www.ruby-forum.com/u/avramd)\
**Replies:** 0\
**Last updated:** [June 13, 2008, 1:03am UTC](https://www.ruby-forum.com/t/attachment-fu-multiple-directories/140332 "2008-06-13T01:03:21Z")

</div>

Hello, I’m probably going to be using attachment\_fu, but I need to have groups of attachment repositories that are separate from one another, but all within one rails app. My site will have groups of users that will …

---

## [Where did Builder::XmlMarkup go in Rails 2.1?](https://www.ruby-forum.com/t/where-did-builder-xmlmarkup-go-in-rails-2-1/140320)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 5\
**Last updated:** [June 13, 2008, 12:49am UTC](https://www.ruby-forum.com/t/where-did-builder-xmlmarkup-go-in-rails-2-1/140320 "2008-06-13T00:49:53Z")

</div>

All, I have a builder (.rxml) file that creates a new builder using: xml = Builder::XmlMarkup.new(:indent =\> 2) When I attempt to render it, I get this exception: uninitialized constant ActionView::TemplateHandlers:…

---

## [How does 'require' work exactly?](https://www.ruby-forum.com/t/how-does-require-work-exactly/140163)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 7\
**Last updated:** [June 13, 2008, 12:46am UTC](https://www.ruby-forum.com/t/how-does-require-work-exactly/140163 "2008-06-13T00:46:57Z")

</div>

Hi, I need some help understanding how to track down a "require ‘runt’ " line that is not working. The runt gem ( http://runt.rubyforge.org/ ) says after you install it you can do the following and this should work…

---

## [Reading logs? keep reading a file?](https://www.ruby-forum.com/t/reading-logs-keep-reading-a-file/140315)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 13, 2008, 12:45am UTC](https://www.ruby-forum.com/t/reading-logs-keep-reading-a-file/140315 "2008-06-13T00:45:46Z")

</div>

Hi I am trying to read from /var/log/messages but the script will finish… ok ok… what I am trying to do is open the log or logs and wait for a phrase of my choosing to appear then do something… I know the regex part …

---

## [Strange 500 Internal Server Error Related](https://www.ruby-forum.com/t/strange-500-internal-server-error-related/139905)

<div class="topic-metadata">

**Author:** [@lottario](https://www.ruby-forum.com/u/lottario)\
**Replies:** 6\
**Last updated:** [June 13, 2008, 12:45am UTC](https://www.ruby-forum.com/t/strange-500-internal-server-error-related/139905 "2008-06-13T00:45:19Z")

</div>

Well, I’ve been trying to fix this all day, and I’ve come up empty. It seems that, for some mysterious reason, my app now doesn’t like to register new users, at least in my development environment. I sent my code to…

---

## [Query to search table that has many in another table](https://www.ruby-forum.com/t/query-to-search-table-that-has-many-in-another-table/140327)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 1\
**Last updated:** [June 13, 2008, 12:25am UTC](https://www.ruby-forum.com/t/query-to-search-table-that-has-many-in-another-table/140327 "2008-06-13T00:25:14Z")

</div>

i have 3 tables ITEMS id name … COMPOUNDS has many compound\_materials id item\_id … COMPOUND\_MATERIALS belongs to compounds id item\_id compound\_id … i am trying to do a search to find all compounds or compou…

---

## [Acts\_as\_state\_machine error: evaluating nil.exited](https://www.ruby-forum.com/t/acts-as-state-machine-error-evaluating-nil-exited/140326)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 1\
**Last updated:** [June 12, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/acts-as-state-machine-error-evaluating-nil-exited/140326 "2008-06-12T23:43:34Z")

</div>

NoMethodError in FeedsController#do\_validate You have a nil object when you didn’t expect it! The error occurred while evaluating nil.exited RAILS\_ROOT: /Users/jaysanders/Sites/rss/trunk Application Trace | Framework…

---

## [Did the order of autoloading assets change in Rails 2.1?](https://www.ruby-forum.com/t/did-the-order-of-autoloading-assets-change-in-rails-2-1/140299)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 6\
**Last updated:** [June 12, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/did-the-order-of-autoloading-assets-change-in-rails-2-1/140299 "2008-06-12T23:34:42Z")

</div>

All, I upgraded to Rails 2.1 from 2.0.2 and my app. started to show problems with not having access to certain constants, etc. I have several “requires” set up in environment.rb so that various modules will be avail…

---

## [Link\_to\_remote :with hash](https://www.ruby-forum.com/t/link-to-remote-with-hash/140289)

<div class="topic-metadata">

**Author:** [@julian](https://www.ruby-forum.com/u/julian)\
**Replies:** 1\
**Last updated:** [June 12, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-hash/140289 "2008-06-12T23:19:20Z")

</div>

I found myself doing a lot of long :with strings with link\_to\_remote when passing multiple parameters from the page by dom ids. This strings are really easy to mess up so I added a behavior to link\_to\_remote that all…

---

## [Observer not working](https://www.ruby-forum.com/t/observer-not-working/140220)

<div class="topic-metadata">

**Author:** [@caltron](https://www.ruby-forum.com/u/caltron)\
**Replies:** 1\
**Last updated:** [June 12, 2008, 11:16pm UTC](https://www.ruby-forum.com/t/observer-not-working/140220 "2008-06-12T23:16:20Z")

</div>

I’m trying to observer a field (or form as in my example) and keep getting a ‘Form is not defined’ error. Near as I can tell everything is in place In the layout file, I’ve got the default javascript files as one pos…

---

## [Searching for RoR Guru in Wichita, Ks to build robust online purchasing site](https://www.ruby-forum.com/t/searching-for-ror-guru-in-wichita-ks-to-build-robust-online-purchasing-site/140317)

<div class="topic-metadata">

**Author:** [@somodat](https://www.ruby-forum.com/u/somodat)\
**Replies:** 0\
**Last updated:** [June 12, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/searching-for-ror-guru-in-wichita-ks-to-build-robust-online-purchasing-site/140317 "2008-06-12T22:46:55Z")

</div>

Please email me at removed\_email\_address@domain.invalid and I’ll send a site-capability spec sheet. Al

---

## [Rail Developer - Charlotte, NC](https://www.ruby-forum.com/t/rail-developer-charlotte-nc/140321)

<div class="topic-metadata">

**Author:** [@seth](https://www.ruby-forum.com/u/seth)\
**Replies:** 0\
**Last updated:** [June 12, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/rail-developer-charlotte-nc/140321 "2008-06-12T22:46:55Z")

</div>

This is a Contract or PERM role here in Charlotte. You can work from the office in Boca Raton, FL but on-site is required. Email me at removed\_email\_address@domain.invalid if you are interested in the role. Rails D…

---

## [Upgrading to 2.1 breaks my named routes](https://www.ruby-forum.com/t/upgrading-to-2-1-breaks-my-named-routes/140312)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 3\
**Last updated:** [June 12, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/upgrading-to-2-1-breaks-my-named-routes/140312 "2008-06-12T22:26:42Z")

</div>

I just upgraded to 2.1 and attempted to log in to my application and when this line is reached in my login action: redirect\_to(index\_url) I get the error “wrong number of arguments (0 for 1)” \[stack trace below\]. H…

---

## [Getcwd not found](https://www.ruby-forum.com/t/getcwd-not-found/140316)

<div class="topic-metadata">

**Author:** [@tamouse](https://www.ruby-forum.com/u/tamouse)\
**Replies:** 0\
**Last updated:** [June 12, 2008, 10:08pm UTC](https://www.ruby-forum.com/t/getcwd-not-found/140316 "2008-06-12T22:08:43Z")

</div>

Hi, new to Rails, running my first app. I built a small data base, just a mini blog type thing and created a scaffold for it. When I call the scaffold, I get an error saying the application can’t find getcwd. A copy o…

---

## [To RoR or Not To RoR](https://www.ruby-forum.com/t/to-ror-or-not-to-ror/140177)

<div class="topic-metadata">

**Author:** [@Gryzor](https://www.ruby-forum.com/u/Gryzor)\
**Replies:** 11\
**Last updated:** [June 12, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/to-ror-or-not-to-ror/140177 "2008-06-12T22:00:28Z")

</div>

Hello RoR Community, I am involved in a new project, we have to build a dynamic website (no surprise!), and I have to decide which technology to use. I come from PHP, ASP (VBScript and then .NET, VB, C#) world. I code…

---

## [How best to find items joined across several tables?](https://www.ruby-forum.com/t/how-best-to-find-items-joined-across-several-tables/140296)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 6\
**Last updated:** [June 12, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/how-best-to-find-items-joined-across-several-tables/140296 "2008-06-12T21:48:41Z")

</div>

Hi All, For the sake of argument I have these models user has\_many :posts post belongs\_to :user has\_many :responses response belongs\_to :post How do I find all responses that a user has had to all of their posts …

---

## [RoR hoster with Windows as Operation System](https://www.ruby-forum.com/t/ror-hoster-with-windows-as-operation-system/140274)

<div class="topic-metadata">

**Author:** [@pel](https://www.ruby-forum.com/u/pel)\
**Replies:** 2\
**Last updated:** [June 12, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/ror-hoster-with-windows-as-operation-system/140274 "2008-06-12T21:44:35Z")

</div>

Hello, I am looking for a Ror webhoster running windows server OS because i want to run a c++/c# .exe on the server. Anyone knows?

---

## [Problem uploading files (possibly an OS X issue?)](https://www.ruby-forum.com/t/problem-uploading-files-possibly-an-os-x-issue/140245)

<div class="topic-metadata">

**Author:** [@Tim\_Sanders](https://www.ruby-forum.com/u/Tim_Sanders)\
**Replies:** 7\
**Last updated:** [June 12, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/problem-uploading-files-possibly-an-os-x-issue/140245 "2008-06-12T21:35:19Z")

</div>

I have a running Rails application that uploads files back to the server occasionally. I recently switched my development machine from a Linux box to OS X 10.5, using the Apache server built-in on OS X and mod\_fcgid. …

---

## [Override list methods for entire app](https://www.ruby-forum.com/t/override-list-methods-for-entire-app/140306)

<div class="topic-metadata">

**Author:** [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Replies:** 4\
**Last updated:** [June 12, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/override-list-methods-for-entire-app/140306 "2008-06-12T21:02:11Z")

</div>

Hello, i have a web that lets users login and their login information is stored in session. Now, I want to be able to display records from few tables based on the username that they entered. So, all these tables have …

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

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