# Rails

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

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

---

## [Newbie question about views folder](https://www.ruby-forum.com/t/newbie-question-about-views-folder/189024)

<div class="topic-metadata">

**Author:** [@FrankMurphy](https://www.ruby-forum.com/u/FrankMurphy)\
**Replies:** 8\
**Last updated:** [May 23, 2010, 5:13pm UTC](https://www.ruby-forum.com/t/newbie-question-about-views-folder/189024 "2010-05-23T17:13:52Z")

</div>

Hi, I just started out learning Ruby on Rails this week. I’m using Michael Hartl’s book, but I’m working on a remote server rather than my local computer. As such, I’m using Apache + Passenger to deploy the example p…

---

## [What happens when Rails 1.3.5 is installed on top of 2.3.5?](https://www.ruby-forum.com/t/what-happens-when-rails-1-3-5-is-installed-on-top-of-2-3-5/188982)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 6\
**Last updated:** [May 23, 2010, 4:59pm UTC](https://www.ruby-forum.com/t/what-happens-when-rails-1-3-5-is-installed-on-top-of-2-3-5/188982 "2010-05-23T16:59:53Z")

</div>

On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using rails -v) and then I used gem install to install about 20 things, and maybe there was a line on the instructions that was there in the past that sa…

---

## [Rails default date format](https://www.ruby-forum.com/t/rails-default-date-format/188587)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 3\
**Last updated:** [May 23, 2010, 4:42pm UTC](https://www.ruby-forum.com/t/rails-default-date-format/188587 "2010-05-23T16:42:50Z")

</div>

Hello All, How can i convert the date format “2010-01-01” to rails default date format. I mean to “Fri, 14 May 2010”? Is there any built in function for it… Googled but …?

---

## [Rails 3 Error:uninitialized constant ActiveResource::Base](https://www.ruby-forum.com/t/rails-3-error-uninitialized-constant-activeresource-base/189057)

<div class="topic-metadata">

**Author:** [@DmitryPush](https://www.ruby-forum.com/u/DmitryPush)\
**Replies:** 0\
**Last updated:** [May 23, 2010, 2:25pm UTC](https://www.ruby-forum.com/t/rails-3-error-uninitialized-constant-activeresource-base/189057 "2010-05-23T14:25:53Z")

</div>

I’v just install rails3 for try it out. I was following “getting started guide”: rm public/index.html, change routes… and then i try to open page i’v got an error. OS: ubunto 10.04 Rails info: dpush@dpush-desktop:…

---

## [Extending a module in a controller](https://www.ruby-forum.com/t/extending-a-module-in-a-controller/189042)

<div class="topic-metadata">

**Author:** [@tobyr](https://www.ruby-forum.com/u/tobyr)\
**Replies:** 3\
**Last updated:** [May 23, 2010, 11:12am UTC](https://www.ruby-forum.com/t/extending-a-module-in-a-controller/189042 "2010-05-23T11:12:05Z")

</div>

I’m trying to extend Enumerable in my Rails app. I’ve started with just the controller where I wanted to use this method i.e. class LookupController \< ApplicationController module Enumerable def my\_compress … … bu…

---

## [Validating a form with a foreign key](https://www.ruby-forum.com/t/validating-a-form-with-a-foreign-key/189053)

<div class="topic-metadata">

**Author:** [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Replies:** 0\
**Last updated:** [May 23, 2010, 10:44am UTC](https://www.ruby-forum.com/t/validating-a-form-with-a-foreign-key/189053 "2010-05-23T10:44:51Z")

</div>

Hi there. I have a problem with validating a form, where is foreign key present. I have a table like this: id name password status\_id This is the way that status\_id is implemented to the users table. \<%= select\_t…

---

## [Why story.votes return Array, but story.votes.create works?](https://www.ruby-forum.com/t/why-story-votes-return-array-but-story-votes-create-works/189047)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 2\
**Last updated:** [May 23, 2010, 10:37am UTC](https://www.ruby-forum.com/t/why-story-votes-return-array-but-story-votes-create-works/189047 "2010-05-23T10:37:35Z")

</div>

In Ruby on Rails, say a Story object can “has\_many” Vote objects (a story is voted “hot” by many users). So when we do a s = Story.find(:first) “s” is a Story object, and say s.votes returns “\[\]” and s.votes.cla…

---

## [What does attachment\_fu do when saving?](https://www.ruby-forum.com/t/what-does-attachment-fu-do-when-saving/189052)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 0\
**Last updated:** [May 23, 2010, 8:58am UTC](https://www.ruby-forum.com/t/what-does-attachment-fu-do-when-saving/189052 "2010-05-23T08:58:12Z")

</div>

Hi, I have a model with attachment\_fu. The model saves images but I didn’t put validates\_as\_attachment. I understand that it takes long time to create an object as it has to process images. But I don’t understand wh…

---

## [Remote ActiveRecord relation (over network)](https://www.ruby-forum.com/t/remote-activerecord-relation-over-network/189043)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 0\
**Last updated:** [May 23, 2010, 12:28am UTC](https://www.ruby-forum.com/t/remote-activerecord-relation-over-network/189043 "2010-05-23T00:28:57Z")

</div>

Hi, I have a has and belongs to many relation between User and Article models, and I would like to link them even if an article if not hosted on the same database then a user. For example, If an article exists at htt…

---

## [No default .htaccess](https://www.ruby-forum.com/t/no-default-htaccess/188958)

<div class="topic-metadata">

**Author:** [@simon780](https://www.ruby-forum.com/u/simon780)\
**Replies:** 4\
**Last updated:** [May 22, 2010, 8:49pm UTC](https://www.ruby-forum.com/t/no-default-htaccess/188958 "2010-05-22T20:49:44Z")

</div>

Hey all! I just created my first RoR project (following this guide http://wiki.rubyonrails.org/start), and I had some trouble getting everything to work under apache with passenger. After some debugging I found out I…

---

## [Unit Test newbie problem](https://www.ruby-forum.com/t/unit-test-newbie-problem/188717)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 10\
**Last updated:** [May 22, 2010, 7:43pm UTC](https://www.ruby-forum.com/t/unit-test-newbie-problem/188717 "2010-05-22T19:43:59Z")

</div>

Hi All, I got a set of tests for a Ruby app. The first fails unexpectedly (“wrong number of args”). I added code to show that the app works as I think it should. Any ideas? The code is below: I’m running: Rails …

---

## [DatePicker in Lightbox](https://www.ruby-forum.com/t/datepicker-in-lightbox/189030)

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 0\
**Last updated:** [May 22, 2010, 1:53pm UTC](https://www.ruby-forum.com/t/datepicker-in-lightbox/189030 "2010-05-22T13:53:48Z")

</div>

Hi all… I use unobtrusive\_date\_picker plugin for getting date inputs. It works perfectly fine in a form on a normal page.But when I use the same on the lighbox window,the date\_picker doesn work. Kindly help me in res…

---

## [:body is not being stored in the database](https://www.ruby-forum.com/t/body-is-not-being-stored-in-the-database/189028)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 4\
**Last updated:** [May 22, 2010, 12:43pm UTC](https://www.ruby-forum.com/t/body-is-not-being-stored-in-the-database/189028 "2010-05-22T12:43:43Z")

</div>

Hello there, I have a blog that people can leave comments on. I have used the following code to attempt to save the comment value to the database: def comment @user = User.find(session\[:user\_id\]) Blogpost.find(par…

---

## [Validations for feedslinks](https://www.ruby-forum.com/t/validations-for-feedslinks/189029)

<div class="topic-metadata">

**Author:** [@12345](https://www.ruby-forum.com/u/12345)\
**Replies:** 0\
**Last updated:** [May 22, 2010, 8:49am UTC](https://www.ruby-forum.com/t/validations-for-feedslinks/189029 "2010-05-22T08:49:01Z")

</div>

Hi 2 all, i want code for “validation for Feed links” .plz let me know urgently.

---

## [\[Newbie question\] How does map.root?](https://www.ruby-forum.com/t/newbie-question-how-does-map-root/189020)

<div class="topic-metadata">

**Author:** [@distriker](https://www.ruby-forum.com/u/distriker)\
**Replies:** 1\
**Last updated:** [May 22, 2010, 4:45am UTC](https://www.ruby-forum.com/t/newbie-question-how-does-map-root/189020 "2010-05-22T04:45:31Z")

</div>

Hello, I am very ill and I don’t remember how does map.root. I have this in the routes.rb: ActionController::Routing::Routes.draw do |map| map.signup 'signup', :controller =\> 'users', :action =\> 'new' map.logout '…

---

## [Activerecord-postgresql-adapter](https://www.ruby-forum.com/t/activerecord-postgresql-adapter/189023)

<div class="topic-metadata">

**Author:** [@sivakumar](https://www.ruby-forum.com/u/sivakumar)\
**Replies:** 3\
**Last updated:** [May 22, 2010, 4:42am UTC](https://www.ruby-forum.com/t/activerecord-postgresql-adapter/189023 "2010-05-22T04:42:35Z")

</div>

Hello guys, here I am back with another problem I want to run postgresql as db and I guess I installed all the required gems gem list \*\*\* LOCAL GEMS \*\*\* abstract (1.0.0) actionmailer (3.0.0.beta3, 2.3.5) actionpac…

---

## [Set a title attribute for the text field inside rails form](https://www.ruby-forum.com/t/set-a-title-attribute-for-the-text-field-inside-rails-form/189000)

<div class="topic-metadata">

**Author:** [@mohammed\_a](https://www.ruby-forum.com/u/mohammed_a)\
**Replies:** 3\
**Last updated:** [May 22, 2010, 12:44am UTC](https://www.ruby-forum.com/t/set-a-title-attribute-for-the-text-field-inside-rails-form/189000 "2010-05-22T00:44:22Z")

</div>

Hi I am trying to set title attribute for the text filed inside a form using rails. I tried \<%= f.text\_field :email , :class =\> “autoclear”,:title =\> “title” %\>\</ p\> but it did not work I want it to produce this …

---

## [Routes :requirments](https://www.ruby-forum.com/t/routes-requirments/189014)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 1\
**Last updated:** [May 22, 2010, 12:26am UTC](https://www.ruby-forum.com/t/routes-requirments/189014 "2010-05-22T00:26:14Z")

</div>

I want to set a route :requirements on an array that verifies a particular parameter is included in an array. Something to the effect of: atypes = \[:culture, :personality, :communication\] map.with\_options(:path\_prefi…

---

## [SUMO, GSoC like project, to create sustainable software](https://www.ruby-forum.com/t/sumo-gsoc-like-project-to-create-sustainable-software/189017)

<div class="topic-metadata">

**Author:** [@Jean-Christophe\_Ker](https://www.ruby-forum.com/u/Jean-Christophe_Ker)\
**Replies:** 0\
**Last updated:** [May 22, 2010, 12:25am UTC](https://www.ruby-forum.com/t/sumo-gsoc-like-project-to-create-sustainable-software/189017 "2010-05-22T00:25:38Z")

</div>

Hi, I am Jean-christophe Kermagoret from SIDE-Labs. SIDE-Labs, founded by BlueXML, is an open source project which created a sustainable IDE, SIDE, based on MDA (Model Driven Architecture), to quickly develop sustain…

---

## [OpenID Authentication using AuthLogic](https://www.ruby-forum.com/t/openid-authentication-using-authlogic/189015)

<div class="topic-metadata">

**Author:** [@felix](https://www.ruby-forum.com/u/felix)\
**Replies:** 0\
**Last updated:** [May 22, 2010, 12:22am UTC](https://www.ruby-forum.com/t/openid-authentication-using-authlogic/189015 "2010-05-22T00:22:07Z")

</div>

Hi, I am trying to implement openid authentication using authlogic. I have installed the open\_id\_authentication in the process but when I entered rake open\_id\_authentication:db:create --trace I get the following erro…

---

## [How to override generated named route helpers?](https://www.ruby-forum.com/t/how-to-override-generated-named-route-helpers/188994)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 11:06pm UTC](https://www.ruby-forum.com/t/how-to-override-generated-named-route-helpers/188994 "2010-05-21T23:06:26Z")

</div>

Hey, where exactly are these methods defined? I’d like to use alias\_method to set some parameters before calling the original methods. Cheers, Szymon

---

## [Rake aborted ! while runing the migrations](https://www.ruby-forum.com/t/rake-aborted-while-runing-the-migrations/188917)

<div class="topic-metadata">

**Author:** [@vamsi](https://www.ruby-forum.com/u/vamsi)\
**Replies:** 1\
**Last updated:** [May 21, 2010, 8:34pm UTC](https://www.ruby-forum.com/t/rake-aborted-while-runing-the-migrations/188917 "2010-05-21T20:34:03Z")

</div>

Hi, When i ran the migrations rake db:migrate --trace rake is aborted and i got the following error. i’m unable to find out the solution for this , if any one knows please reply … H:\\current\>rake db:migrate --trace …

---

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

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [May 21, 2010, 6:43pm UTC](https://www.ruby-forum.com/t/help-with-relations/188998 "2010-05-21T18:43:08Z")

</div>

Hello I have the three database models: “seller”, “client” and “account”. A seller may have many clients and many accounts, but I would like to add the constraint that given a seller and a client, only one account ma…

---

## [Multiple Models one form and validations ... no transactions(mongo)](https://www.ruby-forum.com/t/multiple-models-one-form-and-validations-no-transactions-mongo/188999)

<div class="topic-metadata">

**Author:** [@magic6435](https://www.ruby-forum.com/u/magic6435)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/multiple-models-one-form-and-validations-no-transactions-mongo/188999 "2010-05-21T17:52:47Z")

</div>

I am trying to setup a sigup form thats pretty much just like the basecamp form. Basecamp Classic Signup I want to create a User a Studio and a Subscription(chargify) a Subscription belongs to a Studio and not to a…

---

## [Rails example projects](https://www.ruby-forum.com/t/rails-example-projects/188366)

<div class="topic-metadata">

**Author:** [@dkam](https://www.ruby-forum.com/u/dkam)\
**Replies:** 4\
**Last updated:** [May 21, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/rails-example-projects/188366 "2010-05-21T17:48:06Z")

</div>

a few months ago someone recommended grabbing gemcutter from github to review for best practices techniques. anyone know of some other quality sites that are on github as an example of best practices? just a noob try…

---

## [Toronto-Based Company Looking for System Administrator](https://www.ruby-forum.com/t/toronto-based-company-looking-for-system-administrator/189001)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 21, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/toronto-based-company-looking-for-system-administrator/189001 "2010-05-21T17:46:21Z")

</div>

Hello all: I am writing on behalf of Nanos Research, a premier market and public opinion research organization located in Toronto, ON. You can find more information about our company at http://www.nanosresearch.com. U…

---

## [List of radio buttons](https://www.ruby-forum.com/t/list-of-radio-buttons/188948)

<div class="topic-metadata">

**Author:** [@Smok](https://www.ruby-forum.com/u/Smok)\
**Replies:** 6\
**Last updated:** [May 21, 2010, 5:29pm UTC](https://www.ruby-forum.com/t/list-of-radio-buttons/188948 "2010-05-21T17:29:57Z")

</div>

I need to create in RoR 2.3.5 a list of questions ( the number of questions will be changing). The answers will be near to each of the these questions in radiobuttons (let’s say 3 radios near each of thequestions). Af…

---

## [Validates\_presence\_of fails on observer](https://www.ruby-forum.com/t/validates-presence-of-fails-on-observer/188956)

<div class="topic-metadata">

**Author:** [@Jonhy\_P](https://www.ruby-forum.com/u/Jonhy_P)\
**Replies:** 2\
**Last updated:** [May 21, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/validates-presence-of-fails-on-observer/188956 "2010-05-21T17:21:10Z")

</div>

Hi, I have the following model that uses the plugin act\_as\_voteable: class Video \< ActiveRecord::Base belongs\_to :user acts\_as\_voteable acts\_as\_commentable attr\_accessible :url, :title, :description, :vote\_count v…

---

## [Localize and lambdas](https://www.ruby-forum.com/t/localize-and-lambdas/186418)

<div class="topic-metadata">

**Author:** [@rob-twf](https://www.ruby-forum.com/u/rob-twf)\
**Replies:** 3\
**Last updated:** [May 21, 2010, 4:24pm UTC](https://www.ruby-forum.com/t/localize-and-lambdas/186418 "2010-05-21T16:24:58Z")

</div>

Since localize was changed to go via translate rather than directly resolving, it seems lambdas no longer work. The problem being that the lambda is called in translate, which doesn’t have access to the object being l…

---

## [DISTINCT field name dosen't give the expected output](https://www.ruby-forum.com/t/distinct-field-name-dosent-give-the-expected-output/188983)

<div class="topic-metadata">

**Author:** [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Replies:** 2\
**Last updated:** [May 21, 2010, 3:42pm UTC](https://www.ruby-forum.com/t/distinct-field-name-dosent-give-the-expected-output/188983 "2010-05-21T15:42:13Z")

</div>

i used the bellow code to collect the lyrics which are related to particular album and display under the album name. Lyric.find(:all,:select=\>‘DISTINCT album\_name,title,id,singers’,:conditions=\> \[“album\_name LIKE ?”, …

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

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