# Rails

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

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

---

## [Server side Validation](https://www.ruby-forum.com/t/server-side-validation/125621)

<div class="topic-metadata">

**Author:** [@atulxxx](https://www.ruby-forum.com/u/atulxxx)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 6:53pm UTC](https://www.ruby-forum.com/t/server-side-validation/125621 "2008-01-10T18:53:48Z")

</div>

Hi, Does RoR provide logical validation on the server side ? Eg checking whether the amount in a particular field is the correct sum or product of some other fields or if the value between 2 fields have some relation…

---

## [Environment.rb ruby path issue](https://www.ruby-forum.com/t/environment-rb-ruby-path-issue/125525)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [January 10, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/environment-rb-ruby-path-issue/125525 "2008-01-10T18:48:33Z")

</div>

I’m attempting to add a path to my rails app by adding the line : config.load\_paths += %W( #{RAILS\_ROOT}/new\_path ) to my config/environments/development.rb file. For some reason rails doesn’t seem to be picking up th…

---

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

<div class="topic-metadata">

**Author:** [@carlox](https://www.ruby-forum.com/u/carlox)\
**Replies:** 2\
**Last updated:** [January 10, 2008, 6:22pm UTC](https://www.ruby-forum.com/t/model-problem/125584 "2008-01-10T18:22:11Z")

</div>

hello folks, i’m playing around with RoR and let’s say I have 2 tables in ny DB: products and categories. each product must have a category. i can associate the category\_id field in products table with the different c…

---

## [Association chaining](https://www.ruby-forum.com/t/association-chaining/125605)

<div class="topic-metadata">

**Author:** [@renek](https://www.ruby-forum.com/u/renek)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/association-chaining/125605 "2008-01-10T18:19:15Z")

</div>

Hello, I am trying to setup some basic association chaining. I have the following models: class User \< ActiveRecord::Base has\_many :posts end class Post \< ActiveRecord::Base has\_many :tags belongs\_to :user end c…

---

## [Routes and collections](https://www.ruby-forum.com/t/routes-and-collections/125546)

<div class="topic-metadata">

**Author:** [@dhf](https://www.ruby-forum.com/u/dhf)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/routes-and-collections/125546 "2008-01-10T18:18:04Z")

</div>

I am working on a inventory system that allows duplicate PartNumbers. Different vendors can use the same part number. I know I can make them unique by using the vendor as part of teh number but that would require the …

---

## [Sergio Laranja](https://www.ruby-forum.com/t/sergio-laranja/125590)

<div class="topic-metadata">

**Author:** [@malvadomx](https://www.ruby-forum.com/u/malvadomx)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 6:07pm UTC](https://www.ruby-forum.com/t/sergio-laranja/125590 "2008-01-10T18:07:33Z")

</div>

Sergio L.

---

## [Getting results matching with an array?](https://www.ruby-forum.com/t/getting-results-matching-with-an-array/125617)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 2\
**Last updated:** [January 10, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/getting-results-matching-with-an-array/125617 "2008-01-10T17:59:20Z")

</div>

I have an array authors=\[1,3,7\] and I want to get all the posts that match with any or all of these results. something like… posts = Post.find(:all, \[:conditions =\> '‘author\_id = ?’, authors\]) of course this wont wo…

---

## [Output link\_remote\_to in helper](https://www.ruby-forum.com/t/output-link-remote-to-in-helper/124074)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 5\
**Last updated:** [January 10, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/output-link-remote-to-in-helper/124074 "2008-01-10T17:46:53Z")

</div>

Hi all, I have a complex link\_remote\_to link I need to generate often. I want to DRY up my view and create a helper that generates this link\_remote\_to for me. Is there a way my helper can output the link\_remote\_to ja…

---

## [Sporadically getting error Mysql::Error: Lost connection](https://www.ruby-forum.com/t/sporadically-getting-error-mysql-lost-connection/125355)

<div class="topic-metadata">

**Author:** [@homerlex](https://www.ruby-forum.com/u/homerlex)\
**Replies:** 18\
**Last updated:** [January 10, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/sporadically-getting-error-mysql-lost-connection/125355 "2008-01-10T17:40:26Z")

</div>

I just setup Rails on Centos5. I have a remote MySQL 4.1 server. I am able to successfully connect to MySQL with rails and it works fine most of the time. However, I get the following error every once in a while (not…

---

## [Skipped migration](https://www.ruby-forum.com/t/skipped-migration/124953)

<div class="topic-metadata">

**Author:** [@nootch](https://www.ruby-forum.com/u/nootch)\
**Replies:** 3\
**Last updated:** [January 10, 2008, 5:35pm UTC](https://www.ruby-forum.com/t/skipped-migration/124953 "2008-01-10T17:35:44Z")

</div>

Oddest thing - ran rake db:migrate, as I’ve done many, many times before, except this time it skipped one my migrations. Really strange. Has anyone ever seen this before? I ran the migration before and it worked fine …

---

## [Linking pictures to a model](https://www.ruby-forum.com/t/linking-pictures-to-a-model/124666)

<div class="topic-metadata">

**Author:** [@jvazquez](https://www.ruby-forum.com/u/jvazquez)\
**Replies:** 2\
**Last updated:** [January 10, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/linking-pictures-to-a-model/124666 "2008-01-10T17:07:33Z")

</div>

Hi all, I am new to ruby and as such really new to rails, I was wondering if anyone could help me out or point me in the right direction. I am wanting to know the proper way to link many pictures to a model “house”. T…

---

## [Virtual user methods](https://www.ruby-forum.com/t/virtual-user-methods/125607)

<div class="topic-metadata">

**Author:** [@fcano](https://www.ruby-forum.com/u/fcano)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/virtual-user-methods/125607 "2008-01-10T16:34:35Z")

</div>

Hi, I have a table called ‘fruit\_operations’ with this example content: bananas 6 buy tony bananas 3 sell tony tomatoes 5 buy tony bananas 1 sell john tomatoes 5 sell tony bananas 2 buy tony Now I want a @user me…

---

## [Help with create/edit form for dynamic objects](https://www.ruby-forum.com/t/help-with-create-edit-form-for-dynamic-objects/125506)

<div class="topic-metadata">

**Author:** [@jchengj](https://www.ruby-forum.com/u/jchengj)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 4:27pm UTC](https://www.ruby-forum.com/t/help-with-create-edit-form-for-dynamic-objects/125506 "2008-01-10T16:27:19Z")

</div>

I have a table called ‘cars’. id name 1 Hyundai Accent 2 Chevy Impala 3 Merecedes C Class I would like to know the users opinions on each of these cars, so I have setup a table called ‘car\_opinions’: …

---

## [Find\_by\_sql distinct](https://www.ruby-forum.com/t/find-by-sql-distinct/50124)

<div class="topic-metadata">

**Author:** [@Brutyn\_N](https://www.ruby-forum.com/u/Brutyn_N)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/find-by-sql-distinct/50124 "2008-01-10T16:01:26Z")

</div>

hey, i have this sql statement @all\_clients = Client.find\_by\_sql(“select distinct \* from clients …”) is there any other way for implementing this “distinct” into an sql statment with parameters?? thanks in adavanc…

---

## [Database most suited for RoR](https://www.ruby-forum.com/t/database-most-suited-for-ror/125593)

<div class="topic-metadata">

**Author:** [@manusharma](https://www.ruby-forum.com/u/manusharma)\
**Replies:** 2\
**Last updated:** [January 10, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/database-most-suited-for-ror/125593 "2008-01-10T15:45:50Z")

</div>

Hi, Out of curiosity I got to learn Ruby on Rails. Wondering somehow, as to which Data base is best suited for Ruby on Rails and Why? Any Comments/Suggestions Please! Thanks Manu

---

## [How to find position in an array](https://www.ruby-forum.com/t/how-to-find-position-in-an-array/125591)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/how-to-find-position-in-an-array/125591 "2008-01-10T15:27:05Z")

</div>

I have an array: r1.rp\_parts: \[\<Rp1…\>\]\[\<Rp1…\>\]\[\<Rp1…\>\]\[\<Rp4…\>\] If I do: r1.rp\_parts\[2\] I obtain Rp1… I would like to obtain de position of r1.rp\_parts\[2\] in the r1.rp\_parts array. I know that it’s position is 2, …

---

## [Good Host for Facebook Rails App?](https://www.ruby-forum.com/t/good-host-for-facebook-rails-app/117568)

<div class="topic-metadata">

**Author:** [@dkanders](https://www.ruby-forum.com/u/dkanders)\
**Replies:** 6\
**Last updated:** [January 10, 2008, 3:07pm UTC](https://www.ruby-forum.com/t/good-host-for-facebook-rails-app/117568 "2008-01-10T15:07:02Z")

</div>

Hi All, Wondering if anyone knows any pros/cons to any of the different rails hosting providers… I’m deploying a facebook app and am wondering where to host it… Right now, I have a hostingrails.com account, but am wo…

---

## [Creating dynamic page with Ruby on Rails through Radiant CMS](https://www.ruby-forum.com/t/creating-dynamic-page-with-ruby-on-rails-through-radiant-cms/125598)

<div class="topic-metadata">

**Author:** [@sridhar](https://www.ruby-forum.com/u/sridhar)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/creating-dynamic-page-with-ruby-on-rails-through-radiant-cms/125598 "2008-01-10T14:27:16Z")

</div>

Hi to all… Am newbie to RoR, i have in different situation, that i need to create a dynamic page of every user that registers an a/c with my site… want to use Rails with radiant CMS…Need to create a page for each use…

---

## [Submit button does not work](https://www.ruby-forum.com/t/submit-button-does-not-work/125579)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 2\
**Last updated:** [January 10, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/submit-button-does-not-work/125579 "2008-01-10T14:12:37Z")

</div>

HI! In my form rendered partially, for 3 models: User, Address, Phone. The are if conditions in the form for handling user registration and updating user. When i do the registration part the submit button works but o…

---

## [\[JOB\] Any Rails developer near Vitoria-ES, Brazil?](https://www.ruby-forum.com/t/job-any-rails-developer-near-vitoria-es-brazil/125597)

<div class="topic-metadata">

**Author:** [@dracko](https://www.ruby-forum.com/u/dracko)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/job-any-rails-developer-near-vitoria-es-brazil/125597 "2008-01-10T13:56:47Z")

</div>

I’m coordinating a system implementation using Rails in Vitoria-ES, Brazil. If there is any Rails developer in this list, near Vitoria, please let me know. I’ll give more details then. It is not really a job, but a …

---

## [Rails deployment](https://www.ruby-forum.com/t/rails-deployment/125554)

<div class="topic-metadata">

**Author:** [@Henry\_Addo](https://www.ruby-forum.com/u/Henry_Addo)\
**Replies:** 4\
**Last updated:** [January 10, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/rails-deployment/125554 "2008-01-10T13:32:46Z")

</div>

Currently, I have Apache2 as my frontend and Mongrel as the rails application server. All request comes into apache but requests for the Rails app are proxied ( mod\_proxy ) to an instance of the Mongrel web server…

---

## [Help with delete](https://www.ruby-forum.com/t/help-with-delete/125595)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/help-with-delete/125595 "2008-01-10T13:32:10Z")

</div>

repair\_tickets and rp\_parts are HABTM. If I do: repair\_ticket1.rp\_parts =\> \[#\<RpPart id: 1, …"\>, #\<RpPart id: 1,…"\>, #\<RpPart …"\>\] I only want to delete one of those RpPart id:1, and not both of them. Is it poss…

---

## [Help!](https://www.ruby-forum.com/t/help/125569)

<div class="topic-metadata">

**Author:** [@dev\_ror](https://www.ruby-forum.com/u/dev_ror)\
**Replies:** 3\
**Last updated:** [January 10, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/help/125569 "2008-01-10T13:09:53Z")

</div>

hi am a new ror user need some help for validation errors… this is the error i see… ‘’’’’’’ NoMethodError in Login#add\_user Showing app/views/login/add\_user.rhtml where line #14 raised: undefined method \`password’…

---

## [Pleas help: tree problem](https://www.ruby-forum.com/t/pleas-help-tree-problem/125589)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [January 10, 2008, 12:22pm UTC](https://www.ruby-forum.com/t/pleas-help-tree-problem/125589 "2008-01-10T12:22:49Z")

</div>

Hello, Is it possible to pick up data from the database and use Sortable.create to render the tree.If yes please tell me. Thank you.

---

## [Flash](https://www.ruby-forum.com/t/flash/125585)

<div class="topic-metadata">

**Author:** [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Replies:** 0\
**Last updated:** [January 10, 2008, 11:38am UTC](https://www.ruby-forum.com/t/flash/125585 "2008-01-10T11:38:48Z")

</div>

Hi. how can i stream one video with another video. i am playing a video and i need that after the completion of first video a next video should automaticall start. any pointers how to achieve this? Thanks Arpit

---

## [Find current record](https://www.ruby-forum.com/t/find-current-record/125582)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 11:23am UTC](https://www.ruby-forum.com/t/find-current-record/125582 "2008-01-10T11:23:17Z")

</div>

Hi, Does anyone know how to find the current/latest record in the table and display it out in view? Cos I need to then update that latest record from there. Thanks, user splash

---

## [Properly parsing carriage returns in Rails so javascript doesn't freak out](https://www.ruby-forum.com/t/properly-parsing-carriage-returns-in-rails-so-javascript-doesnt-freak-out/125558)

<div class="topic-metadata">

**Author:** [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Replies:** 1\
**Last updated:** [January 10, 2008, 10:41am UTC](https://www.ruby-forum.com/t/properly-parsing-carriage-returns-in-rails-so-javascript-doesnt-freak-out/125558 "2008-01-10T10:41:28Z")

</div>

I’ve got some code that “quotes” the contents of a blog post and inserts it into a comment box wrapped in a blockquote. You can view it here: http://pastie.caboo.se/137533 Problem is, every time I try to quote a bloc…

---

## [Listing with conditions](https://www.ruby-forum.com/t/listing-with-conditions/125581)

<div class="topic-metadata">

**Author:** [@katsuo](https://www.ruby-forum.com/u/katsuo)\
**Replies:** 0\
**Last updated:** [January 10, 2008, 10:32am UTC](https://www.ruby-forum.com/t/listing-with-conditions/125581 "2008-01-10T10:32:53Z")

</div>

Hi, I am struggling with this problem for a while. I just want to have books listed according to the title but only one for each title with the latest volume. Table for books id(book\_id) series\_id volume 1 …

---

## [Need help for loop](https://www.ruby-forum.com/t/need-help-for-loop/125572)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 5\
**Last updated:** [January 10, 2008, 10:28am UTC](https://www.ruby-forum.com/t/need-help-for-loop/125572 "2008-01-10T10:28:01Z")

</div>

Hi, Can anyone please help me. What I want to do here is to print the label and text field of this part of the table 5 times. The output I expected to get is this: TEXT NUMBER 0 (this is where the TEXT\_FIELD will a…

---

## [Help me introduce the concept of payment to my app](https://www.ruby-forum.com/t/help-me-introduce-the-concept-of-payment-to-my-app/125469)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 12\
**Last updated:** [January 10, 2008, 10:25am UTC](https://www.ruby-forum.com/t/help-me-introduce-the-concept-of-payment-to-my-app/125469 "2008-01-10T10:25:03Z")

</div>

I’d like some advice if poss. I’ve got my app up and running and I’m very pleased. I’ve learned an awful lot and learn more each day, ror is amazing. I’ve got just two models in my DB at the moment - owners and proper…

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

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