# Rails

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

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

---

## [Documentation for database.yml?](https://www.ruby-forum.com/t/documentation-for-database-yml/169318)

<div class="topic-metadata">

**Author:** [@derek73](https://www.ruby-forum.com/u/derek73)\
**Replies:** 2\
**Last updated:** [June 2, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/documentation-for-database-yml/169318 "2009-06-02T17:53:26Z")

</div>

can anyone point me to the documentation for the database.yml file?

---

## [Time textfield validation (hh:mm)](https://www.ruby-forum.com/t/time-textfield-validation-hh-mm/169336)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/time-textfield-validation-hh-mm/169336 "2009-06-02T17:05:51Z")

</div>

I am trying to find the best way in validating a textfield ‘start\_time’ in a form, based on the expected strftime format ("%I:%M%p") if a user don’t enter the correct format like " 01:45PM" hh:mm in 12-hours (wi…

---

## [Printer Algorithm](https://www.ruby-forum.com/t/printer-algorithm/169320)

<div class="topic-metadata">

**Author:** [@czaraaj](https://www.ruby-forum.com/u/czaraaj)\
**Replies:** 3\
**Last updated:** [June 2, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/printer-algorithm/169320 "2009-06-02T16:15:22Z")

</div>

A printer can can plot points provided to it in the form of ‘x’ and ‘y’ coordinates. The plotter hand can move horizontally or vertically only. Your program will be given a list of ‘n’ coordinates in the form of {(x1,…

---

## [UTF-8, AES encryption, the works - help!](https://www.ruby-forum.com/t/utf-8-aes-encryption-the-works-help/169306)

<div class="topic-metadata">

**Author:** [@zamo](https://www.ruby-forum.com/u/zamo)\
**Replies:** 3\
**Last updated:** [June 2, 2009, 2:28pm UTC](https://www.ruby-forum.com/t/utf-8-aes-encryption-the-works-help/169306 "2009-06-02T14:28:21Z")

</div>

Hi, I would like to store some sensitive data into my DB using Rails, it has to be encrypted. I’ve tried a lot of methods of encryption, they all work. Fine by now, yet when I try to store the results into my DB (tab…

---

## [Rendering layouts/views from plugins](https://www.ruby-forum.com/t/rendering-layouts-views-from-plugins/169280)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 1:20pm UTC](https://www.ruby-forum.com/t/rendering-layouts-views-from-plugins/169280 "2009-06-02T13:20:51Z")

</div>

I am wondering if there is an easy way to render layouts and views from the plugin directory, as well as javascript and css ? I know I could have a rake task copy them from the plugins to where they would normally go,…

---

## [Inconsistent REST behavior](https://www.ruby-forum.com/t/inconsistent-rest-behavior/169328)

<div class="topic-metadata">

**Author:** [@ncancelliere](https://www.ruby-forum.com/u/ncancelliere)\
**Replies:** 0\
**Last updated:** [June 2, 2009, 1:09pm UTC](https://www.ruby-forum.com/t/inconsistent-rest-behavior/169328 "2009-06-02T13:09:04Z")

</div>

Has anyone seen Rails save nested associations despite their being invalid? If I hit the site from a different Rails app (using ActiveResource) and try to update the record so that the username is too short it fails …

---

## [How do I access a my :include data in my ROR SQL results?](https://www.ruby-forum.com/t/how-do-i-access-a-my-include-data-in-my-ror-sql-results/169324)

<div class="topic-metadata">

**Author:** [@dustinbuss](https://www.ruby-forum.com/u/dustinbuss)\
**Replies:** 2\
**Last updated:** [June 2, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/how-do-i-access-a-my-include-data-in-my-ror-sql-results/169324 "2009-06-02T12:42:42Z")

</div>

I am new to ROR, and I’m stuck! My MySQL tables are setup like this: books id book\_name author\_id authors id author\_name my regular PHP/SQL query would look something like this: $all\_books = SELECT \* FROM books L…

---

## [Shoulda vs Remarkable](https://www.ruby-forum.com/t/shoulda-vs-remarkable/166343)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 2\
**Last updated:** [June 2, 2009, 12:20pm UTC](https://www.ruby-forum.com/t/shoulda-vs-remarkable/166343 "2009-06-02T12:20:18Z")

</div>

If my understanding is correct, shoulda now works with RSpec. Does anybody have experience with Shoulda + RSpec? What about comparing it with Remarkable with Shoulda? Which is more reliable? How’s the developers’ resp…

---

## [Observe\_form + call back after page changes - why?](https://www.ruby-forum.com/t/observe-form-call-back-after-page-changes-why/161664)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 3\
**Last updated:** [June 2, 2009, 12:15pm UTC](https://www.ruby-forum.com/t/observe-form-call-back-after-page-changes-why/161664 "2009-06-02T12:15:43Z")

</div>

Hello there, I have a live search that gimme a list of products. In that list, I have a link for each product. That link render the product page. The problem is: After the product page renders, the observe\_form calls …

---

## [Outlook like calendar](https://www.ruby-forum.com/t/outlook-like-calendar/169286)

<div class="topic-metadata">

**Author:** [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 9:33am UTC](https://www.ruby-forum.com/t/outlook-like-calendar/169286 "2009-06-02T09:33:13Z")

</div>

Hi, I’m working on a reservation system for a site and I would like to display a calendar with the programation of a cine movies or the hours of classes for a gym center…that kind of stuff. The Outlook calendar is re…

---

## [Valdate\_presnce\_of email, :if =\> :validate\_id + Factory girl](https://www.ruby-forum.com/t/valdate-presnce-of-email-if-validate-id-factory-girl/169313)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [June 2, 2009, 8:49am UTC](https://www.ruby-forum.com/t/valdate-presnce-of-email-if-validate-id-factory-girl/169313 "2009-06-02T08:49:26Z")

</div>

Hi In the model I have User attr\_accessor :validate\_email\_id validates\_presence\_of :email ,:if =\> :validate\_email\_id Could anybody please tell me how can I define a Factory for the above? Thanks in advance Sijo

---

## [Postgresql broken on windows in 2.3-stable](https://www.ruby-forum.com/t/postgresql-broken-on-windows-in-2-3-stable/169317)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [June 2, 2009, 8:32am UTC](https://www.ruby-forum.com/t/postgresql-broken-on-windows-in-2-3-stable/169317 "2009-06-02T08:32:20Z")

</div>

The addition of quote\_indent in the postgresql adapter has broken postgresql support on windows. The postgres-pr gem was the only driver working with rails on windows, and it doesn’t have quote\_indent. The newer d…

---

## [Engine migration in main application in rail 2.3.2 on window](https://www.ruby-forum.com/t/engine-migration-in-main-application-in-rail-2-3-2-on-window/169319)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 0\
**Last updated:** [June 2, 2009, 8:28am UTC](https://www.ruby-forum.com/t/engine-migration-in-main-application-in-rail-2-3-2-on-window/169319 "2009-06-02T08:28:29Z")

</div>

Hello all, I am developing a small rails engine. using rails 2.3.2 version on windows OS I followed steps from railscast video. “http://media.railscasts.com/videos/149\_rails\_engines.mov” I am stopped at how to do mi…

---

## [Daemons causing Mysql::Error:Can't connect to local MySQL server through socket '/var/run/mysqld/my](https://www.ruby-forum.com/t/daemons-causing-mysql-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-my/169234)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 7:09am UTC](https://www.ruby-forum.com/t/daemons-causing-mysql-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-my/169234 "2009-06-02T07:09:52Z")

</div>

Hi all, Ive been having this problem for the past few days on production. I have a couple of daemons (using the daemons gem and daemon\_generator) that I run every hour on the server. One of them sends out email too (…

---

## [ArgumentError - Unable to rectify please help](https://www.ruby-forum.com/t/argumenterror-unable-to-rectify-please-help/169254)

<div class="topic-metadata">

**Author:** [@zufar](https://www.ruby-forum.com/u/zufar)\
**Replies:** 2\
**Last updated:** [June 2, 2009, 7:06am UTC](https://www.ruby-forum.com/t/argumenterror-unable-to-rectify-please-help/169254 "2009-06-02T07:06:36Z")

</div>

Hello, I am stuck in a problem which I am unable to understand. I am trying to send an email, which I have done before, after user registers himself on a website. User provides email address which he has to confirm be…

---

## [Simple tables question](https://www.ruby-forum.com/t/simple-tables-question/169307)

<div class="topic-metadata">

**Author:** [@oftenly](https://www.ruby-forum.com/u/oftenly)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 5:20am UTC](https://www.ruby-forum.com/t/simple-tables-question/169307 "2009-06-02T05:20:02Z")

</div>

Sorry for this rudimentary question… I’ve been following Pragprog’s rails book, and somehow I’m still missing something basic: I need to make a table (class) where one of the columns’ (attributes’) type is an array of…

---

## [Edge - stable at the moment?](https://www.ruby-forum.com/t/edge-stable-at-the-moment/169309)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 0\
**Last updated:** [June 2, 2009, 5:18am UTC](https://www.ruby-forum.com/t/edge-stable-at-the-moment/169309 "2009-06-02T05:18:17Z")

</div>

Hi there, Is anyone running a site on close to edge at the moment? I know the changes going on are fairly significant, so I’m wondering if it’s more unstable than usual. There’s a couple of features beyond 2.3 stabl…

---

## [Set a session variable in a link\_to](https://www.ruby-forum.com/t/set-a-session-variable-in-a-link-to/169301)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 4:44am UTC](https://www.ruby-forum.com/t/set-a-session-variable-in-a-link-to/169301 "2009-06-02T04:44:24Z")

</div>

I need to link\_to a particular method in a particular controller that needs to do something one time, from one page, and something dfifferent another time, from another page. I intend to set and subsequently get a ses…

---

## [Auto\_complete plugin for rails 2.2.2](https://www.ruby-forum.com/t/auto-complete-plugin-for-rails-2-2-2/169305)

<div class="topic-metadata">

**Author:** [@semi](https://www.ruby-forum.com/u/semi)\
**Replies:** 0\
**Last updated:** [June 2, 2009, 4:29am UTC](https://www.ruby-forum.com/t/auto-complete-plugin-for-rails-2-2-2/169305 "2009-06-02T04:29:48Z")

</div>

Can anyone help me as to why I can’t get this thing to work for rails 2.2.2? I get the following error when I ruby script/server: =\> Booting WEBrick… C:/Ruby/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 5, …

---

## [Does has\_many collection '\<\<' (append operator) always save/create child in DB when parent isn't ne](https://www.ruby-forum.com/t/does-has-many-collection-append-operator-always-save-create-child-in-db-when-parent-isnt-ne/169292)

<div class="topic-metadata">

**Author:** [@zettabyte](https://www.ruby-forum.com/u/zettabyte)\
**Replies:** 0\
**Last updated:** [June 2, 2009, 12:21am UTC](https://www.ruby-forum.com/t/does-has-many-collection-append-operator-always-save-create-child-in-db-when-parent-isnt-ne/169292 "2009-06-02T00:21:12Z")

</div>

Howdy, the title mostly asks the question. Given the following: class Article \< ActiveRecord::Base ; has\_many :comments ; end class Comment \< ActiveRecord::Base ; belongs\_to :article ; end I have an article already i…

---

## [Multiple controllers/views for one model](https://www.ruby-forum.com/t/multiple-controllers-views-for-one-model/169271)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 2\
**Last updated:** [June 2, 2009, 12:08am UTC](https://www.ruby-forum.com/t/multiple-controllers-views-for-one-model/169271 "2009-06-02T00:08:20Z")

</div>

I am wondering how to handle this: I have a model, ‘users’. The table can be edited. So far, so good, standard CRUD on a given model, standard views, etc. One of the fields in the users table is a text field for their …

---

## [Simple problem of negating boolean in params-hash](https://www.ruby-forum.com/t/simple-problem-of-negating-boolean-in-params-hash/169290)

<div class="topic-metadata">

**Author:** [@Adrian\_D](https://www.ruby-forum.com/u/Adrian_D)\
**Replies:** 1\
**Last updated:** [June 2, 2009, 12:08am UTC](https://www.ruby-forum.com/t/simple-problem-of-negating-boolean-in-params-hash/169290 "2009-06-02T00:08:19Z")

</div>

Hi, I have a simple problem. I get a boolean value in the parameter hash and want to negate it. But somehow I missed there a fundamental concept, because that doesn’t make any sense to me: Code: test1 = !params\[:edi…

---

## [Forcing use of gem in vendor/gems?](https://www.ruby-forum.com/t/forcing-use-of-gem-in-vendor-gems/169291)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 0\
**Last updated:** [June 1, 2009, 11:57pm UTC](https://www.ruby-forum.com/t/forcing-use-of-gem-in-vendor-gems/169291 "2009-06-01T23:57:45Z")

</div>

Sorta surprised this isn’t a FAQ, but… Maybe this is not good practice, but I have a gem that is both installed in the system and in vendor/gems. The vendor/gems copy has some local mods. Seems like the only way I c…

---

## [Smart data loading](https://www.ruby-forum.com/t/smart-data-loading/169285)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 0\
**Last updated:** [June 1, 2009, 10:57pm UTC](https://www.ruby-forum.com/t/smart-data-loading/169285 "2009-06-01T22:57:52Z")

</div>

I need something to load my seed data when I stage my app for milestone releases. I’m using fixtures currently but maintaining the foreign key relationships is getting more difficult as the app grows larger. I’d lik…

---

## [Updated Tutorials?](https://www.ruby-forum.com/t/updated-tutorials/169283)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 2\
**Last updated:** [June 1, 2009, 10:51pm UTC](https://www.ruby-forum.com/t/updated-tutorials/169283 "2009-06-01T22:51:47Z")

</div>

Summary: Every book I’ve purchased has either been a) outdated using rails 1.x or b) outdated using rails 2.x where there are issues working through some of the books. A good example is a book that others said was wo…

---

## [IE6 CSS and Rails Routes](https://www.ruby-forum.com/t/ie6-css-and-rails-routes/169268)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 1, 2009, 10:49pm UTC](https://www.ruby-forum.com/t/ie6-css-and-rails-routes/169268 "2009-06-01T22:49:36Z")

</div>

I dont know if anyone has come across this issue. I have 2 different layouts for my app. both contain the same partial with the same CSS files in the head. in that i also have a IE6 CSS Hack file. Pretty standard. Th…

---

## [Counter\_cache is making a redundant SELECT before UPDATE](https://www.ruby-forum.com/t/counter-cache-is-making-a-redundant-select-before-update/169246)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 4\
**Last updated:** [June 1, 2009, 9:43pm UTC](https://www.ruby-forum.com/t/counter-cache-is-making-a-redundant-select-before-update/169246 "2009-06-01T21:43:16Z")

</div>

Hi, I have the following code: Message, belongs\_to :topic, :counter\_cache =\> true topic = Topic.find\_from\_permalink(params\[:id\]) topic.messages.create(params\[:message\]) When the message gets created, then AR issues …

---

## [Override finders?](https://www.ruby-forum.com/t/override-finders/169274)

<div class="topic-metadata">

**Author:** [@benol](https://www.ruby-forum.com/u/benol)\
**Replies:** 2\
**Last updated:** [June 1, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/override-finders/169274 "2009-06-01T21:32:23Z")

</div>

Hi, I have my model for e.g. “Car”. I used this model in lots of places. In a migration I added Car.is\_visible default =\> false. Now I wan all of the finder methods to take this flag under consideration.…

---

## [Collection\_select option with multiple symbols](https://www.ruby-forum.com/t/collection-select-option-with-multiple-symbols/169276)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 2\
**Last updated:** [June 1, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/collection-select-option-with-multiple-symbols/169276 "2009-06-01T20:18:12Z")

</div>

i have this collection\_select: \<%= f.label :customer, t(‘admin.customers.index.items’) %\> \<%= f.collection\_select( :customer, @customers, :id, :surname, options = {:prompt =\> t(‘admin.customers.index.item’) } ) %\> a…

---

## [Process request and redirect to another url with all params](https://www.ruby-forum.com/t/process-request-and-redirect-to-another-url-with-all-params/169272)

<div class="topic-metadata">

**Author:** [@doug3](https://www.ruby-forum.com/u/doug3)\
**Replies:** 1\
**Last updated:** [June 1, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/process-request-and-redirect-to-another-url-with-all-params/169272 "2009-06-01T19:59:31Z")

</div>

I am trying to do the following: process a request containing form data. Once I my app has successfully completed its processing, I would like to redirect\_to a totally different site and pass along the parameters that…

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

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