# Rails

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

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

---

## [First attempt: array of hashes, please help](https://www.ruby-forum.com/t/first-attempt-array-of-hashes-please-help/226024)

<div class="topic-metadata">

**Author:** [@caiwangqin](https://www.ruby-forum.com/u/caiwangqin)\
**Replies:** 8\
**Last updated:** [August 24, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/first-attempt-array-of-hashes-please-help/226024 "2008-08-24T19:36:09Z")

</div>

Hello, I’ve been working on this project quite a bit. I’m very enthusiastic about learning Ruby, and have done my best to comment with MARKERs where the problems are or may be. The hurdle is that I need output to pr…

---

## [\<%= yield :article %\>\<%= yield :agentur %\>](https://www.ruby-forum.com/t/yield-article-yield-agentur/146666)

<div class="topic-metadata">

**Author:** [@ramiz](https://www.ruby-forum.com/u/ramiz)\
**Replies:** 2\
**Last updated:** [August 24, 2008, 7:30pm UTC](https://www.ruby-forum.com/t/yield-article-yield-agentur/146666 "2008-08-24T19:30:38Z")

</div>

Hi i start my first project in ruby on rails and i dont know how to add to yields in one layout. i tried this but it dont works: folder strucur in view is: app/views/agenturs/index.html.erb app/views/articles/index.h…

---

## [To\_json of hash containing an array](https://www.ruby-forum.com/t/to-json-of-hash-containing-an-array/146720)

<div class="topic-metadata">

**Author:** [@Mads\_K](https://www.ruby-forum.com/u/Mads_K)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/to-json-of-hash-containing-an-array/146720 "2008-08-24T19:28:52Z")

</div>

Hi there, I am fairly new to the Rails framework, so forgive me if there is an obvious solution to this problem. I am using Rails 2.1.0 and trying to jsonify a hash containing an array. E.g. result = { :name =\> “M…

---

## [Avoiding exceptions in views](https://www.ruby-forum.com/t/avoiding-exceptions-in-views/146715)

<div class="topic-metadata">

**Author:** [@fox](https://www.ruby-forum.com/u/fox)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/avoiding-exceptions-in-views/146715 "2008-08-24T19:18:19Z")

</div>

when rendering a view, if the object being rendered doesn’t respond to a method it raises an error message. For example, I have an Employee class and each employee has many Tasks. So I may call: \<%= employee.tasks.fi…

---

## [Validations (when not saving to the database)](https://www.ruby-forum.com/t/validations-when-not-saving-to-the-database/146719)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/validations-when-not-saving-to-the-database/146719 "2008-08-24T18:12:09Z")

</div>

I’ve setup a quoting system that does a quick job of displaying a price to a user. I works ok but I need to validate that the user has actually selected a course and a duration, hopefully with a feedback message. At t…

---

## [Form GET / POST problem](https://www.ruby-forum.com/t/form-get-post-problem/146497)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 4\
**Last updated:** [August 24, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/form-get-post-problem/146497 "2008-08-24T16:13:14Z")

</div>

I have a search form on page. It works fine, but if user give a search word by typing it in URL: http://domain.com/search/?word=searchword After that search form dosn’t work any more, because form post data to this U…

---

## [Alternatives to yield?!](https://www.ruby-forum.com/t/alternatives-to-yield/146695)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/alternatives-to-yield/146695 "2008-08-24T14:27:18Z")

</div>

Hello, I’m currently programming on a website and after quite some work I figured out that I need a sidebar too but there’s a lot already coded so I can’t really change yield because I would have to need to add the s…

---

## [Passing Parameters](https://www.ruby-forum.com/t/passing-parameters/146699)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 14\
**Last updated:** [August 24, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/passing-parameters/146699 "2008-08-24T14:14:30Z")

</div>

I’ve been away from rails for a while but now wanna get back into it and I guess my rails foo has got rusty. I’ve been wrestling with this simple! problem for the weekend and I can’t fix it - driving me nuts. Real cry…

---

## [Question about ActiveRecord assoication and :join](https://www.ruby-forum.com/t/question-about-activerecord-assoication-and-join/146662)

<div class="topic-metadata">

**Author:** [@cobra050](https://www.ruby-forum.com/u/cobra050)\
**Replies:** 13\
**Last updated:** [August 24, 2008, 2:03pm UTC](https://www.ruby-forum.com/t/question-about-activerecord-assoication-and-join/146662 "2008-08-24T14:03:16Z")

</div>

Hi, I have two tables, “users” and “users\_emails”. users have the following columns: |id|name| users\_emails have the following columns: |user\_id|email| The classes look like the following: class UsersEmail\< ActiveRe…

---

## [Re: PossibilitÃ© d'executer une application da ns](https://www.ruby-forum.com/t/re-possibilita-dexecuter-une-application-da-ns/146708)

<div class="topic-metadata">

**Author:** [@fcheung](https://www.ruby-forum.com/u/fcheung)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/re-possibilita-dexecuter-une-application-da-ns/146708 "2008-08-24T13:56:50Z")

</div>

On 24 Aug 2008, at 11:18, Goli S. removed\_email\_address@domain.invalid wrote: Bonjour, J’ai besoin d’executer mon application qui est en Ruby on Rails dans un autre ordinateur o¨´ Ruby n’est pas install¨¦ (Comme de…

---

## [Re: PossibilitÃ© d'executer une application da ns](https://www.ruby-forum.com/t/re-possibilita-dexecuter-une-application-da-ns/146707)

<div class="topic-metadata">

**Author:** [@fcheung](https://www.ruby-forum.com/u/fcheung)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/re-possibilita-dexecuter-une-application-da-ns/146707 "2008-08-24T13:56:15Z")

</div>

On 24 Aug 2008, at 11:18, Goli S. removed\_email\_address@domain.invalid wrote: Bonjour, J’ai besoin d’executer mon application qui est en Ruby on Rails dans un autre ordinateur o¨´ Ruby n’est pas install¨¦ (Comme de…

---

## [Rails & searching](https://www.ruby-forum.com/t/rails-searching/146706)

<div class="topic-metadata">

**Author:** [@blueshadow](https://www.ruby-forum.com/u/blueshadow)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 1:07pm UTC](https://www.ruby-forum.com/t/rails-searching/146706 "2008-08-24T13:07:25Z")

</div>

Hello! I’m trying to find a spider$search engine for indexing web sites like http://www.sphider.eu/ but for rails 2.0 and write’n in ruby lang… Thanks!

---

## [PossibilitÃ© d'executer une application dans](https://www.ruby-forum.com/t/possibilita-dexecuter-une-application-dans/146701)

<div class="topic-metadata">

**Author:** [@golshif](https://www.ruby-forum.com/u/golshif)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 12:18pm UTC](https://www.ruby-forum.com/t/possibilita-dexecuter-une-application-dans/146701 "2008-08-24T12:18:28Z")

</div>

Bonjour, J’ai besoin d’executer mon application qui est en Ruby on Rails dans un autre ordinateur oÃ¹ Ruby n’est pas installÃ© (Comme des fichiers .jar en java, qui permet d’executer l’application dans n’importe quel …

---

## [Creating a user page](https://www.ruby-forum.com/t/creating-a-user-page/146694)

<div class="topic-metadata">

**Author:** [@tyliong](https://www.ruby-forum.com/u/tyliong)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 8:41am UTC](https://www.ruby-forum.com/t/creating-a-user-page/146694 "2008-08-24T08:41:19Z")

</div>

Hi, i need to create a user page that can search and add objects to a cart Step by step of how app should work: User logins on the side bar there is a search box where i search for objects and the objects are di…

---

## [Missing will\_paginate](https://www.ruby-forum.com/t/missing-will-paginate/146434)

<div class="topic-metadata">

**Author:** [@THEBIGO](https://www.ruby-forum.com/u/THEBIGO)\
**Replies:** 9\
**Last updated:** [August 24, 2008, 6:11am UTC](https://www.ruby-forum.com/t/missing-will-paginate/146434 "2008-08-24T06:11:42Z")

</div>

I’m not sure why i am having this problem but when i execute a call to the calls controller from a link \<%= link\_to\_unless\_current 'My Call Book', { :controller =\> "calls", :action =\> "index" } %\> :: I…

---

## [Cartographer help](https://www.ruby-forum.com/t/cartographer-help/110097)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 6:04am UTC](https://www.ruby-forum.com/t/cartographer-help/110097 "2008-08-24T06:04:22Z")

</div>

I am trying to use the cartographer plugin. I downloaded the trunk of the plugins folder and placed it into the vendor/plugins folder. I read the README file and it said to place the Cartographer.rb file in the verndo…

---

## [Having trouble setting up model relationships](https://www.ruby-forum.com/t/having-trouble-setting-up-model-relationships/146655)

<div class="topic-metadata">

**Author:** [@ressister](https://www.ruby-forum.com/u/ressister)\
**Replies:** 2\
**Last updated:** [August 24, 2008, 5:41am UTC](https://www.ruby-forum.com/t/having-trouble-setting-up-model-relationships/146655 "2008-08-24T05:41:18Z")

</div>

I’m working on a new project, and I’m stuck on making some seemingly simple model associations work. I have the following models which I’m trying to get to play nice: entry belongs\_to :users has\_and\_belongs\_to\_man…

---

## [About active record read and write attributes](https://www.ruby-forum.com/t/about-active-record-read-and-write-attributes/146622)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 3\
**Last updated:** [August 24, 2008, 4:08am UTC](https://www.ruby-forum.com/t/about-active-record-read-and-write-attributes/146622 "2008-08-24T04:08:49Z")

</div>

I have read the rails documents about the active record read and write attributes.They says reading attributes have typecast automaticly running behind. But i wonder if this typecast works even the active record objec…

---

## [Ruby on rails wth php](https://www.ruby-forum.com/t/ruby-on-rails-wth-php/146569)

<div class="topic-metadata">

**Author:** [@redster](https://www.ruby-forum.com/u/redster)\
**Replies:** 6\
**Last updated:** [August 24, 2008, 3:36am UTC](https://www.ruby-forum.com/t/ruby-on-rails-wth-php/146569 "2008-08-24T03:36:42Z")

</div>

Hi all, if any one help me. how to run php programs on ruby on rails. how to run php programs on rails. if possible or not pls give me instructions. Thanks karthik

---

## [Check\_box with problem](https://www.ruby-forum.com/t/check-box-with-problem/146577)

<div class="topic-metadata">

**Author:** [@maite](https://www.ruby-forum.com/u/maite)\
**Replies:** 8\
**Last updated:** [August 24, 2008, 2:05am UTC](https://www.ruby-forum.com/t/check-box-with-problem/146577 "2008-08-24T02:05:28Z")

</div>

hello list!!! I have this in my proyect in my controller def elegir @mercado=Mercado.find(:all) @empresas=Empresa.find(:first) respond\_to do |format| format.html {render :layout =\> false} end end elegir view is …

---

## [Adding style attribute to authenticity\_token](https://www.ruby-forum.com/t/adding-style-attribute-to-authenticity-token/146579)

<div class="topic-metadata">

**Author:** [@christoph](https://www.ruby-forum.com/u/christoph)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/adding-style-attribute-to-authenticity-token/146579 "2008-08-23T23:51:34Z")

</div>

Hi all ! Whenever I call form\_for a div with margin:0 and padding:0 is created. Not only that is the default value in my application.css, I have no chance to override this attribute. In my application I display a list …

---

## [Annotate\_models duplicates comments](https://www.ruby-forum.com/t/annotate-models-duplicates-comments/146678)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/annotate-models-duplicates-comments/146678 "2008-08-23T23:51:01Z")

</div>

Wondering if anyone else has seen this behavior. When I run annotate\_models now, instead of overwriting the previous comment which lists all of the fields for my model’s backing table, it inserts another comment and l…

---

## [Where to "spawn" (background tasks in a rails app)](https://www.ruby-forum.com/t/where-to-spawn-background-tasks-in-a-rails-app/146676)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 11:20pm UTC](https://www.ruby-forum.com/t/where-to-spawn-background-tasks-in-a-rails-app/146676 "2008-08-23T23:20:51Z")

</div>

My rails app is using the spawn plugin to run some background tasks. I’m wondering what is the most appropriate place to put a call to startup those tasks. I’m thinking probably somewhere in boot.rb, though I’m not su…

---

## [Understanding how DB migrations are applied to test databases](https://www.ruby-forum.com/t/understanding-how-db-migrations-are-applied-to-test-databases/146674)

<div class="topic-metadata">

**Author:** [@User2084](https://www.ruby-forum.com/u/User2084)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/understanding-how-db-migrations-are-applied-to-test-databases/146674 "2008-08-23T22:44:19Z")

</div>

Hi. I am a new Rails developer. So far my experiences with the framework has been very positive, and I’m excited to become a part of Rails dev community. I’ve started working on my first Rails application, and ran int…

---

## [Best way to define assocations](https://www.ruby-forum.com/t/best-way-to-define-assocations/146673)

<div class="topic-metadata">

**Author:** [@rnew](https://www.ruby-forum.com/u/rnew)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/best-way-to-define-assocations/146673 "2008-08-23T22:36:48Z")

</div>

I think this is an easy question, but i just don’t know the best way to do this. I have the following tables: Exercises Biking\_details Running\_details. as you can see i have 2 kinds of Excercises: running and biking …

---

## [How to find/open Spec::Expectations and Spec::Matchers](https://www.ruby-forum.com/t/how-to-find-open-spec-expectations-and-spec-matchers/146592)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 2\
**Last updated:** [August 23, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/how-to-find-open-spec-expectations-and-spec-matchers/146592 "2008-08-23T22:36:43Z")

</div>

Hi, Then RSpec 1.4 recommends, in the webpage http://rspec.info/documentation/expectations.html, referencing the subject items. I’m running ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-mswin32\] over WinXP-Pro/SP2. I…

---

## [Simple localization in Rails 2.2](https://www.ruby-forum.com/t/simple-localization-in-rails-2-2/146669)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/simple-localization-in-rails-2-2/146669 "2008-08-23T22:14:29Z")

</div>

Does it works in Rails 2.1? http://almosteffortless.com/2008/07/21/simple-localization-in-rails-22/ If not, where I can get Rails 2.2 BETA to test this?

---

## [Select only if exist?](https://www.ruby-forum.com/t/select-only-if-exist/146640)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [August 23, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/select-only-if-exist/146640 "2008-08-23T20:52:07Z")

</div>

I have a table for neighborhoods with a name and an id Also have a table for assets, each asset have a neighborhood\_id Asset model =\> belongs to neighborhood Neighborhood model =\> has many assets I have a page where …

---

## [From Builders - Plugin, Custom, or None](https://www.ruby-forum.com/t/from-builders-plugin-custom-or-none/146657)

<div class="topic-metadata">

**Author:** [@sshefer](https://www.ruby-forum.com/u/sshefer)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/from-builders-plugin-custom-or-none/146657 "2008-08-23T19:40:25Z")

</div>

Hi Everyone, I’ve been scouring the web for different form builder plugins but have found few that are currently maintained or have good documentation. I’ve tried everything out there but nothing seems to work really …

---

## [Web Game Written in Rails - Restful or No?](https://www.ruby-forum.com/t/web-game-written-in-rails-restful-or-no/146650)

<div class="topic-metadata">

**Author:** [@yinkyank](https://www.ruby-forum.com/u/yinkyank)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/web-game-written-in-rails-restful-or-no/146650 "2008-08-23T18:02:41Z")

</div>

Writing a simple web game in Rails and wondering in the case of an application like a game whether there’s any point to doing things RESTfully? It’s not an application where I can imagine clients needing to connect an…

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

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