# Rails

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

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

---

## [Retrieve data from two Tables and validate](https://www.ruby-forum.com/t/retrieve-data-from-two-tables-and-validate/121717)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 4\
**Last updated:** [November 30, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/retrieve-data-from-two-tables-and-validate/121717 "2007-11-30T20:54:43Z")

</div>

Hi ALL, I have created two tables in mysql to store user details. CREATE TABLE IF NOT EXISTS users ( id int(11) NOT NULL auto\_increment, user\_name CHAR( 20 ) default NULL, password varchar(255) default NULL, reco…

---

## [Doxygen equivalent for Ruby-on-Rails?](https://www.ruby-forum.com/t/doxygen-equivalent-for-ruby-on-rails/121777)

<div class="topic-metadata">

**Author:** [@bunny](https://www.ruby-forum.com/u/bunny)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/doxygen-equivalent-for-ruby-on-rails/121777 "2007-11-30T20:33:37Z")

</div>

Hi, What is the standard/popular system for generating documentation for Ruby-on-Rails? Benjamin

---

## [Site still works without mysql gem installed](https://www.ruby-forum.com/t/site-still-works-without-mysql-gem-installed/121696)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 8:29pm UTC](https://www.ruby-forum.com/t/site-still-works-without-mysql-gem-installed/121696 "2007-11-30T20:29:01Z")

</div>

Hi, Like many people out there who work with Apache and Mongrel cluster, I had the problem where the Mogrel servers die after a period of inactivity. I found out this is due to problem with the mysql gem, thus I uni…

---

## [Nested resources and \_path methods](https://www.ruby-forum.com/t/nested-resources-and-path-methods/121757)

<div class="topic-metadata">

**Author:** [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/nested-resources-and-path-methods/121757 "2007-11-30T20:13:05Z")

</div>

Hi guys, I was thinking aboiut this for a while: If I have nested resource routes, for example /building/1/floor/2/ room/ 3 (building has\_many floors and so on), I have to call the room\_path method like this: room\_…

---

## [I don't understand #{ }](https://www.ruby-forum.com/t/i-dont-understand/121774)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [November 30, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/i-dont-understand/121774 "2007-11-30T20:04:18Z")

</div>

Hi there, I’m new to ruby and rails. I’m going through a few tutorials and I got the updated agile book. One thing I keep seeing which hasn’t quite been properly explained is something like this: puts “Hello #{name.c…

---

## [Choosing a college degree](https://www.ruby-forum.com/t/choosing-a-college-degree/121711)

<div class="topic-metadata">

**Author:** [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Replies:** 4\
**Last updated:** [November 30, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/choosing-a-college-degree/121711 "2007-11-30T20:01:58Z")

</div>

I have been programming for the last 3 years, doing web and graphic design for the last 7. I am starting college in january at a local community college before I transfer to a 4 year college to get my 4 year degree. R…

---

## [Problem showing data - syntax error perhaps?](https://www.ruby-forum.com/t/problem-showing-data-syntax-error-perhaps/121751)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/problem-showing-data-syntax-error-perhaps/121751 "2007-11-30T19:56:42Z")

</div>

Hi, I’m working through the ONLamp Rails tutorial (revisited one) here: I’m using InstantRails which seems to be working fine. I’m to the point on page two where you simplify the recipe listing and add the category…

---

## [Unit Testing - Examining Database Records](https://www.ruby-forum.com/t/unit-testing-examining-database-records/121688)

<div class="topic-metadata">

**Author:** [@alan](https://www.ruby-forum.com/u/alan)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/unit-testing-examining-database-records/121688 "2007-11-30T19:48:59Z")

</div>

I am creating some unit test for class methods which create/update records in one or more tables. What is the best way to check that this is done and assert the results? I would expect something like an unordered arr…

---

## [Only\_path not working?](https://www.ruby-forum.com/t/only-path-not-working/121772)

<div class="topic-metadata">

**Author:** [@jooma2](https://www.ruby-forum.com/u/jooma2)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/only-path-not-working/121772 "2007-11-30T19:43:01Z")

</div>

I’m developing a facebook app and I need url\_for to just spit out the relative url of my controller and action path. From what I’ve read everywhere I just need to add the option :only\_path =\> true and that should jus…

---

## [Collection.build or collection.create gives "ArgumentError: wrong number of arguments (1 for 0)"](https://www.ruby-forum.com/t/collection-build-or-collection-create-gives-argumenterror-wrong-number-of-arguments-1-for-0/121600)

<div class="topic-metadata">

**Author:** [@scott](https://www.ruby-forum.com/u/scott)\
**Replies:** 4\
**Last updated:** [November 30, 2007, 7:42pm UTC](https://www.ruby-forum.com/t/collection-build-or-collection-create-gives-argumenterror-wrong-number-of-arguments-1-for-0/121600 "2007-11-30T19:42:32Z")

</div>

I have a Project that has\_many Tasks. Tasks belongs to a Project. When I try the following: project = Project.new project.tasks.build I get: s = Project.new =\> #\<Project:0x25f9e28 @attributes={“name”=\>"", “end\_at…

---

## [AR trying force NULL into datetime](https://www.ruby-forum.com/t/ar-trying-force-null-into-datetime/121133)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 9\
**Last updated:** [November 30, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/ar-trying-force-null-into-datetime/121133 "2007-11-30T19:20:54Z")

</div>

I scrounged the list and saw other questions but no answers for this: Rails 1.2.5, MySQL 5.0.x All my tables have NOT NULL for every field and all fields have an appropriate DEFAULT of either 0, 0.00, empty string or …

---

## [Nested restful route param automagically populated on current page?](https://www.ruby-forum.com/t/nested-restful-route-param-automagically-populated-on-current-page/121767)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 6:51pm UTC](https://www.ruby-forum.com/t/nested-restful-route-param-automagically-populated-on-current-page/121767 "2007-11-30T18:51:37Z")

</div>

I’ve been trying to figure out why this works… link\_to “foo”, admin\_comments\_url() comments are a nested route of blogs, so it seems like that method would need the the blog param: admin\_comments\_url(@blog) However,…

---

## [Ruby on Rails VTC training DVD](https://www.ruby-forum.com/t/ruby-on-rails-vtc-training-dvd/121765)

<div class="topic-metadata">

**Author:** [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-vtc-training-dvd/121765 "2007-11-30T18:49:16Z")

</div>

If you are interested in Ruby on Rails training DVD published by Virtual Training Company please take a look at my Amazon listing (selling it at half price) TIA.

---

## [Actual flow of a redirect\_to](https://www.ruby-forum.com/t/actual-flow-of-a-redirect-to/121760)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 3\
**Last updated:** [November 30, 2007, 6:32pm UTC](https://www.ruby-forum.com/t/actual-flow-of-a-redirect-to/121760 "2007-11-30T18:32:16Z")

</div>

I’m working on implementing SSL in my application and I have a question about how redirect\_to actually works. Here’s a scenario: Suppose I want my login action to be available only over SSL so the username and passwor…

---

## [Weird problem : "No such file or directory " of rhtml file on rails](https://www.ruby-forum.com/t/weird-problem-no-such-file-or-directory-of-rhtml-file-on-rails/121762)

<div class="topic-metadata">

**Author:** [@cap](https://www.ruby-forum.com/u/cap)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 6:24pm UTC](https://www.ruby-forum.com/t/weird-problem-no-such-file-or-directory-of-rhtml-file-on-rails/121762 "2007-11-30T18:24:35Z")

</div>

I found a few errors in my production log like this below quote=\<\<LOG ActionView::TemplateError : No such file or directory - / path\_of\_rails\_app/public/…/config/…/app/views/layouts/ simple\_html.rhtml In app/views/l…

---

## [A bug of validates\_numericality\_of?](https://www.ruby-forum.com/t/a-bug-of-validates-numericality-of/121730)

<div class="topic-metadata">

**Author:** [@jan](https://www.ruby-forum.com/u/jan)\
**Replies:** 3\
**Last updated:** [November 30, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/a-bug-of-validates-numericality-of/121730 "2007-11-30T17:31:51Z")

</div>

Hi, In code like this validates\_numericality\_of :price the price is supposed to be a string in number format but can include other non-digital characters like ‘a’, since :only\_integer is set to false by default, ri…

---

## [Array vs Paginate::Collection - weirdness!](https://www.ruby-forum.com/t/array-vs-paginate-collection-weirdness/121763)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/array-vs-paginate-collection-weirdness/121763 "2007-11-30T17:09:54Z")

</div>

I’m using the will\_paginate plugin as well as has\_many\_polymorphs. I use the following code to get a list of all of my “Item” objects which have a specific tag: tagged = Tag.find\_by\_name(@search\_term).items I can th…

---

## [I have a small budget, where can I find a ruby programmer without breaking the bank?](https://www.ruby-forum.com/t/i-have-a-small-budget-where-can-i-find-a-ruby-programmer-without-breaking-the-bank/121722)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [November 30, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/i-have-a-small-budget-where-can-i-find-a-ruby-programmer-without-breaking-the-bank/121722 "2007-11-30T17:04:11Z")

</div>

I know everybody’s gotta eat, so I am trying to find someone who might not be a rails ninja, but has good core skills for a fun project I am working on. Any suggestions or thoughts of where or who I should talk to. Th…

---

## [Getting table field names from an object](https://www.ruby-forum.com/t/getting-table-field-names-from-an-object/121409)

<div class="topic-metadata">

**Author:** [@martinevans](https://www.ruby-forum.com/u/martinevans)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/getting-table-field-names-from-an-object/121409 "2007-11-30T16:38:34Z")

</div>

If I had the following @recipes = recipe.find\_all Is there a way to find all the field names returned by the query and the data in them. Thanks Martin

---

## [Help associating database tables](https://www.ruby-forum.com/t/help-associating-database-tables/121594)

<div class="topic-metadata">

**Author:** [@weloki](https://www.ruby-forum.com/u/weloki)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/help-associating-database-tables/121594 "2007-11-30T15:31:05Z")

</div>

I’m trying to write a mechanism to allow a user to input information about a phone call, including timestamps and various events, among other things. When a user clicks the New Call link from the main page, the New Ca…

---

## [Best hosting company?](https://www.ruby-forum.com/t/best-hosting-company/121689)

<div class="topic-metadata">

**Author:** [@pigeon\_blood\_red](https://www.ruby-forum.com/u/pigeon_blood_red)\
**Replies:** 7\
**Last updated:** [November 30, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/best-hosting-company/121689 "2007-11-30T15:26:51Z")

</div>

Not sure if this was the most appropriate place to post this question, but here goes. What hosting companies have you used that support Ruby & RoR, that you’ve had the best experience with? -Josh

---

## [In\_place\_edit with submit the forum](https://www.ruby-forum.com/t/in-place-edit-with-submit-the-forum/121753)

<div class="topic-metadata">

**Author:** [@karnirevuri](https://www.ruby-forum.com/u/karnirevuri)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/in-place-edit-with-submit-the-forum/121753 "2007-11-30T15:17:00Z")

</div>

Hi Friends, I have implemented in\_place\_edit, validations also customized the in\_place\_edit the buttons also But i need to submit the total form when we are the in\_place\_edit fields In my application, one select box…

---

## [Help After Installing Using Fink](https://www.ruby-forum.com/t/help-after-installing-using-fink/121531)

<div class="topic-metadata">

**Author:** [@djmook](https://www.ruby-forum.com/u/djmook)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 2:30pm UTC](https://www.ruby-forum.com/t/help-after-installing-using-fink/121531 "2007-11-30T14:30:59Z")

</div>

Hello! I have just finished installing ruby and gem using Fink and rails using the new gem, but I am now receiving an error when I try to use script/generate: lynxy:blog lynxy$ script/generate controller Blog ./scri…

---

## [Using cookies in a model](https://www.ruby-forum.com/t/using-cookies-in-a-model/121746)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/using-cookies-in-a-model/121746 "2007-11-30T14:20:09Z")

</div>

Well, let’s say I have an Article class. What I would like is being able to define a method like that : def rated? if cookies\[“rate-article-#{self.id.to\_s}”\] == “rated” true else false end end So that I can use …

---

## [Screwed Special Characters in an utf8 String Read From Database](https://www.ruby-forum.com/t/screwed-special-characters-in-an-utf8-string-read-from-database/121739)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/screwed-special-characters-in-an-utf8-string-read-from-database/121739 "2007-11-30T13:37:12Z")

</div>

Hello, I have a mysql database with a InnoDB table in utf8\_general\_ci encoding. Inside this table there is a column “path”, varchar(255), utf8\_general\_ci. What I am trying to do now, is to use this path from the data…

---

## [Find\_by\_sql preformance problems when ordering data](https://www.ruby-forum.com/t/find-by-sql-preformance-problems-when-ordering-data/121728)

<div class="topic-metadata">

**Author:** [@mgiorno](https://www.ruby-forum.com/u/mgiorno)\
**Replies:** 2\
**Last updated:** [November 30, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/find-by-sql-preformance-problems-when-ordering-data/121728 "2007-11-30T13:19:03Z")

</div>

Hi, I am bumping into a small problem I was hoping someone could send me in the right direction on. I’m counting votes from a votes table to try to find the top ten videos. The following works really well, until I tr…

---

## [Front End to ROR. Did anybody like Joomla or Drupal?](https://www.ruby-forum.com/t/front-end-to-ror-did-anybody-like-joomla-or-drupal/121655)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 7\
**Last updated:** [November 30, 2007, 11:13am UTC](https://www.ruby-forum.com/t/front-end-to-ror-did-anybody-like-joomla-or-drupal/121655 "2007-11-30T11:13:20Z")

</div>

Has anybody ever used Joomla! or Drupal as a front end to ROR? I was thinking of Drupal for this project for the content, and ROR for the business rules and data. Or would you recommend Joomla!? I will stuff it in m…

---

## [Plugin configuration](https://www.ruby-forum.com/t/plugin-configuration/121733)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [November 30, 2007, 10:39am UTC](https://www.ruby-forum.com/t/plugin-configuration/121733 "2007-11-30T10:39:03Z")

</div>

The common way to supply app specific configuration information for plugins appears to be defining constants at the top-level of one of the environment files. Even with config/initializers in Rails 2.0 this feels a bi…

---

## [Strange Array behaviour](https://www.ruby-forum.com/t/strange-array-behaviour/121651)

<div class="topic-metadata">

**Author:** [@xinit](https://www.ruby-forum.com/u/xinit)\
**Replies:** 3\
**Last updated:** [November 30, 2007, 10:38am UTC](https://www.ruby-forum.com/t/strange-array-behaviour/121651 "2007-11-30T10:38:26Z")

</div>

I’m having a strange thing when using the Enumerable extensions for Rails: Have a look at the following code: class Invoice \< ActiveRecord::Base has\_many :invoice\_lines def total invoice\_lines.sum(&:total) end en…

---

## [Computed Columns?](https://www.ruby-forum.com/t/computed-columns/121673)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 1\
**Last updated:** [November 30, 2007, 10:14am UTC](https://www.ruby-forum.com/t/computed-columns/121673 "2007-11-30T10:14:27Z")

</div>

Time to stretch. I want to acheive a find that returns a computed value as a column. I don’t know SQL (thanks to Rails hiding me from it up until now) and I don’t know if Rails will be able to help. Here’s my model. …

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

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