# Rails

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

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

---

## [Validates\_acceptance\_of not saving to database](https://www.ruby-forum.com/t/validates-acceptance-of-not-saving-to-database/110990)

<div class="topic-metadata">

**Author:** [@dkanders](https://www.ruby-forum.com/u/dkanders)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 4:00am UTC](https://www.ruby-forum.com/t/validates-acceptance-of-not-saving-to-database/110990 "2007-08-03T04:00:48Z")

</div>

Hi All, For some reason, when I have validates\_acceptance\_of on a checkbox, it works for validation, but it isn’t saving the ‘1’ (indicating acceptance) into the field of the database - it leaves it as NULL. If I tak…

---

## [Rails 1.2.3 MySQL 3.23.58 incompatible?](https://www.ruby-forum.com/t/rails-1-2-3-mysql-3-23-58-incompatible/111067)

<div class="topic-metadata">

**Author:** [@abon](https://www.ruby-forum.com/u/abon)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 3:13am UTC](https://www.ruby-forum.com/t/rails-1-2-3-mysql-3-23-58-incompatible/111067 "2007-08-03T03:13:53Z")

</div>

Hi, I was trying to create a table via action record by this file class CreateTasks \< ActiveRecord::Migration def self.up create\_table :tasks do |t| t.column :action, :string t.column :issuer, :integer t.column :re…

---

## [Two layouts for index action, or two index actions?](https://www.ruby-forum.com/t/two-layouts-for-index-action-or-two-index-actions/110872)

<div class="topic-metadata">

**Author:** [@ralph](https://www.ruby-forum.com/u/ralph)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 12:18am UTC](https://www.ruby-forum.com/t/two-layouts-for-index-action-or-two-index-actions/110872 "2007-08-03T00:18:15Z")

</div>

Hello, I’m working on a Rails application, and I want to keep things restful and clean. I’m using the restful\_authentication plugin to authenticate users and I want to keep the administration backend separate from the …

---

## [Problem with fresh install of InstantRails 1.7: Routing erro](https://www.ruby-forum.com/t/problem-with-fresh-install-of-instantrails-1-7-routing-erro/110153)

<div class="topic-metadata">

**Author:** [@4midori](https://www.ruby-forum.com/u/4midori)\
**Replies:** 4\
**Last updated:** [August 2, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/problem-with-fresh-install-of-instantrails-1-7-routing-erro/110153 "2007-08-02T23:50:29Z")

</div>

Hi, I followed the instructions for installing and configuring InstantRails, but when I create a new Rails app, I cannot view it in browser. InstantRails had worked previously, but I don’t know what changed. I have …

---

## [Search url encoding looks like crap](https://www.ruby-forum.com/t/search-url-encoding-looks-like-crap/111138)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 1\
**Last updated:** [August 2, 2007, 11:29pm UTC](https://www.ruby-forum.com/t/search-url-encoding-looks-like-crap/111138 "2007-08-02T23:29:26Z")

</div>

I’m trying to search records with a date and the url looks like crap. Here is a url: domain.com/attendances?search\[(3i)2(1i)2007(2i)8(2i %29%5D=8&search%5B%283i%292%281i%292007%282i%298%283i%29%5D=2&search%5B %283i%2…

---

## [Order in find](https://www.ruby-forum.com/t/order-in-find/111028)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 5\
**Last updated:** [August 2, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/order-in-find/111028 "2007-08-02T23:04:20Z")

</div>

Trying to order my find by a related table through a related table…and I get this error PGError: ERROR: schema “placement” does not exist : SELECT client\_slots.“id” AS t0\_r0, client\_slots.“name” AS t0\_r1, client\_slo…

---

## [Cannot access flash from rjs helper](https://www.ruby-forum.com/t/cannot-access-flash-from-rjs-helper/111132)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 10:44pm UTC](https://www.ruby-forum.com/t/cannot-access-flash-from-rjs-helper/111132 "2007-08-02T22:44:19Z")

</div>

all is in the title :). I’ve got an rjs file calling “page.ajax\_flash\_alert”. This method is defined in Application helper in which i do this : if flash.size \> 0 flash.each do |key, msg| page.insert\_html(:bottom, :a…

---

## [Rails Developers Wanted](https://www.ruby-forum.com/t/rails-developers-wanted/111131)

<div class="topic-metadata">

**Author:** [@markbates](https://www.ruby-forum.com/u/markbates)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/rails-developers-wanted/111131 "2007-08-02T22:36:44Z")

</div>

Helium is seeking strong, self-motivated, web software developers to join our mature team in building our next generation applications using Ruby on Rails technology. â€¨Ideal candidates will have spent the past few y…

---

## [Rails Database Developer](https://www.ruby-forum.com/t/rails-database-developer/111130)

<div class="topic-metadata">

**Author:** [@markbates](https://www.ruby-forum.com/u/markbates)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/rails-database-developer/111130 "2007-08-02T22:35:50Z")

</div>

Helium is seeking a strong, self-motivated, database developer to join our mature team in building our next generation applications using Ruby on Rails technology. â€¨Ideal candidates will have spent the past few year…

---

## [Remote function not submitting form](https://www.ruby-forum.com/t/remote-function-not-submitting-form/111029)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 1\
**Last updated:** [August 2, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/remote-function-not-submitting-form/111029 "2007-08-02T22:31:18Z")

</div>

Hi all, I have this code: \<%= collection\_select('declarations\_payers', 'user', @users, 'id', ‘fullname’, {}, {:onChange =\> remote\_function( :update =\> “participants”, :url =\> { :controller =\> ‘ajax’, :action =\> ‘d…

---

## [Save to another database](https://www.ruby-forum.com/t/save-to-another-database/111011)

<div class="topic-metadata">

**Author:** [@pardoengreg](https://www.ruby-forum.com/u/pardoengreg)\
**Replies:** 4\
**Last updated:** [August 2, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/save-to-another-database/111011 "2007-08-02T21:59:21Z")

</div>

Hi, I want to save to current database to another one with the same format. Does anyone know how to do it ? I have a mysql database to which my Ruby on Rails is connected to. And I want to export a whole table from t…

---

## [Overridding readonly attribute in custom form builder](https://www.ruby-forum.com/t/overridding-readonly-attribute-in-custom-form-builder/111127)

<div class="topic-metadata">

**Author:** [@rubylover](https://www.ruby-forum.com/u/rubylover)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/overridding-readonly-attribute-in-custom-form-builder/111127 "2007-08-02T21:46:15Z")

</div>

Hi, I’ve created a custom form builder and overridden text\_area so that all fields are readonly. There are a few instances that I would want an editable text\_area, so I have tried to create an editable\_text\_area meth…

---

## [Reading and saving data with belongs\_to and has\_many](https://www.ruby-forum.com/t/reading-and-saving-data-with-belongs-to-and-has-many/111126)

<div class="topic-metadata">

**Author:** [@Jack\_W\_Jennings](https://www.ruby-forum.com/u/Jack_W_Jennings)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/reading-and-saving-data-with-belongs-to-and-has-many/111126 "2007-08-02T21:25:13Z")

</div>

Hi all, I’m new to Ruby on Rails, and so I have a question that’s probably simple, but I can’t figure it out. I’m trying to create several models that all belong\_to a master model, say “entries”, which has\_one of the …

---

## [Map.resources with habtm](https://www.ruby-forum.com/t/map-resources-with-habtm/111015)

<div class="topic-metadata">

**Author:** [@martinevans](https://www.ruby-forum.com/u/martinevans)\
**Replies:** 2\
**Last updated:** [August 2, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/map-resources-with-habtm/111015 "2007-08-02T21:22:40Z")

</div>

Hi I’m trying to use restful resources with recipes and ingredients I’ve set up the models using scaffold\_resource. A recipe can have many ingredients and an ingredient can be in many recipes. I’ve set the relations…

---

## [Ruby Math Normal Distribution](https://www.ruby-forum.com/t/ruby-math-normal-distribution/111051)

<div class="topic-metadata">

**Author:** [@murphy](https://www.ruby-forum.com/u/murphy)\
**Replies:** 1\
**Last updated:** [August 2, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/ruby-math-normal-distribution/111051 "2007-08-02T21:22:12Z")

</div>

Given a Z can ruby spit back the appropriate probability from a Normal Distribution curve? M

---

## [Write\_attribute functionality for related objects?](https://www.ruby-forum.com/t/write-attribute-functionality-for-related-objects/111121)

<div class="topic-metadata">

**Author:** [@morten](https://www.ruby-forum.com/u/morten)\
**Replies:** 1\
**Last updated:** [August 2, 2007, 9:19pm UTC](https://www.ruby-forum.com/t/write-attribute-functionality-for-related-objects/111121 "2007-08-02T21:19:12Z")

</div>

Hi. Given: class Group \< AR has\_many :users end Is it in any way possible to retain reference to the old users when they get replaced using group.users=(new\_users) ? The below doesn’t work but illustrates what I’m …

---

## [Executing php code in rails](https://www.ruby-forum.com/t/executing-php-code-in-rails/111070)

<div class="topic-metadata">

**Author:** [@spacer](https://www.ruby-forum.com/u/spacer)\
**Replies:** 1\
**Last updated:** [August 2, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/executing-php-code-in-rails/111070 "2007-08-02T21:18:12Z")

</div>

Hello guys. How could I execute a php script from RoR templates? I’ve tried to do that in such way: \<% command = ‘php /site/script.php uri=’ %\> \<%= #{command} %\> And got this: X-Powered-By: PHP/4.4.7 Content-type: t…

---

## [Storing as YAML in the database](https://www.ruby-forum.com/t/storing-as-yaml-in-the-database/111115)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 3\
**Last updated:** [August 2, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/storing-as-yaml-in-the-database/111115 "2007-08-02T21:15:12Z")

</div>

i’ve got a project which i need to create some dynamic forms. each one will be different so it seems almost impossible to keep a 1 to 1 relationship between each form field and a corresponding column in the database. …

---

## [Displaying 404 or 500 with application layout](https://www.ruby-forum.com/t/displaying-404-or-500-with-application-layout/111124)

<div class="topic-metadata">

**Author:** [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 9:09pm UTC](https://www.ruby-forum.com/t/displaying-404-or-500-with-application-layout/111124 "2007-08-02T21:09:50Z")

</div>

Greetings all, I want to display the 500 or 400 error with the application layout in a .rhtml file like the rest of the site. How would I go about making this happen?? Blessed Be Phillip

---

## [Rendering a 404 page with a layout](https://www.ruby-forum.com/t/rendering-a-404-page-with-a-layout/71064)

<div class="topic-metadata">

**Author:** [@msoulier](https://www.ruby-forum.com/u/msoulier)\
**Replies:** 4\
**Last updated:** [August 2, 2007, 9:07pm UTC](https://www.ruby-forum.com/t/rendering-a-404-page-with-a-layout/71064 "2007-08-02T21:07:12Z")

</div>

Hello, I want my 404 and 500 pages to use the application layout, so they look like the rest of my site. So, I’m doing this def rescue\_action\_in\_public(exception) logger.error("rescue\_action\_in\_public executed") …

---

## [Best way to eager load accross multiple relationships?](https://www.ruby-forum.com/t/best-way-to-eager-load-accross-multiple-relationships/111113)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 4\
**Last updated:** [August 2, 2007, 9:05pm UTC](https://www.ruby-forum.com/t/best-way-to-eager-load-accross-multiple-relationships/111113 "2007-08-02T21:05:11Z")

</div>

Let’s say I have Departments, which have many Persons , which have many Pets. I can fetch Departments and eagerly load their Persons, with :include=\> in the find statement. But what if I want to eagerly load all the …

---

## ['Coming from' rails...to php, help](https://www.ruby-forum.com/t/coming-from-rails-to-php-help/111103)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 5\
**Last updated:** [August 2, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/coming-from-rails-to-php-help/111103 "2007-08-02T21:03:10Z")

</div>

I have to put together a quick proposal for a site that, for now, is set to be PHP. Hopefully we can change that, but I could use some help with PHP best practices. Are their PHP equivalents for Test:Unit, autotest…

---

## [Unequal Object Identities in Rails](https://www.ruby-forum.com/t/unequal-object-identities-in-rails/111109)

<div class="topic-metadata">

**Author:** [@jfoxny](https://www.ruby-forum.com/u/jfoxny)\
**Replies:** 4\
**Last updated:** [August 2, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/unequal-object-identities-in-rails/111109 "2007-08-02T20:57:10Z")

</div>

My question is best illustrated by an example. Let’s say we have two simple classes, Order and LineItem defined as follows. class Order \< ActiveRecord::Base has\_many :line\_items end class LineItem \< ActiveRecord::B…

---

## [Link\_to wrong path](https://www.ruby-forum.com/t/link-to-wrong-path/111118)

<div class="topic-metadata">

**Author:** [@Sketchy](https://www.ruby-forum.com/u/Sketchy)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/link-to-wrong-path/111118 "2007-08-02T20:50:08Z")

</div>

HI guys, I’m starting with RoR and I figured I’d jump on the facebook bandwagon and make a little application… my problem is when using link\_to inside my application I get wrong paths… Let’s say my application url is F…

---

## [Ruby on Rails position in Columbia, Maryland](https://www.ruby-forum.com/t/ruby-on-rails-position-in-columbia-maryland/111116)

<div class="topic-metadata">

**Author:** [@jobman](https://www.ruby-forum.com/u/jobman)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-position-in-columbia-maryland/111116 "2007-08-02T19:39:54Z")

</div>

We have a very interesting Web D. project going on in Columbia, MD requiring Ruby on Rails skills. This is a permanent position in an exciting industry. You will also need PHP, XML, SQL, MY SQL, and AJAX experience. …

---

## [PAKHostOnline.com – Web Hosting | Pakistan | http://www.pakh](https://www.ruby-forum.com/t/pakhostonline-com-web-hosting-pakistan-http-www-pakh/196415)

<div class="topic-metadata">

**Author:** [@koom2020](https://www.ruby-forum.com/u/koom2020)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 7:36pm UTC](https://www.ruby-forum.com/t/pakhostonline-com-web-hosting-pakistan-http-www-pakh/196415 "2007-08-02T19:36:54Z")

</div>

PAKHostOnline.com offered Pakistan No.1 Web Hosting, Free DOMAIN Registration / Transfer, 99% UP-Time, 24/7 Technical Support at http://www.pakhostonline.com/

---

## [Help with "Data Blender": Active Record or No?](https://www.ruby-forum.com/t/help-with-data-blender-active-record-or-no/111108)

<div class="topic-metadata">

**Author:** [@Anders](https://www.ruby-forum.com/u/Anders)\
**Replies:** 0\
**Last updated:** [August 2, 2007, 7:04pm UTC](https://www.ruby-forum.com/t/help-with-data-blender-active-record-or-no/111108 "2007-08-02T19:04:47Z")

</div>

I’m about to start on my first Rails project, and I could use some advice. I’m going to build a “Data Blender” to replace a lot of frantic work that gets done here by hand using Microsoft Access. Using the Data Blend…

---

## [Modifying generated SQL](https://www.ruby-forum.com/t/modifying-generated-sql/110910)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 11\
**Last updated:** [August 2, 2007, 6:33pm UTC](https://www.ruby-forum.com/t/modifying-generated-sql/110910 "2007-08-02T18:33:37Z")

</div>

I am very new to Rails and Ruby. Currently the SQL generated by ?? (I don’t know where the actual SQL IS created) has the wrong syntax that I would like to “tweak” before it is passed to the DB. Is there a way to “i…

---

## [Will\_paginate plugin doesn't work with Association Extension](https://www.ruby-forum.com/t/will-paginate-plugin-doesnt-work-with-association-extension/110255)

<div class="topic-metadata">

**Author:** [@christos](https://www.ruby-forum.com/u/christos)\
**Replies:** 9\
**Last updated:** [August 2, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/will-paginate-plugin-doesnt-work-with-association-extension/110255 "2007-08-02T18:11:35Z")

</div>

I have: class Post \< ActiveRecord::Base has\_many :comments do def published find( :all, :conditions =\> {:published =\> true} ) end end end When in my controller I do Post.find(:first).comments.published.paginate…

---

## [Noobie question about has\_many :through](https://www.ruby-forum.com/t/noobie-question-about-has-many-through/111093)

<div class="topic-metadata">

**Author:** [@pbrackenridge](https://www.ruby-forum.com/u/pbrackenridge)\
**Replies:** 1\
**Last updated:** [August 2, 2007, 5:13pm UTC](https://www.ruby-forum.com/t/noobie-question-about-has-many-through/111093 "2007-08-02T17:13:26Z")

</div>

First of all, I am a bit of a noob so sorry if this is a very simple question. Basically I want to model the relationship between a User (U) and a Questionnaire(Qu). A Qu has one Subject (the user that the questionna…

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

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