# Rails

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

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

---

## [Get pid of memcached instance my app is connected to?](https://www.ruby-forum.com/t/get-pid-of-memcached-instance-my-app-is-connected-to/191918)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [July 21, 2010, 10:27am UTC](https://www.ruby-forum.com/t/get-pid-of-memcached-instance-my-app-is-connected-to/191918 "2010-07-21T10:27:53Z")

</div>

Hi all. I’m using memcache-client to connect to memcached in my rails app. I’m having some weirdness on my production server and have several memcached instances running. Is there a way to get the pid of the one th…

---

## [Saving XMLSchema datetime into sqlite/mysql](https://www.ruby-forum.com/t/saving-xmlschema-datetime-into-sqlite-mysql/191931)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 5\
**Last updated:** [July 21, 2010, 9:05am UTC](https://www.ruby-forum.com/t/saving-xmlschema-datetime-into-sqlite-mysql/191931 "2010-07-21T09:05:21Z")

</div>

Hello everyone, I’ve been struggling with something that is probably very simple. I need to save an entry from an atom feed that has a datetime string like this: 2010-07-20T11:49:19.000Z which is an XMLSchema date t…

---

## [Is it safe to allow mass assignment of associations?](https://www.ruby-forum.com/t/is-it-safe-to-allow-mass-assignment-of-associations/191947)

<div class="topic-metadata">

**Author:** [@orotone](https://www.ruby-forum.com/u/orotone)\
**Replies:** 0\
**Last updated:** [July 21, 2010, 7:35am UTC](https://www.ruby-forum.com/t/is-it-safe-to-allow-mass-assignment-of-associations/191947 "2010-07-21T07:35:12Z")

</div>

Item belongs\_to :user attr\_accessible :user is this safe? Item.user\_id is still protected, and Item.user can’t be set by mass assignment from a web request because the parameters are all strings - trying to assign a …

---

## [Combining 2 hash fields in a single database field](https://www.ruby-forum.com/t/combining-2-hash-fields-in-a-single-database-field/191923)

<div class="topic-metadata">

**Author:** [@sachin](https://www.ruby-forum.com/u/sachin)\
**Replies:** 2\
**Last updated:** [July 21, 2010, 7:11am UTC](https://www.ruby-forum.com/t/combining-2-hash-fields-in-a-single-database-field/191923 "2010-07-21T07:11:47Z")

</div>

Hello Gurus, I have a form which has a phone\_no field. I want to provide 3 text fields to user to split and enter the phone number in country\_code, state\_code and the number which will be contacted and entered in to …

---

## [Integrating Google Charts into a Prawn PDF(please helpme)](https://www.ruby-forum.com/t/integrating-google-charts-into-a-prawn-pdf-please-helpme/191946)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 0\
**Last updated:** [July 21, 2010, 6:51am UTC](https://www.ruby-forum.com/t/integrating-google-charts-into-a-prawn-pdf-please-helpme/191946 "2010-07-21T06:51:39Z")

</div>

i just created an application to show the user details and a pie chart in one page, also i provided an link on clicking that will display the result in a pdf file, i am able to get the result in pdf exce…

---

## [Number\_to\_human\_size](https://www.ruby-forum.com/t/number-to-human-size/191945)

<div class="topic-metadata">

**Author:** [@trejkaz](https://www.ruby-forum.com/u/trejkaz)\
**Replies:** 0\
**Last updated:** [July 21, 2010, 5:48am UTC](https://www.ruby-forum.com/t/number-to-human-size/191945 "2010-07-21T05:48:41Z")

</div>

Hi all. I have noticed some questionable behaviour when converting byte sizes into a human-readable form. $ruby script\\console Loading development environment (Rails 2.3.8) \>\> include ActionView::Helpers::NumberHelper…

---

## [How to update user model attributes and bypass a presence\_of validation?](https://www.ruby-forum.com/t/how-to-update-user-model-attributes-and-bypass-a-presence-of-validation/191862)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 4\
**Last updated:** [July 21, 2010, 3:02am UTC](https://www.ruby-forum.com/t/how-to-update-user-model-attributes-and-bypass-a-presence-of-validation/191862 "2010-07-21T03:02:51Z")

</div>

Hello, I have a user model which stores a users name, email, and password. I have a separate profile controller which lets the user edit his name, email, and password from the user model. I want the user to be able t…

---

## [Limit Ring server to localhost only. RingFinger.new('localhost') apparently doesn't work](https://www.ruby-forum.com/t/limit-ring-server-to-localhost-only-ringfinger-new-localhost-apparently-doesnt-work/191026)

<div class="topic-metadata">

**Author:** [@patrick\_nicholas](https://www.ruby-forum.com/u/patrick_nicholas)\
**Replies:** 2\
**Last updated:** [July 21, 2010, 12:27am UTC](https://www.ruby-forum.com/t/limit-ring-server-to-localhost-only-ringfinger-new-localhost-apparently-doesnt-work/191026 "2010-07-21T00:27:18Z")

</div>

Am using RingyDingy. Have altered call to Rinda::RingFinger.new to Rinda::RingFinger.new(‘localhost’) in ring\_server.rb and in ringy\_dingy.rb, but still get, intermittently, attachments to like named services on my…

---

## [Installing ruby on rails](https://www.ruby-forum.com/t/installing-ruby-on-rails/191928)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [July 21, 2010, 12:23am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails/191928 "2010-07-21T00:23:47Z")

</div>

i am trying to install ruby on rails. is ruby gems the best way to go before installing rails since it is a package manager or do I need to install ruby 1.8.7?

---

## [Sending parameters from controller to view](https://www.ruby-forum.com/t/sending-parameters-from-controller-to-view/191930)

<div class="topic-metadata">

**Author:** [@johann](https://www.ruby-forum.com/u/johann)\
**Replies:** 6\
**Last updated:** [July 20, 2010, 10:19pm UTC](https://www.ruby-forum.com/t/sending-parameters-from-controller-to-view/191930 "2010-07-20T22:19:06Z")

</div>

Hi all, I want to create charts in my website. I want to fill them with variables. So in my controller, I put the variables I want to use : class ChartsController \< ApplicationController def show\_one\_publisher\_seven\_…

---

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

<div class="topic-metadata">

**Author:** [@tornado](https://www.ruby-forum.com/u/tornado)\
**Replies:** 2\
**Last updated:** [July 20, 2010, 10:00pm UTC](https://www.ruby-forum.com/t/model-associations/191929 "2010-07-20T22:00:56Z")

</div>

Hi, I have just started using rails and i am trying to use IP database to get user location. Here are the database schemas… \[code\]CREATE TABLE IF NOT EXISTS ip\_group\_cities ( ip\_start bigint(20) NOT NULL, location …

---

## [Linking a .swf file in a rails document](https://www.ruby-forum.com/t/linking-a-swf-file-in-a-rails-document/54171)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 8\
**Last updated:** [July 20, 2010, 9:09pm UTC](https://www.ruby-forum.com/t/linking-a-swf-file-in-a-rails-document/54171 "2010-07-20T21:09:59Z")

</div>

Hi, I have a little .swf movie I’d like to have in my page. Is there a rails way of linking it? Thanks, Peter

---

## [Named\_scope returns Array -- find returns error?](https://www.ruby-forum.com/t/named-scope-returns-array-find-returns-error/191867)

<div class="topic-metadata">

**Author:** [@sethwillits](https://www.ruby-forum.com/u/sethwillits)\
**Replies:** 2\
**Last updated:** [July 20, 2010, 7:55pm UTC](https://www.ruby-forum.com/t/named-scope-returns-array-find-returns-error/191867 "2010-07-20T19:55:44Z")

</div>

From the documentation: class Shirt \< ActiveRecord::Base named\_scope :red, :conditions =\> {:color =\> ‘red’} end Unlike Shirt.find(…), however, the object returned by Shirt.red is not an Array; it resembles the asso…

---

## [Ajax to download a file](https://www.ruby-forum.com/t/ajax-to-download-a-file/191921)

<div class="topic-metadata">

**Author:** [@flamingsole](https://www.ruby-forum.com/u/flamingsole)\
**Replies:** 2\
**Last updated:** [July 20, 2010, 7:32pm UTC](https://www.ruby-forum.com/t/ajax-to-download-a-file/191921 "2010-07-20T19:32:54Z")

</div>

Hi I would like to download a file in an asynchronous manner. From what I have read, I should be using a hidden iframe. How do I connect the AJAX request to the iframe to display the file? Thanks

---

## [Possible?](https://www.ruby-forum.com/t/possible/191917)

<div class="topic-metadata">

**Author:** [@dries](https://www.ruby-forum.com/u/dries)\
**Replies:** 3\
**Last updated:** [July 20, 2010, 6:20pm UTC](https://www.ruby-forum.com/t/possible/191917 "2010-07-20T18:20:13Z")

</div>

Somebody who think it’s possible?

---

## [Sortable\_element - multiple ajax events](https://www.ruby-forum.com/t/sortable-element-multiple-ajax-events/191839)

<div class="topic-metadata">

**Author:** [@ben](https://www.ruby-forum.com/u/ben)\
**Replies:** 1\
**Last updated:** [July 20, 2010, 6:14pm UTC](https://www.ruby-forum.com/t/sortable-element-multiple-ajax-events/191839 "2010-07-20T18:14:57Z")

</div>

So I’m using sortable\_element to order a list. The problem I’m having is that if I move two items in the list very quickly, I lose the second move update because the backend doesn’t deal with the requests in sequence.…

---

## [Where to find Rails3 status updates?](https://www.ruby-forum.com/t/where-to-find-rails3-status-updates/191920)

<div class="topic-metadata">

**Author:** [@dee](https://www.ruby-forum.com/u/dee)\
**Replies:** 1\
**Last updated:** [July 20, 2010, 6:10pm UTC](https://www.ruby-forum.com/t/where-to-find-rails3-status-updates/191920 "2010-07-20T18:10:16Z")

</div>

I already watch Riding Rails (http://weblog.rubyonrails.org/) feed plus RoR:Talk and RoR:Core on Google G… Riding Rails is higher level than I want and hasn’t been updated in more than a month. I’d like to get a feel …

---

## [Looking for an iPhone + RoR developer](https://www.ruby-forum.com/t/looking-for-an-iphone-ror-developer/191919)

<div class="topic-metadata">

**Author:** [@radamanthus](https://www.ruby-forum.com/u/radamanthus)\
**Replies:** 0\
**Last updated:** [July 20, 2010, 5:55pm UTC](https://www.ruby-forum.com/t/looking-for-an-iphone-ror-developer/191919 "2010-07-20T17:55:02Z")

</div>

Hi folks, I’m posting this for a friend. The company will be building iPhone apps that talk to an RoR backend. Work will be home-based, San Francisco time. rad Iphone App Developer for a Telephony Startup Firm We …

---

## [Sudo rake gems:install](https://www.ruby-forum.com/t/sudo-rake-gems-install/191874)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 3\
**Last updated:** [July 20, 2010, 5:18pm UTC](https://www.ruby-forum.com/t/sudo-rake-gems-install/191874 "2010-07-20T17:18:32Z")

</div>

I have upgraded to Rails3beta4 from Rails 2.3.8. I used to run the following command for ensuring that gems are installed: sudo rake gems:install But, now, I get the following when running this command on the Ra…

---

## [MySQL index question](https://www.ruby-forum.com/t/mysql-index-question/191913)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 4\
**Last updated:** [July 20, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/mysql-index-question/191913 "2010-07-20T17:17:33Z")

</div>

I am trying to speed up some DB operations and perhaps have gone overboard with indexes. Does MySQL usually use only one index per query and simply match keys on the results of the indexed first part? For example: …

---

## [Do I need to seperate admin and user area phsically in my file structure?](https://www.ruby-forum.com/t/do-i-need-to-seperate-admin-and-user-area-phsically-in-my-file-structure/191910)

<div class="topic-metadata">

**Author:** [@mac](https://www.ruby-forum.com/u/mac)\
**Replies:** 1\
**Last updated:** [July 20, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/do-i-need-to-seperate-admin-and-user-area-phsically-in-my-file-structure/191910 "2010-07-20T16:39:06Z")

</div>

hii guys!! m new to rails. I am about to create a simple CMS application . Do i need to put my files in seperate folders ?? If doing so how to follow rails convention. I am using scaffold to create my admin end . do I …

---

## [Model Validations + Urgent](https://www.ruby-forum.com/t/model-validations-urgent/191890)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 9\
**Last updated:** [July 20, 2010, 4:05pm UTC](https://www.ruby-forum.com/t/model-validations-urgent/191890 "2010-07-20T16:05:31Z")

</div>

Hello all, How to give validation on a field which is not a database column. I mean i am having a file field(upload\_resume) in my views. So i want to give validation on it that size should be less then 1mb. I tried s…

---

## [Creating reflective has\_and\_belongs\_to](https://www.ruby-forum.com/t/creating-reflective-has-and-belongs-to/191909)

<div class="topic-metadata">

**Author:** [@Piotr\_Jacek\_Puczyns](https://www.ruby-forum.com/u/Piotr_Jacek_Puczyns)\
**Replies:** 0\
**Last updated:** [July 20, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/creating-reflective-has-and-belongs-to/191909 "2010-07-20T15:53:48Z")

</div>

Hi I have a question is it possible to create the reflective relation with users and friends using has\_and\_belongs\_to. I found this post that is partly connected to my: http://groups.google.com/group/rubyonrails-talk/…

---

## [User available query builder + backend](https://www.ruby-forum.com/t/user-available-query-builder-backend/191908)

<div class="topic-metadata">

**Author:** [@edoardoz](https://www.ruby-forum.com/u/edoardoz)\
**Replies:** 0\
**Last updated:** [July 20, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/user-available-query-builder-backend/191908 "2010-07-20T15:53:12Z")

</div>

Hi, I look for a plugin/gem/else for a GUI+backend hooks solution to filter contents in a RoR app. Example: Customer(:id, :name, :vat\_number, :state) Address(:id, :customer\_id, :state, :city, :street, :phone) User …

---

## [Render :update do |page| issue](https://www.ruby-forum.com/t/render-update-do-page-issue/191858)

<div class="topic-metadata">

**Author:** [@mamadoutoure](https://www.ruby-forum.com/u/mamadoutoure)\
**Replies:** 1\
**Last updated:** [July 20, 2010, 3:28pm UTC](https://www.ruby-forum.com/t/render-update-do-page-issue/191858 "2010-07-20T15:28:36Z")

</div>

Hi Folks, I’m trying to render a partial from my controller, but nothing happens. What’s wrong ??? Heres are my controller, views, and partials 1 - Controller : def generer render :update do |page| page.r…

---

## [Tests Losing Data (factory girl)](https://www.ruby-forum.com/t/tests-losing-data-factory-girl/191891)

<div class="topic-metadata">

**Author:** [@Ants\_P](https://www.ruby-forum.com/u/Ants_P)\
**Replies:** 3\
**Last updated:** [July 20, 2010, 3:15pm UTC](https://www.ruby-forum.com/t/tests-losing-data-factory-girl/191891 "2010-07-20T15:15:44Z")

</div>

This is a cross post from the fg mailing list but the traffic is very low there so I thought I’d try here, too. While running a test with Cukes/FG, I pre populate a table (event\_categories), run my test and it passes…

---

## [Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)](https://www.ruby-forum.com/t/encoding-problems-with-rails-3-ruby-1-9-1-big-surprise/190970)

<div class="topic-metadata">

**Author:** [@cult\_hero](https://www.ruby-forum.com/u/cult_hero)\
**Replies:** 25\
**Last updated:** [July 20, 2010, 3:14pm UTC](https://www.ruby-forum.com/t/encoding-problems-with-rails-3-ruby-1-9-1-big-surprise/190970 "2010-07-20T15:14:31Z")

</div>

I have kind of an interesting problem. I have a form wherein people enter information. Big surprise. If they enter any “weird” characters like ø or é or whatever, the form will submit and all is well. However, I have …

---

## [Nested Models not working](https://www.ruby-forum.com/t/nested-models-not-working/191899)

<div class="topic-metadata">

**Author:** [@IanJ](https://www.ruby-forum.com/u/IanJ)\
**Replies:** 2\
**Last updated:** [July 20, 2010, 2:59pm UTC](https://www.ruby-forum.com/t/nested-models-not-working/191899 "2010-07-20T14:59:19Z")

</div>

Urgghhh - Newbie help needed to stop me giving up on Rails. I have 3 nested models. Recipe-\>RecipeParts-\>RecipeIngredients (to the ingredients index so maybe 4 levels) class Recipe \< ActiveRecord::Base has\_many :rec…

---

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

<div class="topic-metadata">

**Author:** [@leo72](https://www.ruby-forum.com/u/leo72)\
**Replies:** 3\
**Last updated:** [July 20, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/associations-problem/191861 "2010-07-20T14:45:16Z")

</div>

Hi guys, I’m having a strange error in one of my model relationships and it’s driving me crazy I have: class Target \< ActiveRecord::Base has\_many :sections end class Section \< ActiveRecord::Base belongs\_to :targe…

---

## [Integrating Google Charts into a Prawn PDF](https://www.ruby-forum.com/t/integrating-google-charts-into-a-prawn-pdf/191898)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 0\
**Last updated:** [July 20, 2010, 1:34pm UTC](https://www.ruby-forum.com/t/integrating-google-charts-into-a-prawn-pdf/191898 "2010-07-20T13:34:14Z")

</div>

i just created an application to show the user details and a pie chart in one page, also i provided an link on clicking that will display the result in a pdf file, i am able to get the result in pdf exce…

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

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