# Rails

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

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

---

## [Association lookup?](https://www.ruby-forum.com/t/association-lookup/129131)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/association-lookup/129131 "2008-02-14T18:44:49Z")

</div>

I feel like this might be a very simple problem and something just isn’t catching my eye in the API. I’m writing a sort of verification form that allows you to add individual fields to verify single attributes from th…

---

## [Mailproblem with restful\_authentication plugin](https://www.ruby-forum.com/t/mailproblem-with-restful-authentication-plugin/129126)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 6:07pm UTC](https://www.ruby-forum.com/t/mailproblem-with-restful-authentication-plugin/129126 "2008-02-14T18:07:45Z")

</div>

I just installed the restful\_authentication plugin and did a generate with :include-activation. Whenever i signup i get the following error: Net::SMTPSyntaxError in UsersController#create 504 : Sender address rejected…

---

## [Quoting using JS in Rails 2](https://www.ruby-forum.com/t/quoting-using-js-in-rails-2/129115)

<div class="topic-metadata">

**Author:** [@Redrum](https://www.ruby-forum.com/u/Redrum)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/quoting-using-js-in-rails-2/129115 "2008-02-14T18:03:36Z")

</div>

Hello all, I’m looking for a good solution to provide “smart quoting” for an app I’m making. The end-user workflow I’m hoping to accomplish is this: User reads entry, ie a blog post or a news article User highlig…

---

## [Routes: Forward slashes in the :id](https://www.ruby-forum.com/t/routes-forward-slashes-in-the-id/129042)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 3\
**Last updated:** [February 14, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/routes-forward-slashes-in-the-id/129042 "2008-02-14T17:59:57Z")

</div>

Hi you all, I have the following resource in my routes.rb query\_pattern = Regexp.new(’(\\w+\[=\]?\\w\*\[/\]?)\*’) map.resources :queries, :path\_prefix =\>’/sdrs’, :name\_prefix=\>‘sdrs\_’, :requirements=\> {:id =\>query\_pattern} T…

---

## [Page not reloading when cache expires?](https://www.ruby-forum.com/t/page-not-reloading-when-cache-expires/129125)

<div class="topic-metadata">

**Author:** [@scottd72](https://www.ruby-forum.com/u/scottd72)\
**Replies:** 0\
**Last updated:** [February 14, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/page-not-reloading-when-cache-expires/129125 "2008-02-14T17:58:55Z")

</div>

I need to force a page reload because of changed data. I expired the page cache and can see in the output that rails is regenerating the page using the new data but the browser isn’t reloading the new page? Scott

---

## [How to write a bloc in helper to check/uncheck box?](https://www.ruby-forum.com/t/how-to-write-a-bloc-in-helper-to-check-uncheck-box/129123)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [February 14, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/how-to-write-a-bloc-in-helper-to-check-uncheck-box/129123 "2008-02-14T17:49:15Z")

</div>

Hi all I have a check box in form, and I would like to enable/disable it according to the value of the check box… \<% form\_for(:query, @query,… \<%= f.check\_box(:all\_categories, :disabled =\> true, :onchange =\>‘javascr…

---

## [Has\_many through question](https://www.ruby-forum.com/t/has-many-through-question/128935)

<div class="topic-metadata">

**Author:** [@daniel304](https://www.ruby-forum.com/u/daniel304)\
**Replies:** 8\
**Last updated:** [February 14, 2008, 5:29pm UTC](https://www.ruby-forum.com/t/has-many-through-question/128935 "2008-02-14T17:29:21Z")

</div>

I have made 3 tables ±-----------+ ±---------------+ ±-----------+ |people | |people\_campaigns| |campaigns | ±-----------+ ±---------------+ ±-----------+ |id :int …

---

## [Google Maps from street address](https://www.ruby-forum.com/t/google-maps-from-street-address/129038)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 6\
**Last updated:** [February 14, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/google-maps-from-street-address/129038 "2008-02-14T17:23:09Z")

</div>

Hi all, I am trying to create an app that when a street address (Street, city, state, zip) is given, a map is displayed along with a point indication where on that map the address is. I have done some quick searches, …

---

## [Detect Production environment in erb?](https://www.ruby-forum.com/t/detect-production-environment-in-erb/129112)

<div class="topic-metadata">

**Author:** [@kevin\_evans](https://www.ruby-forum.com/u/kevin_evans)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/detect-production-environment-in-erb/129112 "2008-02-14T16:14:57Z")

</div>

Need to conditionally modify a layout based on if the app is running in production mode, any best practice on this?

---

## [Popout Calculator for numeric form fields](https://www.ruby-forum.com/t/popout-calculator-for-numeric-form-fields/129119)

<div class="topic-metadata">

**Author:** [@neilw](https://www.ruby-forum.com/u/neilw)\
**Replies:** 0\
**Last updated:** [February 14, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/popout-calculator-for-numeric-form-fields/129119 "2008-02-14T16:08:28Z")

</div>

I’m looking for something similar to Calendar Date Select (http:// Google Code Archive - Long-term storage for Google Code Project Hosting.), but that pops out a simple calculator for numeric form fields allowing you t…

---

## [Acts\_as\_tree: Sorting by full hierarchy](https://www.ruby-forum.com/t/acts-as-tree-sorting-by-full-hierarchy/128686)

<div class="topic-metadata">

**Author:** [@larrytx](https://www.ruby-forum.com/u/larrytx)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/acts-as-tree-sorting-by-full-hierarchy/128686 "2008-02-14T15:50:36Z")

</div>

I’m new to RoR, and I’m having trouble sorting a list of categories using acts\_as\_tree. Specifically, my list produces something like: History \> Modern \> 20th Century History \> United States \> 20th Century Juvenile F…

---

## [Self-referential habtm relationship](https://www.ruby-forum.com/t/self-referential-habtm-relationship/129093)

<div class="topic-metadata">

**Author:** [@dharmarth](https://www.ruby-forum.com/u/dharmarth)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/self-referential-habtm-relationship/129093 "2008-02-14T15:27:09Z")

</div>

I have been working on making a self-referential habtm relationship that uses a join model because I want to store info about the relationship. I have been using Chad F.'s “Rails Recipes” as a guide. So far I have had…

---

## [Config.plugin\_paths \<\< .. in environment/test.rb : ignored in Rails 2.0.2](https://www.ruby-forum.com/t/config-plugin-paths-in-environment-test-rb-ignored-in-rails-2-0-2/129111)

<div class="topic-metadata">

**Author:** [@aravet](https://www.ruby-forum.com/u/aravet)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/config-plugin-paths-in-environment-test-rb-ignored-in-rails-2-0-2/129111 "2008-02-14T15:06:35Z")

</div>

Hi all, I used to move test-only plugins (like mocha, …) to /vendor/plugins-test, and update config.plugin\_paths in environment/test.rb accordingly : file: environment/test.rb … config.plugin\_paths \<\< “#{RAILS\_ROOT…

---

## [Using rails with existing database or adjusting it](https://www.ruby-forum.com/t/using-rails-with-existing-database-or-adjusting-it/129113)

<div class="topic-metadata">

**Author:** [@giulianov](https://www.ruby-forum.com/u/giulianov)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 3:04pm UTC](https://www.ruby-forum.com/t/using-rails-with-existing-database-or-adjusting-it/129113 "2008-02-14T15:04:30Z")

</div>

Hi, I have a php bot that fill a mysql database, and i want to build a web app on top of that with rails. I have te possibility to change the database structure to adhere to the rails convetions (it is still quasi em…

---

## [Hasmanythru? Design Query, Willing to make it worthwhile for](https://www.ruby-forum.com/t/hasmanythru-design-query-willing-to-make-it-worthwhile-for/128994)

<div class="topic-metadata">

**Author:** [@adityasanghi](https://www.ruby-forum.com/u/adityasanghi)\
**Replies:** 3\
**Last updated:** [February 14, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/hasmanythru-design-query-willing-to-make-it-worthwhile-for/128994 "2008-02-14T14:54:07Z")

</div>

Hi Guys, Looking for help on a design issue! Not looking for free help either. So the help i need is around polymorphic associations. I have an app where the customer’s “case” model has to be associated with ONE rate…

---

## [JoinDependency.instantiate & Non-unique association names](https://www.ruby-forum.com/t/joindependency-instantiate-non-unique-association-names/128861)

<div class="topic-metadata">

**Author:** [@tom\_302](https://www.ruby-forum.com/u/tom_302)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/joindependency-instantiate-non-unique-association-names/128861 "2008-02-14T14:45:23Z")

</div>

Hello, I’m instantiating the results of a multi-table, find\_by\_sql query. I start by creating an association graph as an argument to JoinDependency. The instantiation fails if the graph contains any duplicate assoc…

---

## [Find by array of ids in the same order?](https://www.ruby-forum.com/t/find-by-array-of-ids-in-the-same-order/129099)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/find-by-array-of-ids-in-the-same-order/129099 "2008-02-14T14:21:06Z")

</div>

Hi, I am trying to perform: @people = Person.find(10,14,5,1) The RUBY is acting intelligent in fetching the rows, it is sorting my array and fetching the corresponding rows: Essentially I am returned with rows 1,5,1…

---

## ["link\_to" helper: Looking for no encoding in URLs](https://www.ruby-forum.com/t/link-to-helper-looking-for-no-encoding-in-urls/129031)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 12\
**Last updated:** [February 14, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/link-to-helper-looking-for-no-encoding-in-urls/129031 "2008-02-14T14:15:05Z")

</div>

Hi you all, I have a RESTful app where my link\_to is something like \<%= link\_to(“Trial”,sdrs\_query\_path(params\[:id\] + " = " + my\_transf(@value))) %\> When click on the link, the URL that appears is: http://localhost:…

---

## [How to check the live users](https://www.ruby-forum.com/t/how-to-check-the-live-users/129087)

<div class="topic-metadata">

**Author:** [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/how-to-check-the-live-users/129087 "2008-02-14T14:02:09Z")

</div>

Hi All, Since few days I stuck in a question that how to find logged in users of my application. I am using db session store. can any buddy help for this. Thanks a lot in advance. Regards, Pavan

---

## [Validation tutorials](https://www.ruby-forum.com/t/validation-tutorials/129090)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/validation-tutorials/129090 "2008-02-14T13:41:10Z")

</div>

Hi Please suggest some tutorials to get good understanding of validations Sijo

---

## [Time\_select and include\_blank](https://www.ruby-forum.com/t/time-select-and-include-blank/129063)

<div class="topic-metadata">

**Author:** [@Pete\_Bekisz](https://www.ruby-forum.com/u/Pete_Bekisz)\
**Replies:** 3\
**Last updated:** [February 14, 2008, 1:34pm UTC](https://www.ruby-forum.com/t/time-select-and-include-blank/129063 "2008-02-14T13:34:46Z")

</div>

Hi all, I’m having an issue using the time\_select helper with :include\_blank … I keep getting a multipart assignment error. Has anyone else experienced this/know a workaround? Thanks.

---

## [Doing error checking before saving my object to db?](https://www.ruby-forum.com/t/doing-error-checking-before-saving-my-object-to-db/129043)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [February 14, 2008, 12:16pm UTC](https://www.ruby-forum.com/t/doing-error-checking-before-saving-my-object-to-db/129043 "2008-02-14T12:16:50Z")

</div>

Hi, I have two models – order and line\_item (with attributes item\_number and description) where an order has many line\_items. In my order controller, I have this action after a user has submitted his order: def …

---

## [Is there a "maybe\_belongs\_to"?](https://www.ruby-forum.com/t/is-there-a-maybe-belongs-to/129095)

<div class="topic-metadata">

**Author:** [@kopf1988](https://www.ruby-forum.com/u/kopf1988)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 11:29am UTC](https://www.ruby-forum.com/t/is-there-a-maybe-belongs-to/129095 "2008-02-14T11:29:27Z")

</div>

Hi, I’m working on a project to register people for events, and was looking for a little help on it. I’ve got this class “Events”. Basically, there are going to be several big events throughout time, and those events …

---

## [Facing display issue in the HTML view of an iReport in IE](https://www.ruby-forum.com/t/facing-display-issue-in-the-html-view-of-an-ireport-in-ie/129108)

<div class="topic-metadata">

**Author:** [@divyanair](https://www.ruby-forum.com/u/divyanair)\
**Replies:** 0\
**Last updated:** [February 14, 2008, 11:19am UTC](https://www.ruby-forum.com/t/facing-display-issue-in-the-html-view-of-an-ireport-in-ie/129108 "2008-02-14T11:19:44Z")

</div>

I have designed a report using iReport 1.2.0. Some of the controls are not displaying in the HTML view of that report in Internet Explorer. But those are working fine in Firefox. Also, noticed that many properties (sa…

---

## [How do I do this with RJS?](https://www.ruby-forum.com/t/how-do-i-do-this-with-rjs/129028)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [February 14, 2008, 11:09am UTC](https://www.ruby-forum.com/t/how-do-i-do-this-with-rjs/129028 "2008-02-14T11:09:55Z")

</div>

Hi, I have this HTML: Item #1 Item #6 Item #8 Item #2 What I want is to write a JS function that I can call that will go through and replace the text between the SPAN tags with consecutive numbers. …

---

## [ActionMailer with sendmail any help](https://www.ruby-forum.com/t/actionmailer-with-sendmail-any-help/129080)

<div class="topic-metadata">

**Author:** [@KTU](https://www.ruby-forum.com/u/KTU)\
**Replies:** 3\
**Last updated:** [February 14, 2008, 10:31am UTC](https://www.ruby-forum.com/t/actionmailer-with-sendmail-any-help/129080 "2008-02-14T10:31:40Z")

</div>

hi any good examples how to set up email (sendmail especially) with ruby on rails. I have tried several examples from the net but no success. I tried these instructions: http://wiki.rubyonrails.org/rails/pages/HowTo…

---

## [Relative\_url\_root and javascript\_include\_tag](https://www.ruby-forum.com/t/relative-url-root-and-javascript-include-tag/116998)

<div class="topic-metadata">

**Author:** [@rickf](https://www.ruby-forum.com/u/rickf)\
**Replies:** 2\
**Last updated:** [February 14, 2008, 9:10am UTC](https://www.ruby-forum.com/t/relative-url-root-and-javascript-include-tag/116998 "2008-02-14T09:10:44Z")

</div>

Hi. In my environment.rb, I have: ActionController::AbstractRequest.relative\_url\_root = “/foobar” In my layout, I have: \<%= javascript\_include\_tag :defaults %\> Question 1: I am getting an error: ActionController::…

---

## [Iterating through an array of calls to which a login belongs to](https://www.ruby-forum.com/t/iterating-through-an-array-of-calls-to-which-a-login-belongs-to/128996)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 7\
**Last updated:** [February 14, 2008, 8:10am UTC](https://www.ruby-forum.com/t/iterating-through-an-array-of-calls-to-which-a-login-belongs-to/128996 "2008-02-14T08:10:56Z")

</div>

There’s an array of calls in the controller to which this login belongs to. The desired output is the comment attribute for these Call instances. I’m getting an error of: undefined local variable or method \`calls’ w…

---

## [Namespaces and routing](https://www.ruby-forum.com/t/namespaces-and-routing/129094)

<div class="topic-metadata">

**Author:** [@daveamos](https://www.ruby-forum.com/u/daveamos)\
**Replies:** 1\
**Last updated:** [February 14, 2008, 7:50am UTC](https://www.ruby-forum.com/t/namespaces-and-routing/129094 "2008-02-14T07:50:59Z")

</div>

I’m creating a restful (for the most part) website that is read-only from a user perspective, but has an admin section where content is generated. I would like to do something like the following for this admin portion…

---

## [Autotest + integration testing (follow\_redirect!) error](https://www.ruby-forum.com/t/autotest-integration-testing-follow-redirect-error/110332)

<div class="topic-metadata">

**Author:** [@elyod\_72](https://www.ruby-forum.com/u/elyod_72)\
**Replies:** 3\
**Last updated:** [February 14, 2008, 7:23am UTC](https://www.ruby-forum.com/t/autotest-integration-testing-follow-redirect-error/110332 "2008-02-14T07:23:25Z")

</div>

I’ve got an interesting (possibly) problem right now between autotest and rails integration tests. There are a few things to preface this with. Works fine: rake test rake test:integration Blows up: autotest Auto…

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

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