# Rails

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

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

---

## [Has and belongs to many](https://www.ruby-forum.com/t/has-and-belongs-to-many/134097)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 5\
**Last updated:** [April 7, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many/134097 "2008-04-07T22:42:00Z")

</div>

Hello, I’ve searched but I can’t find a good tutorial to has and belongs to many. What should both of my models, Games and Players, look like if a game has many players and a player has many games. Also when I create…

---

## [Simple active record issue. I must be missing something](https://www.ruby-forum.com/t/simple-active-record-issue-i-must-be-missing-something/134100)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 2\
**Last updated:** [April 7, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/simple-active-record-issue-i-must-be-missing-something/134100 "2008-04-07T22:36:02Z")

</div>

Here’s a seemingly simple ActiveRecord use case. I have Projects and Users. Each project has a single team leader as well as a review team that consists of several users. I would like to use the same User model for…

---

## [Beginning Programmer](https://www.ruby-forum.com/t/beginning-programmer/134029)

<div class="topic-metadata">

**Author:** [@Qbert](https://www.ruby-forum.com/u/Qbert)\
**Replies:** 4\
**Last updated:** [April 7, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/beginning-programmer/134029 "2008-04-07T22:27:48Z")

</div>

Hello. I am somewhat of a novice when it comes to programming. To begin programming in RoR, what other programming languages should I know, and what is the reading material I should study? Thanks for any feedback

---

## [\[ANN\] Ruby Mendicant Project Selected](https://www.ruby-forum.com/t/ann-ruby-mendicant-project-selected/196631)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 4\
**Last updated:** [April 7, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/ann-ruby-mendicant-project-selected/196631 "2008-04-07T22:23:33Z")

</div>

Hi Folks, I’m happy to announce that after donations closed, I received a total of 22 weeks of funding. After inviting the community to participate in open discussion on the Ruby Mendicant mailing list, as well as c…

---

## [Memory Consumption issues](https://www.ruby-forum.com/t/memory-consumption-issues/133575)

<div class="topic-metadata">

**Author:** [@djohn](https://www.ruby-forum.com/u/djohn)\
**Replies:** 8\
**Last updated:** [April 7, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/memory-consumption-issues/133575 "2008-04-07T22:10:07Z")

</div>

Greetings, I’ve recently deployed an app that is having some serious memory consumption issue. Dropping mongrels quite frequently when the threshold is met. Initially, we chalked this problem up to RMagick (I know, …

---

## [Link\_to only links to current controller?](https://www.ruby-forum.com/t/link-to-only-links-to-current-controller/134099)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/link-to-only-links-to-current-controller/134099 "2008-04-07T21:42:44Z")

</div>

This is really confusing to me- I have some code in a page on the site I’m working on that works absolutely fine on one version of the code and totally doesn’t work on a newer version, in spite of the fact I can see n…

---

## [Nesting a singular resource](https://www.ruby-forum.com/t/nesting-a-singular-resource/134095)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/nesting-a-singular-resource/134095 "2008-04-07T21:21:06Z")

</div>

I have two resources in my routes.rb; map.resource :people, :controller =\> :people do |people| people.resource :a\_to\_z, :controller =\> :people\_a\_to\_z end map.resources :groups do |groups| groups.resource :a\_to\_z, :c…

---

## [Ecommerce digital products using ROR](https://www.ruby-forum.com/t/ecommerce-digital-products-using-ror/133484)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 4\
**Last updated:** [April 7, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/ecommerce-digital-products-using-ror/133484 "2008-04-07T21:11:06Z")

</div>

Hello list, I have been searching the web for an open source project that does ecommerce for digital products (ebooks, music etc). I haven’t found anything as of yet. I am wondering if anyone knows of any open sourc…

---

## [Mysql gem](https://www.ruby-forum.com/t/mysql-gem/133999)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 10\
**Last updated:** [April 7, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/mysql-gem/133999 "2008-04-07T20:51:57Z")

</div>

Hi. I’m new on Ruby on Rails, on a Mac OS X 10.5. I’m working with Aptana and I’ve got an message error telling me to install mysql via gem. But when I’m doing gem install mysql, i’ve got this message : Building nat…

---

## [Naked and Funny Skeleton](https://www.ruby-forum.com/t/naked-and-funny-skeleton/134090)

<div class="topic-metadata">

**Author:** [@roman8111](https://www.ruby-forum.com/u/roman8111)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/naked-and-funny-skeleton/134090 "2008-04-07T20:37:27Z")

</div>

http://rozrywka.yeba.pl/show.php?id=1522

---

## [RESTful Named Routes](https://www.ruby-forum.com/t/restful-named-routes/134021)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 2\
**Last updated:** [April 7, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/restful-named-routes/134021 "2008-04-07T20:29:41Z")

</div>

Hi, I’m writing a blog engine using Rails and have removed the default route because I want to use RESTful URLs that have the form /yyyy/mm/dd/slug I’ve added some named routes for showing and editing posts that work …

---

## [Button position](https://www.ruby-forum.com/t/button-position/134038)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 5\
**Last updated:** [April 7, 2008, 8:03pm UTC](https://www.ruby-forum.com/t/button-position/134038 "2008-04-07T20:03:32Z")

</div>

hi all, im having a form and a back button like this in my view page like this \<% form\_tag %\> \<% submit\_tag %\> \<% end %\> \<% button\_link,‘back’ %\> but in view page the button\_link is coming always down to subm…

---

## [How to get thousands of people to send you $20 each!](https://www.ruby-forum.com/t/how-to-get-thousands-of-people-to-send-you-20-each/134087)

<div class="topic-metadata">

**Author:** [@aaflsahc](https://www.ruby-forum.com/u/aaflsahc)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/how-to-get-thousands-of-people-to-send-you-20-each/134087 "2008-04-07T19:13:50Z")

</div>

How to get thousands of people to send you $20 each! A fully automated website that literally does the selling for you. Receive money daily, paid directly to your merchant account! 100% commissions from one incredible…

---

## [Saving attribute](https://www.ruby-forum.com/t/saving-attribute/134046)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 7\
**Last updated:** [April 7, 2008, 7:03pm UTC](https://www.ruby-forum.com/t/saving-attribute/134046 "2008-04-07T19:03:15Z")

</div>

Something is getting lost here. def create @home = Team.find\_by\_user\_id(current\_user.id) for player in @home.players player.update\_attribute(:game\_id, @game.id) end end def show @players = Player.find\_all\_by\_game…

---

## [Rails: command not found](https://www.ruby-forum.com/t/rails-command-not-found/134084)

<div class="topic-metadata">

**Author:** [@foottuns](https://www.ruby-forum.com/u/foottuns)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 6:30pm UTC](https://www.ruby-forum.com/t/rails-command-not-found/134084 "2008-04-07T18:30:03Z")

</div>

I installed ruby, gem and then Rails. Rails seems to be installed (gem list --local), but when I run it, I get the “rails: command not found” message. My linux $PATH is /usr/local/bin:/usr/bin:/bin:/usr/games. I did …

---

## [Access association data via instance variable](https://www.ruby-forum.com/t/access-association-data-via-instance-variable/134063)

<div class="topic-metadata">

**Author:** [@rashantha](https://www.ruby-forum.com/u/rashantha)\
**Replies:** 4\
**Last updated:** [April 7, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/access-association-data-via-instance-variable/134063 "2008-04-07T18:29:01Z")

</div>

i thought this was possible but it is not working for me. @items = Items.find(:all) in the view via a loop the goes thru all the rows. item.relationship.related\_table\_col this The error occurred while evaluating nil.…

---

## [How do I code this anchor tag as a link\_to in Rails?](https://www.ruby-forum.com/t/how-do-i-code-this-anchor-tag-as-a-link-to-in-rails/134076)

<div class="topic-metadata">

**Author:** [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Replies:** 5\
**Last updated:** [April 7, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/how-do-i-code-this-anchor-tag-as-a-link-to-in-rails/134076 "2008-04-07T18:17:01Z")

</div>

I’m trying to code this anchor tag in Rails. It’s just a link to use scriptaculous to “blind” open a div that I’ve got hidden by default. Add comment Also, how would Rails degrade this link if javascript was disabled…

---

## [Help: odd results from many-to-many self-referential relationship with attribute in join table](https://www.ruby-forum.com/t/help-odd-results-from-many-to-many-self-referential-relationship-with-attribute-in-join-table/134037)

<div class="topic-metadata">

**Author:** [@MaddyTheGoose](https://www.ruby-forum.com/u/MaddyTheGoose)\
**Replies:** 4\
**Last updated:** [April 7, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/help-odd-results-from-many-to-many-self-referential-relationship-with-attribute-in-join-table/134037 "2008-04-07T18:16:06Z")

</div>

I’m having an issue with the data returning from a self-referential many-to-many relationship with an attribute in the join table that’s being used to limit the query. I’ll explain what I’m doing below which will then…

---

## [Custom sql query](https://www.ruby-forum.com/t/custom-sql-query/134079)

<div class="topic-metadata">

**Author:** [@fero](https://www.ruby-forum.com/u/fero)\
**Replies:** 1\
**Last updated:** [April 7, 2008, 5:31pm UTC](https://www.ruby-forum.com/t/custom-sql-query/134079 "2008-04-07T17:31:14Z")

</div>

Hello. How can I run custom slq query? I want to delete all rows from table, which is not mapped to activerecord model. Thanks. Fero.

---

## [Ho to develop an application RoR tutorial](https://www.ruby-forum.com/t/ho-to-develop-an-application-ror-tutorial/134007)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 6\
**Last updated:** [April 7, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/ho-to-develop-an-application-ror-tutorial/134007 "2008-04-07T17:24:47Z")

</div>

Hi all I am looking for tutorials that explain how to develop a whole application in RoR. I have found only two by the moment: Tutorial on developing a Facebook application using Ruby on Rails Rolling with Ruby o…

---

## [Fixtures subdirectories](https://www.ruby-forum.com/t/fixtures-subdirectories/134078)

<div class="topic-metadata">

**Author:** [@bhus](https://www.ruby-forum.com/u/bhus)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/fixtures-subdirectories/134078 "2008-04-07T17:15:17Z")

</div>

I have been working with testing and fixtures for the last week, and have come to a seeming realization that rails will only load fixtures from one directory per each test file (this seems a little un-DRY to me). Am I…

---

## [Two alias\_method\_chain calls: first works second doesn't](https://www.ruby-forum.com/t/two-alias-method-chain-calls-first-works-second-doesnt/133635)

<div class="topic-metadata">

**Author:** [@jobu](https://www.ruby-forum.com/u/jobu)\
**Replies:** 7\
**Last updated:** [April 7, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/two-alias-method-chain-calls-first-works-second-doesnt/133635 "2008-04-07T17:14:42Z")

</div>

In the example code in this Pastie Parked at Loopia, I’m observing behavior I can’t explain. I’m making two calls to alias\_method\_chain to extend create\_table and drop\_table. The create\_table alias chain works as ex…

---

## [Fixtures subdirectories](https://www.ruby-forum.com/t/fixtures-subdirectories/134075)

<div class="topic-metadata">

**Author:** [@bhus](https://www.ruby-forum.com/u/bhus)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/fixtures-subdirectories/134075 "2008-04-07T16:58:07Z")

</div>

I have been working with testing and fixtures for the last week, and have come to a seeming realization that rails will only load fixtures from one directory per each test file. This seems a little un-DRY to me. Am I …

---

## [Fixtures subdirectories](https://www.ruby-forum.com/t/fixtures-subdirectories/134073)

<div class="topic-metadata">

**Author:** [@bhus](https://www.ruby-forum.com/u/bhus)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/fixtures-subdirectories/134073 "2008-04-07T16:54:01Z")

</div>

I have been dealing with fixtures and testing over the last week and I have yet to be able to find a nice way to load fixtures from multiple directories into the same test file. Am I mistaken? Or is this intentional? …

---

## [Action to receive file in request body](https://www.ruby-forum.com/t/action-to-receive-file-in-request-body/134072)

<div class="topic-metadata">

**Author:** [@arunprabu](https://www.ruby-forum.com/u/arunprabu)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 4:48pm UTC](https://www.ruby-forum.com/t/action-to-receive-file-in-request-body/134072 "2008-04-07T16:48:42Z")

</div>

Hi, I have a requirement in which I have to host a URL to which another external application will send a file. This will not have any param name or query string. Basically, the external application will open the URL …

---

## [Remote\_form\_for problem](https://www.ruby-forum.com/t/remote-form-for-problem/134071)

<div class="topic-metadata">

**Author:** [@akshay\_r](https://www.ruby-forum.com/u/akshay_r)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 4:48pm UTC](https://www.ruby-forum.com/t/remote-form-for-problem/134071 "2008-04-07T16:48:07Z")

</div>

‘remote\_form\_for’ gets confused while generating form params for a form. Html and params as a result of submit are pasted here - http://pastie.caboo.se/176535 Works fine when used with a form\_for. Is there are clean …

---

## [AJAX and master/slave architecture](https://www.ruby-forum.com/t/ajax-and-master-slave-architecture/134061)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/ajax-and-master-slave-architecture/134061 "2008-04-07T16:01:20Z")

</div>

Hi \*, I’m scaling a pretty huge application written in RoR. I’ve decided to have n read-only slave databases, and a single master for write operations. The problem I’m facing is that when I write using Ajax calls the …

---

## [How to access / output the contents of an array?](https://www.ruby-forum.com/t/how-to-access-output-the-contents-of-an-array/133893)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 5\
**Last updated:** [April 7, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/how-to-access-output-the-contents-of-an-array/133893 "2008-04-07T15:21:53Z")

</div>

Hi there, How can I access and output the contents of the following array? \<%= User.find(:all, :conditions =\> { …whatever\_conditions… }) %\> When I try by simply adding a .join(", ") to the array, like so… \<%= User.fi…

---

## [Problem with Productized Rails Application](https://www.ruby-forum.com/t/problem-with-productized-rails-application/134060)

<div class="topic-metadata">

**Author:** [@soni\_rajesh](https://www.ruby-forum.com/u/soni_rajesh)\
**Replies:** 1\
**Last updated:** [April 7, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/problem-with-productized-rails-application/134060 "2008-04-07T15:17:44Z")

</div>

Hi, i have a query regarding Productized Rails Application and referring http://wiki.rubyonrails.com/rails/pages/RailsProductGenerator with following gems \*\*\* LOCAL GEMS \*\*\*: actionmailer (1.3.3, 1.0.1) actionpack (…

---

## [Setting model attributes](https://www.ruby-forum.com/t/setting-model-attributes/134045)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 2\
**Last updated:** [April 7, 2008, 1:27pm UTC](https://www.ruby-forum.com/t/setting-model-attributes/134045 "2008-04-07T13:27:48Z")

</div>

Hi, I’d like to clear up a hole in my understanding. Why does the following not work in a model: def update\_a\_model\_attribute(new\_value) @model\_attribute = new\_value save end But the following does: def update\_a\_…

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

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