# Rails

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

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

---

## [ActionView::TemplateError](https://www.ruby-forum.com/t/actionview-templateerror/135465)

<div class="topic-metadata">

**Author:** [@saravanankrishnan](https://www.ruby-forum.com/u/saravanankrishnan)\
**Replies:** 4\
**Last updated:** [April 23, 2008, 6:11am UTC](https://www.ruby-forum.com/t/actionview-templateerror/135465 "2008-04-23T06:11:22Z")

</div>

Hi, I have a problem that only occurs on the production server. I’ve tried to figure it out with no success. Below is a copy of the error from the production log. Can anyone help me :frowning: ActionView::TemplateEr…

---

## [Problem in Print PDF by AJAX request](https://www.ruby-forum.com/t/problem-in-print-pdf-by-ajax-request/135229)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 4\
**Last updated:** [April 23, 2008, 5:43am UTC](https://www.ruby-forum.com/t/problem-in-print-pdf-by-ajax-request/135229 "2008-04-23T05:43:16Z")

</div>

Hi, I am trying to send the pdf file for the user to download. I am using send\_data method to send the pdf file. When the user clicks on the “Print PDF” link, the controller method is called the and the pdf file is s…

---

## [Problem in form validation of input using onSubmit](https://www.ruby-forum.com/t/problem-in-form-validation-of-input-using-onsubmit/135438)

<div class="topic-metadata">

**Author:** [@prionko](https://www.ruby-forum.com/u/prionko)\
**Replies:** 3\
**Last updated:** [April 23, 2008, 4:44am UTC](https://www.ruby-forum.com/t/problem-in-form-validation-of-input-using-onsubmit/135438 "2008-04-23T04:44:59Z")

</div>

Hi, Im trying to check for uploading of files of only doc and ps types. For that matter I have used two javascript funtions and the form. Im trying to use onSubmit event handler along with form\_for.But the problem is …

---

## [HABTM setup problem?](https://www.ruby-forum.com/t/habtm-setup-problem/135411)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 4\
**Last updated:** [April 23, 2008, 3:27am UTC](https://www.ruby-forum.com/t/habtm-setup-problem/135411 "2008-04-23T03:27:03Z")

</div>

Hey, So I have a HABTM relationship between story and genre with a join table genres\_stories. From what I can tell the first story I add genres to works fine, but when I try to add genres to a second stroy I get the…

---

## [Deleting records en mass from database](https://www.ruby-forum.com/t/deleting-records-en-mass-from-database/135433)

<div class="topic-metadata">

**Author:** [@histrionics](https://www.ruby-forum.com/u/histrionics)\
**Replies:** 7\
**Last updated:** [April 23, 2008, 3:21am UTC](https://www.ruby-forum.com/t/deleting-records-en-mass-from-database/135433 "2008-04-23T03:21:45Z")

</div>

There HAS to be an easier way then this, right?..RIGHT? It just seems to take forever. @site = Site.find(params\[:id\]) @siteproducts = SiteProduct.find(:all, :conditions =\> \[ "site\_id = ?", params\[:id\]\]) @sitepurchase…

---

## [Associations](https://www.ruby-forum.com/t/associations/135554)

<div class="topic-metadata">

**Author:** [@alais](https://www.ruby-forum.com/u/alais)\
**Replies:** 0\
**Last updated:** [April 23, 2008, 3:13am UTC](https://www.ruby-forum.com/t/associations/135554 "2008-04-23T03:13:58Z")

</div>

I have a list of tags. I’d like to put labels on the tags (tag the tags?) and group them. group.rb: has\_many :tags, tag.rb: has\_many :groups, etc. I would also like to associate groups with other groups. For example, …

---

## [Downloading back uploaded files](https://www.ruby-forum.com/t/downloading-back-uploaded-files/135421)

<div class="topic-metadata">

**Author:** [@Bruno\_GuimarSSSSes\_S](https://www.ruby-forum.com/u/Bruno_GuimarSSSSes_S)\
**Replies:** 4\
**Last updated:** [April 23, 2008, 2:41am UTC](https://www.ruby-forum.com/t/downloading-back-uploaded-files/135421 "2008-04-23T02:41:25Z")

</div>

Hi everyone, I finally uploaded files in RoR. Now I want to download it back trough the browser. This is what I get: Routing Error No route matches “/uploaded\_files/dr\_2.pdf” with {:method=\>:get} What can I do? Re…

---

## [Best way to verify request method](https://www.ruby-forum.com/t/best-way-to-verify-request-method/135529)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 4\
**Last updated:** [April 23, 2008, 2:37am UTC](https://www.ruby-forum.com/t/best-way-to-verify-request-method/135529 "2008-04-23T02:37:58Z")

</div>

I did some googling, but didn’t find anything that specifically addressed my question, but if you have a link, I’d really appreciate it. I want to build some robustness into my controllers by blocking access to action…

---

## [Saving to a table with computed fields](https://www.ruby-forum.com/t/saving-to-a-table-with-computed-fields/135541)

<div class="topic-metadata">

**Author:** [@jessruby](https://www.ruby-forum.com/u/jessruby)\
**Replies:** 1\
**Last updated:** [April 23, 2008, 2:05am UTC](https://www.ruby-forum.com/t/saving-to-a-table-with-computed-fields/135541 "2008-04-23T02:05:55Z")

</div>

Hi i just tried to save a record to a SQL Server that has a computed column and i get this error: DBI::DatabaseError: 37000 (271) \[unixODBC\]\[FreeTDS\]\[SQL Server\]Column ‘DLX\_DTMF’ cannot be modified because it is a com…

---

## [Before\_filter halts chain but won't perform redirect\_to properly](https://www.ruby-forum.com/t/before-filter-halts-chain-but-wont-perform-redirect-to-properly/135487)

<div class="topic-metadata">

**Author:** [@Dion\_H](https://www.ruby-forum.com/u/Dion_H)\
**Replies:** 2\
**Last updated:** [April 23, 2008, 1:48am UTC](https://www.ruby-forum.com/t/before-filter-halts-chain-but-wont-perform-redirect-to-properly/135487 "2008-04-23T01:48:11Z")

</div>

I have implemented a simple admin before filter like the one shown on railscasts.com at #20 Restricting Access - RailsCasts & #21 Super Simple Authentication - RailsCasts but I find that the redirect\_to in my authoriz…

---

## [How to GET/POST in Rails?](https://www.ruby-forum.com/t/how-to-get-post-in-rails/135437)

<div class="topic-metadata">

**Author:** [@arun](https://www.ruby-forum.com/u/arun)\
**Replies:** 8\
**Last updated:** [April 23, 2008, 1:44am UTC](https://www.ruby-forum.com/t/how-to-get-post-in-rails/135437 "2008-04-23T01:44:04Z")

</div>

Is there a definitive guide on how to create a controller that understands and responds to GET/POST methods ? This does not necessarily mean I’m trying RESTful Web services. Google returned lot of material but most of…

---

## [Undefined method \`goals\_against' for #\<YAML::Object:0x5584864\>](https://www.ruby-forum.com/t/undefined-method-goals-against-for-yaml-0x5584864/135029)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 8\
**Last updated:** [April 23, 2008, 1:40am UTC](https://www.ruby-forum.com/t/undefined-method-goals-against-for-yaml-0x5584864/135029 "2008-04-23T01:40:34Z")

</div>

Hi all, I have a serialized object (of class Goals) in my statistics table. I store it in the value row of statitics When I do: goals = Statistic.find(1).value.goals\_against I get undefined method \`goals\_against’ fo…

---

## [Graphing - best approach? (Google Chart API, Flash, RMagick...?)](https://www.ruby-forum.com/t/graphing-best-approach-google-chart-api-flash-rmagick/135535)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [April 23, 2008, 1:23am UTC](https://www.ruby-forum.com/t/graphing-best-approach-google-chart-api-flash-rmagick/135535 "2008-04-23T01:23:01Z")

</div>

Hi, I want to include some graphs in my RoR application. Any recommendation re where I should jump. I’ve already gone through an RMagick installation for other purposes. Want it to be relatively straight forward,…

---

## [How about find(:exactly\_one, ...)?](https://www.ruby-forum.com/t/how-about-find-exactly-one/135192)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 8\
**Last updated:** [April 22, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/how-about-find-exactly-one/135192 "2008-04-22T23:46:45Z")

</div>

All, Is there a safe, one-line way of finding a record that: Must be present Must be unique (according to the conditions) Bootstrapping data (often stored as a constant) often spurs this need, e.g. class Status \< A…

---

## [Hand Cursor disappearing](https://www.ruby-forum.com/t/hand-cursor-disappearing/135537)

<div class="topic-metadata">

**Author:** [@Nik\_B](https://www.ruby-forum.com/u/Nik_B)\
**Replies:** 2\
**Last updated:** [April 22, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/hand-cursor-disappearing/135537 "2008-04-22T23:35:12Z")

</div>

I think I have a rather interesting situation. In one action, an index action mapped as such : map.connect ‘’, :controller =\> ‘storefront’ I have a problem with the hand cursor disappearing. Over any type of link, th…

---

## [How to use link\_to when inside a subdomain](https://www.ruby-forum.com/t/how-to-use-link-to-when-inside-a-subdomain/135508)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 3\
**Last updated:** [April 22, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/how-to-use-link-to-when-inside-a-subdomain/135508 "2008-04-22T22:18:18Z")

</div>

I recently implemented subdomains in my app which is working well. But is there a way to use link\_to that gets you OUT of the subdomain? For example, if a user is at http://foo.mysite.com then link\_to ‘Sign in’, sign…

---

## [Wiki.rubyonrails.com spammed?](https://www.ruby-forum.com/t/wiki-rubyonrails-com-spammed/135526)

<div class="topic-metadata">

**Author:** [@pendexgabo](https://www.ruby-forum.com/u/pendexgabo)\
**Replies:** 1\
**Last updated:** [April 22, 2008, 10:16pm UTC](https://www.ruby-forum.com/t/wiki-rubyonrails-com-spammed/135526 "2008-04-22T22:16:50Z")

</div>

I’ve reading the wiki and found this http://wiki.rubyonrails.com/rails/pages/RealWorldUsage check tooo many links to some store in amazon, I tried to contact some wiki administrator but nobody answered Just I sign up…

---

## [How to show validation error msg of model in html area](https://www.ruby-forum.com/t/how-to-show-validation-error-msg-of-model-in-html-area/135528)

<div class="topic-metadata">

**Author:** [@manish](https://www.ruby-forum.com/u/manish)\
**Replies:** 0\
**Last updated:** [April 22, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/how-to-show-validation-error-msg-of-model-in-html-area/135528 "2008-04-22T21:55:49Z")

</div>

Hi I m new to ROR I have some validation that I’m doing in a model. for example ----\> class Book \< ActiveRecord::Base belongs\_to :subject validates\_presence\_of :title, :message=\>“Error Message” validates\_numericali…

---

## [Testing actions which render nothing](https://www.ruby-forum.com/t/testing-actions-which-render-nothing/135514)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 2\
**Last updated:** [April 22, 2008, 8:58pm UTC](https://www.ruby-forum.com/t/testing-actions-which-render-nothing/135514 "2008-04-22T20:58:45Z")

</div>

Hi all, I’m trying to write a functional test for an action which does not render a template (calls render :nothing =\> true). When I run the test it raises a “Missing Template” error. I’m a bit confused by this as I …

---

## [Automatic reload of plugins](https://www.ruby-forum.com/t/automatic-reload-of-plugins/135477)

<div class="topic-metadata">

**Author:** [@makire](https://www.ruby-forum.com/u/makire)\
**Replies:** 2\
**Last updated:** [April 22, 2008, 8:49pm UTC](https://www.ruby-forum.com/t/automatic-reload-of-plugins/135477 "2008-04-22T20:49:22Z")

</div>

Hi I am developing a plugin and wonder if there is a way to tell Mongrel to reload the vendor directory without restarting. Many thanks in advance /Erik L.

---

## [Syntax error in runner.rb](https://www.ruby-forum.com/t/syntax-error-in-runner-rb/135511)

<div class="topic-metadata">

**Author:** [@ssmile](https://www.ruby-forum.com/u/ssmile)\
**Replies:** 2\
**Last updated:** [April 22, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/syntax-error-in-runner-rb/135511 "2008-04-22T20:25:22Z")

</div>

ruby script/runner ‘load “filename.rb”’\* fails with ./script/…/config/…/vendor/rails/railties/lib/commands/runner.rb:47: (eval):1: compile error (SyntaxError) Rails version is 1.2.0 on Linux Any clues on what could …

---

## [Test Database fails to initialize](https://www.ruby-forum.com/t/test-database-fails-to-initialize/135510)

<div class="topic-metadata">

**Author:** [@capnregex](https://www.ruby-forum.com/u/capnregex)\
**Replies:** 2\
**Last updated:** [April 22, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/test-database-fails-to-initialize/135510 "2008-04-22T20:14:12Z")

</div>

Hi, yes, I’m still using rails 1.2.6, as I haven’t made the time to migrate. when I try to do run tests using rake, it fails to initialize the database correctly… I create the database using migrations, and I wanted …

---

## [Re: unpopulated in\_place\_editor\_field not working \[UPDATED\] Easier, cleaner workaround!](https://www.ruby-forum.com/t/re-unpopulated-in-place-editor-field-not-working-updated-easier-cleaner-workaround/135516)

<div class="topic-metadata">

**Author:** [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Replies:** 0\
**Last updated:** [April 22, 2008, 8:07pm UTC](https://www.ruby-forum.com/t/re-unpopulated-in-place-editor-field-not-working-updated-easier-cleaner-workaround/135516 "2008-04-22T20:07:46Z")

</div>

I’m running Rails 2.2, and have spent waaaay too long unsuccessfully trying to get the suggestion at to work for me. I also considered trying a few other suggestions I found, but they all felt kludgy. Then a CSS l…

---

## [Error after sending email.(conection refused- connect(2))](https://www.ruby-forum.com/t/error-after-sending-email-conection-refused-connect-2/135452)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 2\
**Last updated:** [April 22, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/error-after-sending-email-conection-refused-connect-2/135452 "2008-04-22T19:31:46Z")

</div>

hi all, in my application if the user forget the login details then they can go to a page where they can enter their mail id and the login details’ll be mailed them to that mail id.after mailing them the user’ll …

---

## [Markaby escapes special chars automatically?!](https://www.ruby-forum.com/t/markaby-escapes-special-chars-automatically/135509)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [April 22, 2008, 7:27pm UTC](https://www.ruby-forum.com/t/markaby-escapes-special-chars-automatically/135509 "2008-04-22T19:27:25Z")

</div>

Hi all I’m evaluating Markaby, and stumbled right over the first oddity. When using td link\_to(‘Bla’, :action =\> ‘bla’) Markaby escapes special chars automatically! So instead of Bla on my website, I’m getting \<a h…

---

## [Save checkbox checked or unchecked from previous page](https://www.ruby-forum.com/t/save-checkbox-checked-or-unchecked-from-previous-page/135430)

<div class="topic-metadata">

**Author:** [@rustam](https://www.ruby-forum.com/u/rustam)\
**Replies:** 1\
**Last updated:** [April 22, 2008, 7:21pm UTC](https://www.ruby-forum.com/t/save-checkbox-checked-or-unchecked-from-previous-page/135430 "2008-04-22T19:21:04Z")

</div>

i have checkbox list on my page ,the page devided into several pages by will\_paginate ,i checked the checkboxs on the first page and when i go next page the information on previous page will refreshed . how can i save…

---

## [Drag and Drop Problems](https://www.ruby-forum.com/t/drag-and-drop-problems/135500)

<div class="topic-metadata">

**Author:** [@newrubygirl](https://www.ruby-forum.com/u/newrubygirl)\
**Replies:** 3\
**Last updated:** [April 22, 2008, 7:06pm UTC](https://www.ruby-forum.com/t/drag-and-drop-problems/135500 "2008-04-22T19:06:50Z")

</div>

I’m working with the Drag and Drop Example that appears in AWD and various other places. The problem that I’m having right now is that I can’t grab and drag my objects. I get Javascript errors in Firebug that say Dra…

---

## [Record locking](https://www.ruby-forum.com/t/record-locking/135388)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 13\
**Last updated:** [April 22, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/record-locking/135388 "2008-04-22T18:54:33Z")

</div>

Looking through the api on record locking I’m confused. given the stateless nature of html, it’s entirely possible that someone might click on ‘edit’ and then simply abandon their ‘edit’ functions without ever saving …

---

## [Callback has\_many](https://www.ruby-forum.com/t/callback-has-many/135503)

<div class="topic-metadata">

**Author:** [@julien51](https://www.ruby-forum.com/u/julien51)\
**Replies:** 0\
**Last updated:** [April 22, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/callback-has-many/135503 "2008-04-22T18:49:00Z")

</div>

Hi everyone, I am implementing fragment caching in my application I’ve got the following architecture : A :has\_many Cs :through Bs I’ve got a sweeper that observes B, in which I’ve got 2 methods : after\_create(B) an…

---

## [How to automatically fetch external svn resources on update?](https://www.ruby-forum.com/t/how-to-automatically-fetch-external-svn-resources-on-update/135502)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [April 22, 2008, 6:42pm UTC](https://www.ruby-forum.com/t/how-to-automatically-fetch-external-svn-resources-on-update/135502 "2008-04-22T18:42:57Z")

</div>

Hi all I know this isn’t really a Rails related question, I’m sorry, but it’s just that there’s probably somebody here who knows an answer to my question without me having to explain it too exhaustively. :wink: Well,…

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

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