# Rails

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

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

---

## [Require not working in .rhtml file](https://www.ruby-forum.com/t/require-not-working-in-rhtml-file/196823)

<div class="topic-metadata">

**Author:** [@omgitsads](https://www.ruby-forum.com/u/omgitsads)\
**Replies:** 0\
**Last updated:** [October 13, 2008, 5:56am UTC](https://www.ruby-forum.com/t/require-not-working-in-rhtml-file/196823 "2008-10-13T05:56:17Z")

</div>

Hello, I am loading a .rb file from and .rhtml (using an absolute path)and the .rb file loads fine but then it requires another file (using relative path) require ‘sdl’. I am running apache2 and what is especially str…

---

## [Are references and Foreign keys the same thing?](https://www.ruby-forum.com/t/are-references-and-foreign-keys-the-same-thing/150679)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 4\
**Last updated:** [October 13, 2008, 3:46am UTC](https://www.ruby-forum.com/t/are-references-and-foreign-keys-the-same-thing/150679 "2008-10-13T03:46:54Z")

</div>

Hi, I’m getting confused, are references and foreign keys the same thing really? Is there a good example on FKs? I’d like to see how it goes in practice, for example how deleting the parent record would delete any…

---

## [Change link\_to routing http://domain.tdl/static/application](https://www.ruby-forum.com/t/change-link-to-routing-http-domain-tdl-static-application/150758)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 2:08am UTC](https://www.ruby-forum.com/t/change-link-to-routing-http-domain-tdl-static-application/150758 "2008-10-13T02:08:24Z")

</div>

Hi I have a mongrel proxy that listen on that url: http://www.domain.tdl/blaa/main/index. The ‘blaa’ is a static link that activates the proxy. How can I change the rails routing, that every link directs to http://w…

---

## [Rails + Apache2 + Balancer Manager - PHP doesn't work](https://www.ruby-forum.com/t/rails-apache2-balancer-manager-php-doesnt-work/150698)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 5\
**Last updated:** [October 13, 2008, 2:06am UTC](https://www.ruby-forum.com/t/rails-apache2-balancer-manager-php-doesnt-work/150698 "2008-10-13T02:06:04Z")

</div>

Hi I have a Debian Server and I managed that Ruby works with Apache2 and the Balancer Manager that listen to the Mongrel server. The Problem is that PHP files don’t work anymore. How do I have to configurate the Bala…

---

## [Multipart email, how to bypass the bug?](https://www.ruby-forum.com/t/multipart-email-how-to-bypass-the-bug/150756)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 5\
**Last updated:** [October 12, 2008, 11:10pm UTC](https://www.ruby-forum.com/t/multipart-email-how-to-bypass-the-bug/150756 "2008-10-12T23:10:27Z")

</div>

Hi, i’ve to send a mail in the multipart format, but it became a mess because of a 2 years old bug. It change stuff like style=“… to style=3D” so the clients doesn’t render the mail good. I’ve open a bug report at ht…

---

## [Profile importer](https://www.ruby-forum.com/t/profile-importer/150703)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 12, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/profile-importer/150703 "2008-10-12T20:34:55Z")

</div>

Hi, I am working on the social networking application in Rails where I have to give option to the user using which he can import his profile from LinkedIn. I have no idea how to do this. Is there any gem avaliable wh…

---

## [Newbie help](https://www.ruby-forum.com/t/newbie-help/150752)

<div class="topic-metadata">

**Author:** [@mex23](https://www.ruby-forum.com/u/mex23)\
**Replies:** 3\
**Last updated:** [October 12, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/newbie-help/150752 "2008-10-12T19:32:05Z")

</div>

Hi, I have a view, where I need to display some text and then after 5 seconds, redirect to an action automatically (sending one parameter too). Googling I’ve found only solutions for PHP and others, nothing for Ruby …

---

## [Calling form\_remote\_tag in a helper](https://www.ruby-forum.com/t/calling-form-remote-tag-in-a-helper/150686)

<div class="topic-metadata">

**Author:** [@Garrett\_B](https://www.ruby-forum.com/u/Garrett_B)\
**Replies:** 3\
**Last updated:** [October 12, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/calling-form-remote-tag-in-a-helper/150686 "2008-10-12T19:23:16Z")

</div>

Apparently inside a helper form\_remote\_tag cannot take a block because \_erbout is out of scope. As of a year ago the accepted way to handle this was to call form\_remote\_tag without a block, like this; form\_remote\_tag…

---

## [Single Rails App - Several Subdomains](https://www.ruby-forum.com/t/single-rails-app-several-subdomains/150755)

<div class="topic-metadata">

**Author:** [@gamehack](https://www.ruby-forum.com/u/gamehack)\
**Replies:** 3\
**Last updated:** [October 12, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/single-rails-app-several-subdomains/150755 "2008-10-12T19:15:37Z")

</div>

Hi all, I am in a situation that I have no idea how to approach. Basically, I’ve got a licensing app that is distributed across several domains, as in: admin.example.com licenses.example.com secure.example.com pay…

---

## [How to test with RSpec a Rails plugin using â€œlink\_toâ€ and â€œcurrent\_page?â€](https://www.ruby-forum.com/t/how-to-test-with-rspec-a-rails-plugin-using-a-oelink-toa-and-a-oecurrent-page-a/150746)

<div class="topic-metadata">

**Author:** [@clauer](https://www.ruby-forum.com/u/clauer)\
**Replies:** 0\
**Last updated:** [October 12, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/how-to-test-with-rspec-a-rails-plugin-using-a-oelink-toa-and-a-oecurrent-page-a/150746 "2008-10-12T15:29:56Z")

</div>

I’m writing a Rails plugin that builds up a menu in a view. I’m using link\_to to build the link and current\_page? to set class=“active” on the current page. I’ve included ActionView::Helpers::UrlHelper so I can use l…

---

## [ActiveScaffold :form\_ui select](https://www.ruby-forum.com/t/activescaffold-form-ui-select/147817)

<div class="topic-metadata">

**Author:** [@datakix](https://www.ruby-forum.com/u/datakix)\
**Replies:** 1\
**Last updated:** [October 12, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/activescaffold-form-ui-select/147817 "2008-10-12T14:07:08Z")

</div>

If I have two :form\_ui select boxes, how can I make the first select box reload the values in the second? For example, —\> \[Car Maker\] -------\> \[Car Model\] When I change a value in the ‘Car Maker’ select box, I want t…

---

## [Session question](https://www.ruby-forum.com/t/session-question/150599)

<div class="topic-metadata">

**Author:** [@jicksta](https://www.ruby-forum.com/u/jicksta)\
**Replies:** 15\
**Last updated:** [October 12, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/session-question/150599 "2008-10-12T13:53:49Z")

</div>

Hi, I’m reading Agile Web D. with Rails 2nd Edition. Here, to save items a customer has selected, it has used session and a “Cart” class which is a model but doesn’t have ‘carts’ table in the database. In the class it…

---

## [How to build search form dynamically](https://www.ruby-forum.com/t/how-to-build-search-form-dynamically/150743)

<div class="topic-metadata">

**Author:** [@ror.man83](https://www.ruby-forum.com/u/ror.man83)\
**Replies:** 0\
**Last updated:** [October 12, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/how-to-build-search-form-dynamically/150743 "2008-10-12T13:30:53Z")

</div>

Hi all, I want to search events based on its name, location, start date, end date and … if i am using sql, i can do this sql= “select \* from events where 1=1” if params\[:name\] sql +=" name = #{params\[:name\]} if pa…

---

## [Utf-8 encoding in URL params](https://www.ruby-forum.com/t/utf-8-encoding-in-url-params/150737)

<div class="topic-metadata">

**Author:** [@ssyangy](https://www.ruby-forum.com/u/ssyangy)\
**Replies:** 0\
**Last updated:** [October 12, 2008, 8:54am UTC](https://www.ruby-forum.com/t/utf-8-encoding-in-url-params/150737 "2008-10-12T08:54:41Z")

</div>

Hi, I’m accessing a web service API. This API is somehow like convert input string to a graph. this API has a text params. In the specification, this params should be UTF-8 encoded. what shall I do to ensure of this…

---

## [Check for valid email address](https://www.ruby-forum.com/t/check-for-valid-email-address/150709)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [October 12, 2008, 5:44am UTC](https://www.ruby-forum.com/t/check-for-valid-email-address/150709 "2008-10-12T05:44:46Z")

</div>

Hi, I have one small question. I want to check for existence of email address. Means if user types “removed\_email\_address@domain.invalid”, my model should throw an error to the user saying “email doesn’t exist please …

---

## [Hpricot problem](https://www.ruby-forum.com/t/hpricot-problem/150691)

<div class="topic-metadata">

**Author:** [@jef](https://www.ruby-forum.com/u/jef)\
**Replies:** 1\
**Last updated:** [October 12, 2008, 5:19am UTC](https://www.ruby-forum.com/t/hpricot-problem/150691 "2008-10-12T05:19:16Z")

</div>

Hi, I would like to know how to retrieve the value of an attribute. For example (doc/".nom/a") will return an array of elements. I would like to know the value of the href attribut of each element. thanks for your h…

---

## [Re: where do I copy my RoR application](https://www.ruby-forum.com/t/re-where-do-i-copy-my-ror-application/150727)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 12, 2008, 3:57am UTC](https://www.ruby-forum.com/t/re-where-do-i-copy-my-ror-application/150727 "2008-10-12T03:57:49Z")

</div>

Depends:) what you want to use? It’s your own server or a shared server? You try to put in google this keywords: ruby on rails deploy ? R u? Sent from my Nokia phone

---

## [Advice: should this New Media Art project use Ruby?](https://www.ruby-forum.com/t/advice-should-this-new-media-art-project-use-ruby/150722)

<div class="topic-metadata">

**Author:** [@Zanchyn](https://www.ruby-forum.com/u/Zanchyn)\
**Replies:** 0\
**Last updated:** [October 12, 2008, 2:43am UTC](https://www.ruby-forum.com/t/advice-should-this-new-media-art-project-use-ruby/150722 "2008-10-12T02:43:30Z")

</div>

We are a New Media Art collective. We all have different backgrounds (neuropsych, artists…) and work on a new media art. We want to blend IT, academics and art. By e.g. coding an app/webpage where we use neuropsych to…

---

## [Too many marshall dump/load calls?](https://www.ruby-forum.com/t/too-many-marshall-dump-load-calls/150668)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [October 12, 2008, 2:09am UTC](https://www.ruby-forum.com/t/too-many-marshall-dump-load-calls/150668 "2008-10-12T02:09:36Z")

</div>

Hi all, I have a model that is populated from XML using REXML. As many have written, REXML seems to add singleton methods incompatible with normal Marshalling as used with file/db session stores. So, I wrote my own …

---

## [Huge performance issue with ActiveRecord::Base exists?](https://www.ruby-forum.com/t/huge-performance-issue-with-activerecord-base-exists/150720)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 3\
**Last updated:** [October 12, 2008, 1:28am UTC](https://www.ruby-forum.com/t/huge-performance-issue-with-activerecord-base-exists/150720 "2008-10-12T01:28:13Z")

</div>

I was just running a relative simple exists? query: Page.exists?(\[“id \> ?”,i\]) which equates to SELECT COUNT(\*) FROM pages WHERE (id \> 1400000) LIMIT 1 You would think with a COUNT and a LIMIT 1, that things wou…

---

## [How to highlight or get the child div id?](https://www.ruby-forum.com/t/how-to-highlight-or-get-the-child-div-id/150717)

<div class="topic-metadata">

**Author:** [@Innovia](https://www.ruby-forum.com/u/Innovia)\
**Replies:** 1\
**Last updated:** [October 12, 2008, 1:27am UTC](https://www.ruby-forum.com/t/how-to-highlight-or-get-the-child-div-id/150717 "2008-10-12T01:27:31Z")

</div>

Hi I am trying to highlight the child div of attendees\_box which is the attendee\_id so far this is my code page.replace\_html "attendees\_box\_#{@event.id}", :partial =\> "attendees", :collection =\> @event.members page.…

---

## [Convention for checking rails environment](https://www.ruby-forum.com/t/convention-for-checking-rails-environment/150716)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 1\
**Last updated:** [October 12, 2008, 12:43am UTC](https://www.ruby-forum.com/t/convention-for-checking-rails-environment/150716 "2008-10-12T00:43:04Z")

</div>

Whats the general practice for checking rails environment. I often find myself having to do: RAILS\_ENV==“development”. As of recently, I’ve been starting to see more of Rails.env==“production”. Im thinking, we may as…

---

## [Cant get to child div id for highlight effect](https://www.ruby-forum.com/t/cant-get-to-child-div-id-for-highlight-effect/150721)

<div class="topic-metadata">

**Author:** [@ami](https://www.ruby-forum.com/u/ami)\
**Replies:** 0\
**Last updated:** [October 12, 2008, 12:40am UTC](https://www.ruby-forum.com/t/cant-get-to-child-div-id-for-highlight-effect/150721 "2008-10-12T00:40:44Z")

</div>

how can i get to the child div id page.visual\_effect(:highlight, “attendees\_box\_#{@event.id} \[attendee\_id\_#{@member.id}\]”) this doesnt work

---

## [How to go back to the Home page](https://www.ruby-forum.com/t/how-to-go-back-to-the-home-page/150685)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 3\
**Last updated:** [October 12, 2008, 12:37am UTC](https://www.ruby-forum.com/t/how-to-go-back-to-the-home-page/150685 "2008-10-12T00:37:48Z")

</div>

Hi all My home page is called index.hml and it is located under the Public folder. When I am creating a new record in a controller I type: http://mysite/mycontroler/new when this page opens if I click in the menu Ho…

---

## [ActionController::MethodNotAllowed: Only get, put, and delete requests are allowed](https://www.ruby-forum.com/t/actioncontroller-only-get-put-and-delete-requests-are-allowed/150699)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 2\
**Last updated:** [October 12, 2008, 12:29am UTC](https://www.ruby-forum.com/t/actioncontroller-only-get-put-and-delete-requests-are-allowed/150699 "2008-10-12T00:29:02Z")

</div>

Hi all, I’d need some help with a Subject already appeared here, anyway I “re- post” with same title cause reading the old threads didn’t help me. I get a tipical restful routes mismatching : ActionContr…

---

## [Model.create?](https://www.ruby-forum.com/t/model-create/150704)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [October 11, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/model-create/150704 "2008-10-11T22:18:35Z")

</div>

I have two models (Transaction and RentedItem). Transaction.rb has\_many :rented\_items has\_many :inventories, :through =\> :rented\_items def add(inventory\_id) items = rented\_items.find\_all\_by\_inventory\_id(inventory\_id…

---

## [Trying not to duplicate actions for ajax](https://www.ruby-forum.com/t/trying-not-to-duplicate-actions-for-ajax/150711)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 1\
**Last updated:** [October 11, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/trying-not-to-duplicate-actions-for-ajax/150711 "2008-10-11T21:34:33Z")

</div>

I’ve got a controller which displays a list of documents in the index action. There are action links for each document, ‘view’ and ‘edit’ are normal links that go to the pages, but ‘delete’ and ‘publish’ are ajax link…

---

## [Graph view](https://www.ruby-forum.com/t/graph-view/150700)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 11, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/graph-view/150700 "2008-10-11T21:19:19Z")

</div>

Hi, I am working on the social networking application where I have to show all my connections in graph view uptoi some k levels of graph. I am almost done with the back end code and I am struggling to display the con…

---

## [Thinking\_sphinx set weighting](https://www.ruby-forum.com/t/thinking-sphinx-set-weighting/150708)

<div class="topic-metadata">

**Author:** [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Replies:** 0\
**Last updated:** [October 11, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/thinking-sphinx-set-weighting/150708 "2008-10-11T21:09:58Z")

</div>

Hello, I’m using Sphinx search engine with thinking\_sphinx Ruby on Rails plugin to interface with it. I use it as follows: @topics = Topic.search(@search\_phrase, :sphinx =\> {:limit =\> $SEARCH\_TOPICS\_PAGE\_COUNT, :page…

---

## [Any ruby script to import contacts](https://www.ruby-forum.com/t/any-ruby-script-to-import-contacts/150678)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 11, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/any-ruby-script-to-import-contacts/150678 "2008-10-11T19:57:18Z")

</div>

Hi, I am working on the website where I need to get the import contacts functionality from GMail, yahoo and Orkut. If any body knows about this please let me know. I am totally on hold because of this?? Thanks, Ramu…

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

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