# Rails

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

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

---

## [RJS - Insert\_html and visual\_effect at the same time](https://www.ruby-forum.com/t/rjs-insert-html-and-visual-effect-at-the-same-time/159065)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 0\
**Last updated:** [January 31, 2009, 2:49am UTC](https://www.ruby-forum.com/t/rjs-insert-html-and-visual-effect-at-the-same-time/159065 "2009-01-31T02:49:14Z")

</div>

Hello, there is any way to add a partial using insert\_html using visual\_effect to do it? (inset\_html and visual\_effect at the same time.) I want to do something like: render :update do |page| page.insert\_html.visua…

---

## [Missing Image RoutingError = TOO SLOW](https://www.ruby-forum.com/t/missing-image-routingerror-too-slow/158805)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [January 31, 2009, 1:27am UTC](https://www.ruby-forum.com/t/missing-image-routingerror-too-slow/158805 "2009-01-31T01:27:29Z")

</div>

My development setup gets its data from our production database, and this production database refers to a bunch of images that aren’t available on my local machine, thus when running development I get a large number o…

---

## [Rails and Singeltons](https://www.ruby-forum.com/t/rails-and-singeltons/159051)

<div class="topic-metadata">

**Author:** [@balla123](https://www.ruby-forum.com/u/balla123)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 10:39pm UTC](https://www.ruby-forum.com/t/rails-and-singeltons/159051 "2009-01-30T22:39:49Z")

</div>

Does it make sense to make a singleton class in Rails? I made a singelton class but everytime I do model.instance.id in some controller it is always different. Is this because it is in development mode so the classes …

---

## [Route Collections and HTTP methods](https://www.ruby-forum.com/t/route-collections-and-http-methods/159046)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/route-collections-and-http-methods/159046 "2009-01-30T22:16:56Z")

</div>

I don’t see a way to create a single URL in a collection and then have routing dispatch to the appropriate method based on the HTTP method. map.resources :packages, :collection=\>{ :search=\>:get } Gets me half way the…

---

## [How to add fields dynamically?](https://www.ruby-forum.com/t/how-to-add-fields-dynamically/158787)

<div class="topic-metadata">

**Author:** [@tetya-loshad](https://www.ruby-forum.com/u/tetya-loshad)\
**Replies:** 7\
**Last updated:** [January 30, 2009, 9:17pm UTC](https://www.ruby-forum.com/t/how-to-add-fields-dynamically/158787 "2009-01-30T21:17:18Z")

</div>

I would like have a simple interface for users to add data into database. How to add new textareas in form, until user want it and submit all of them at once?

---

## [Mongrel cluster identification](https://www.ruby-forum.com/t/mongrel-cluster-identification/159052)

<div class="topic-metadata">

**Author:** [@balla123](https://www.ruby-forum.com/u/balla123)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 8:50pm UTC](https://www.ruby-forum.com/t/mongrel-cluster-identification/159052 "2009-01-30T20:50:05Z")

</div>

I have some singleton class that I want to make sure is only getting instantiated once. I have something like this: class Someclass include Singleton def initialize @something = nil end def something return @some…

---

## [RFC-1734 support?](https://www.ruby-forum.com/t/rfc-1734-support/159047)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/rfc-1734-support/159047 "2009-01-30T20:25:56Z")

</div>

Has anyone found a Ruby library to implement RFC-1734, the POP3 AUTH command? (I cannot be certain tyet, but it seems that POP3 AUTH is also supported as AUTH in IMAP4.) Chilkat seemingly offers a solution, albeit Win…

---

## [How to reference the "public" folder from "app/views/..."](https://www.ruby-forum.com/t/how-to-reference-the-public-folder-from-app-views/159045)

<div class="topic-metadata">

**Author:** [@bloodsample](https://www.ruby-forum.com/u/bloodsample)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/how-to-reference-the-public-folder-from-app-views/159045 "2009-01-30T19:47:15Z")

</div>

Hello, In my application.html.erb layout I have a reference to a .swf (flash movie) file that I want to embed. I put the swf file in the “public/flash” directory (I created the “flash” folder). My question is how do…

---

## [Database table name in array?](https://www.ruby-forum.com/t/database-table-name-in-array/159039)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 7:24pm UTC](https://www.ruby-forum.com/t/database-table-name-in-array/159039 "2009-01-30T19:24:01Z")

</div>

Is it possible to do something like this? tables = Array\[ “Xxx”, “Yyy”, “Zzz”\] for table in tables results = table.find(:all, :conditions =\> \["… end

---

## [Concatenate 2 form fields together](https://www.ruby-forum.com/t/concatenate-2-form-fields-together/158985)

<div class="topic-metadata">

**Author:** [@Sean\_McGilvray](https://www.ruby-forum.com/u/Sean_McGilvray)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/concatenate-2-form-fields-together/158985 "2009-01-30T18:00:57Z")

</div>

I am a newbie at RoR so thank you for your patients. I have a form with the following fields: first\_name last\_name I want to take them and make them into one variable “name” and submit that to my table field named “…

---

## [Making GPS POI](https://www.ruby-forum.com/t/making-gps-poi/158605)

<div class="topic-metadata">

**Author:** [@manchoman](https://www.ruby-forum.com/u/manchoman)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/making-gps-poi/158605 "2009-01-30T17:20:23Z")

</div>

Hi I would like to make dynamic POI files for GPS software such tomtom Have you ever heard about a “ror solution” to do that? thanks jef

---

## [Running an rjs function on page load](https://www.ruby-forum.com/t/running-an-rjs-function-on-page-load/159030)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/running-an-rjs-function-on-page-load/159030 "2009-01-30T16:20:28Z")

</div>

i am currently working on a function that adds markers to a map… without getting into too much detail, the map is initially in a display:none div… so, i had to do a few things to get it to show up correctly… initiall…

---

## [Ruby script/server ERROR](https://www.ruby-forum.com/t/ruby-script-server-error/159005)

<div class="topic-metadata">

**Author:** [@ranamag](https://www.ruby-forum.com/u/ranamag)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/ruby-script-server-error/159005 "2009-01-30T15:40:02Z")

</div>

Hi I have a problem when I use the command ruby script/server in some of applications , the server dose not working to know what I mean please see the attachment! How I deal with a server to see my pages

---

## [Installed gems aren't installed](https://www.ruby-forum.com/t/installed-gems-arent-installed/158946)

<div class="topic-metadata">

**Author:** [@Martijn\_Vos](https://www.ruby-forum.com/u/Martijn_Vos)\
**Replies:** 7\
**Last updated:** [January 30, 2009, 3:38pm UTC](https://www.ruby-forum.com/t/installed-gems-arent-installed/158946 "2009-01-30T15:38:55Z")

</div>

Like the subject says, I’ve got a really weird problem. A co-worker added a couple of gems to our rails project. I installed these gems on my machine (a macbook, os x 10.5.6), start the server, and it says it can’t fi…

---

## [Sorting an array by mutliple fields](https://www.ruby-forum.com/t/sorting-an-array-by-mutliple-fields/158982)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 3\
**Last updated:** [January 30, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/sorting-an-array-by-mutliple-fields/158982 "2009-01-30T14:46:32Z")

</div>

I can do sorting by a single field like the following: @users.sort! { |a,b| a.name.downcase \< =\> b.name.downcase } but what if i want to sort by user.name and then user.rank? what’s the best way to do this? thanks!

---

## [Form\_for with :onsubmit](https://www.ruby-forum.com/t/form-for-with-onsubmit/159017)

<div class="topic-metadata">

**Author:** [@maite](https://www.ruby-forum.com/u/maite)\
**Replies:** 0\
**Last updated:** [January 30, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/form-for-with-onsubmit/159017 "2009-01-30T13:19:15Z")

</div>

hello list I have a problem with form\_for and :onsubmit this is may code \<% javascript\_tag do %\> function valor(){ alert('aqui'); } \<% end %\> \<% form\_for :accion, :url=\>{:controller=\> “accions”, :action=\> “anadir”},…

---

## [Eager loading kills the :select clause in ActiveRecord](https://www.ruby-forum.com/t/eager-loading-kills-the-select-clause-in-activerecord/158975)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 12:59pm UTC](https://www.ruby-forum.com/t/eager-loading-kills-the-select-clause-in-activerecord/158975 "2009-01-30T12:59:01Z")

</div>

hi I’ve dramatically improved my SQL performance with eager loading, but the problem is, it kills the :select directive because it generates its own (it ONLY selects the table fields and eager loaded table fields). …

---

## [Rails.root problem](https://www.ruby-forum.com/t/rails-root-problem/159012)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 12:40pm UTC](https://www.ruby-forum.com/t/rails-root-problem/159012 "2009-01-30T12:40:47Z")

</div>

Hi, I have a form which lets users upload an flv file to the database, this should then be played by the “player.swf” file in the public directory. This worked fine when on the homepage as I just referenced “player.sw…

---

## [Using vs. administer a rails application](https://www.ruby-forum.com/t/using-vs-administer-a-rails-application/158979)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 6\
**Last updated:** [January 30, 2009, 11:39am UTC](https://www.ruby-forum.com/t/using-vs-administer-a-rails-application/158979 "2009-01-30T11:39:41Z")

</div>

Good evening, there’s a question, I can’t really answer for myself. Let’s assume, I’ve got a rails application for selling cars. A user can create an advertisement by choosing the corresponding model from a table “ca…

---

## [How make a link to html file](https://www.ruby-forum.com/t/how-make-a-link-to-html-file/159002)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 11:18am UTC](https://www.ruby-forum.com/t/how-make-a-link-to-html-file/159002 "2009-01-30T11:18:05Z")

</div>

Hi … i want to make link to html file.which i have in my rails application folder. below is my source genearted by html. but when i click the link i get error =\> Firefox doesn’t know how to open this address, becaus…

---

## [How to call UNIX environment variable in rails](https://www.ruby-forum.com/t/how-to-call-unix-environment-variable-in-rails/159003)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 11:02am UTC](https://www.ruby-forum.com/t/how-to-call-unix-environment-variable-in-rails/159003 "2009-01-30T11:02:07Z")

</div>

Dear all How can I call the UNIX environment variable in my rails project? For example echo $HOME /path/to/my/home/dir Thank you very much Valentino

---

## [Rescue ActiveRecord::RecordInvalid](https://www.ruby-forum.com/t/rescue-activerecord-recordinvalid/159006)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 2\
**Last updated:** [January 30, 2009, 10:52am UTC](https://www.ruby-forum.com/t/rescue-activerecord-recordinvalid/159006 "2009-01-30T10:52:47Z")

</div>

Hi all, I am using is\_attachment plugin, but I will always end up with this error: RuntimeError in PostsController#create BLAH which was caused by: version.filename = file\_name\_for\_version(version\_name) begin ver…

---

## [Managing user accounts and data records](https://www.ruby-forum.com/t/managing-user-accounts-and-data-records/158991)

<div class="topic-metadata">

**Author:** [@magic6435](https://www.ruby-forum.com/u/magic6435)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 6:56am UTC](https://www.ruby-forum.com/t/managing-user-accounts-and-data-records/158991 "2009-01-30T06:56:31Z")

</div>

Hi, I am looking for a simple way to implement a form of “data ownership” in a Rails application. Basically, I’d like for users / accounts to only be able to view or operate on model data that they have created them…

---

## [Edge (2.3.0) session\_domain cookies problem](https://www.ruby-forum.com/t/edge-2-3-0-session-domain-cookies-problem/158910)

<div class="topic-metadata">

**Author:** [@LesFreeman](https://www.ruby-forum.com/u/LesFreeman)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 5:41am UTC](https://www.ruby-forum.com/t/edge-2-3-0-session-domain-cookies-problem/158910 "2009-01-30T05:41:42Z")

</div>

Hello, I am working on a project that uses subdomain keyed accounts. Everything works great (using SubdomainFu for much of that heavly lifting) until I get to storing sessions across the subdomains. I want the entire…

---

## [Will\_paginate in multiple resources search](https://www.ruby-forum.com/t/will-paginate-in-multiple-resources-search/158988)

<div class="topic-metadata">

**Author:** [@andre](https://www.ruby-forum.com/u/andre)\
**Replies:** 1\
**Last updated:** [January 30, 2009, 3:48am UTC](https://www.ruby-forum.com/t/will-paginate-in-multiple-resources-search/158988 "2009-01-30T03:48:02Z")

</div>

Hi. I need help :slight\_smile: The thing is that I must write a controller to do a generic search throughout multiple resources available in an application. So the idea was to do this: 1Âº – do all the searches @a =…

---

## [Multiple versions of a site (different languages)](https://www.ruby-forum.com/t/multiple-versions-of-a-site-different-languages/156757)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 5\
**Last updated:** [January 29, 2009, 11:55pm UTC](https://www.ruby-forum.com/t/multiple-versions-of-a-site-different-languages/156757 "2009-01-29T23:55:51Z")

</div>

I’ve got a nice little site running which I rather like. All’s running tickety boo (the site is English language). It has a rudimentary CMS with it, basically I have a page model such that Page.name and Page.body exis…

---

## [Noob RJS Template Trouble](https://www.ruby-forum.com/t/noob-rjs-template-trouble/158957)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 5\
**Last updated:** [January 29, 2009, 11:39pm UTC](https://www.ruby-forum.com/t/noob-rjs-template-trouble/158957 "2009-01-29T23:39:03Z")

</div>

Hello, I am certain this is a simple thing. The crazy thing is that last summer I created my first Rails application with some .rjs templates and that still works. But making a new one recently I have become totally …

---

## [RJS help for setting input value](https://www.ruby-forum.com/t/rjs-help-for-setting-input-value/88613)

<div class="topic-metadata">

**Author:** [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Replies:** 9\
**Last updated:** [January 29, 2009, 10:52pm UTC](https://www.ruby-forum.com/t/rjs-help-for-setting-input-value/88613 "2009-01-29T22:52:17Z")

</div>

I’d like an interface similar to the del.icio.us one for tags, but I’m stuck when trying to add the tag name to an input field. What I’m trying to do is: page.select(‘#tag\_names’).each do |element| if element.value.t…

---

## [Editing users with restful\_authentication](https://www.ruby-forum.com/t/editing-users-with-restful-authentication/158973)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 10:51pm UTC](https://www.ruby-forum.com/t/editing-users-with-restful-authentication/158973 "2009-01-29T22:51:18Z")

</div>

Hi all, I’m using the wonderful restful\_authentication plugin and would like to allow users to update their profiles. The problem is that when the update method is called, it seems to log out the current user (curre…

---

## [Jquery + setting accept header question](https://www.ruby-forum.com/t/jquery-setting-accept-header-question/158972)

<div class="topic-metadata">

**Author:** [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 10:43pm UTC](https://www.ruby-forum.com/t/jquery-setting-accept-header-question/158972 "2009-01-29T22:43:34Z")

</div>

I’ve got a rails app and am using facebox to submit ajax forms. If I submit the form in an inline manner (eg. not facebox) the form works properly and the div gets updated. However, if I submit the form in a facebox, …

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

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