# Rails

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

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

---

## [Stock market company codes?](https://www.ruby-forum.com/t/stock-market-company-codes/134379)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/stock-market-company-codes/134379 "2008-04-18T17:30:45Z")

</div>

hi i’m building a little app to return the stock prices for companies using their company codes, e.g. Google Corp =\> GOOG All going good, but the major problem stopping me is getting a list of all possible company sto…

---

## [Problems with link\_to](https://www.ruby-forum.com/t/problems-with-link-to/135140)

<div class="topic-metadata">

**Author:** [@claus](https://www.ruby-forum.com/u/claus)\
**Replies:** 8\
**Last updated:** [April 18, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/problems-with-link-to/135140 "2008-04-18T17:24:54Z")

</div>

ddaccordion.init({ headerclass: "expandable", ..... \</script \<%= link\_to "institut", {:controller =\> "news"} %\> i have an accordion navigation and the headers, which should expand on click, should …

---

## [Crazy Partials](https://www.ruby-forum.com/t/crazy-partials/135103)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 5\
**Last updated:** [April 18, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/crazy-partials/135103 "2008-04-18T17:15:25Z")

</div>

I have this in a view: \<%= render :partial =\> "new", :locals =\> { :game =\> @game, :action =\> action, :count =\> count } %\> \<% elsif action.hit %\> \<%= render :parti…

---

## [Database modeling](https://www.ruby-forum.com/t/database-modeling/135083)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 1\
**Last updated:** [April 18, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/database-modeling/135083 "2008-04-18T17:09:59Z")

</div>

I have a player model and a game model set up with a HABTM. I am trying to keep track of statistics for a player based on a hits and misses, which the user marks when editing a game. When the game is done editing an e…

---

## [Joining a Date and a Time together for migrations and miniformats](https://www.ruby-forum.com/t/joining-a-date-and-a-time-together-for-migrations-and-miniformats/135039)

<div class="topic-metadata">

**Author:** [@brendon](https://www.ruby-forum.com/u/brendon)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/joining-a-date-and-a-time-together-for-migrations-and-miniformats/135039 "2008-04-18T17:08:58Z")

</div>

Hi everyone, I have a problem born out of a design decision back when this app was PHP based. Basically it’s an Upcoming events module and the users can add upcoming event to their website. Long and short: the date is…

---

## [Deploying in local machine](https://www.ruby-forum.com/t/deploying-in-local-machine/135132)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/deploying-in-local-machine/135132 "2008-04-18T17:07:47Z")

</div>

hi all, i was given a project which keeps track of employee's information.and the project is running at present in my office now.i checked out the project source from subversion and stored in my local machine to…

---

## [I get updated date in wrong format using atom feed helper](https://www.ruby-forum.com/t/i-get-updated-date-in-wrong-format-using-atom-feed-helper/135161)

<div class="topic-metadata">

**Author:** [@mpc](https://www.ruby-forum.com/u/mpc)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/i-get-updated-date-in-wrong-format-using-atom-feed-helper/135161 "2008-04-18T17:07:11Z")

</div>

Hi! I’m new in RoR and I’m using the atom feed helper to generate an atom feed in my web page but when I try to validate it using the Feed Validation service of W3C, I get the following error: line 6, column 41: upda…

---

## [ActionView::TemplateError (undefined method](https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/196644)

<div class="topic-metadata">

**Author:** [@ubhay](https://www.ruby-forum.com/u/ubhay)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/196644 "2008-04-18T16:58:59Z")

</div>

Hi, I am using following configuration on my production environment: Rails (2.0.2) Mongrels Ruby 1.8.6 I am getting following error after my server runs for some hour (6-8 hr). Also, the problem goes away once i r…

---

## [Accessing database in another rails app](https://www.ruby-forum.com/t/accessing-database-in-another-rails-app/134921)

<div class="topic-metadata">

**Author:** [@Mongdar](https://www.ruby-forum.com/u/Mongdar)\
**Replies:** 4\
**Last updated:** [April 18, 2008, 4:47pm UTC](https://www.ruby-forum.com/t/accessing-database-in-another-rails-app/134921 "2008-04-18T16:47:43Z")

</div>

Hi Rails Guru, I am using mephisto blogging system and I need it to access “users” table of another rails app. Any idea how I can have one rails app access another rails app’s database?? Note that both rails app have …

---

## [ActionView::TemplateError (undefined method](https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/135157)

<div class="topic-metadata">

**Author:** [@ubhay](https://www.ruby-forum.com/u/ubhay)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/actionview-templateerror-undefined-method/135157 "2008-04-18T16:44:12Z")

</div>

Hi, I am using following configuration on my production environment: Rails (2.0.2) Mongrels Ruby 1.8.6 I am getting following error after my server runs for some hour (6-8 hr). Also, the problem goes away once i r…

---

## [Adding a action to a player](https://www.ruby-forum.com/t/adding-a-action-to-a-player/135154)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/adding-a-action-to-a-player/135154 "2008-04-18T16:29:28Z")

</div>

When I create a new game I have this 10.times { @game.rounds.create } for round in @game.rounds 6.times { round.add\_actions } end Here are my specifications. A game has and belongs to many teams There are two team…

---

## [Dynamic generation of routes based on db contents](https://www.ruby-forum.com/t/dynamic-generation-of-routes-based-on-db-contents/135094)

<div class="topic-metadata">

**Author:** [@Jake\_C](https://www.ruby-forum.com/u/Jake_C)\
**Replies:** 1\
**Last updated:** [April 18, 2008, 2:33pm UTC](https://www.ruby-forum.com/t/dynamic-generation-of-routes-based-on-db-contents/135094 "2008-04-18T14:33:20Z")

</div>

Hello all, I am working on a project that requires the ability to dynamically add one-level routes based on person name and city. So, at any given time, someone might go to: And the app needs to be smart enough to…

---

## [Attachment\_fu strange behaviour with file uploading](https://www.ruby-forum.com/t/attachment-fu-strange-behaviour-with-file-uploading/135148)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/attachment-fu-strange-behaviour-with-file-uploading/135148 "2008-04-18T14:14:49Z")

</div>

Hi, thr’s a strange behavior with attachment\_fu. when i upload a file, sometimes it gets uploaded without prb/error msg and sometimes the same file gives the error as size error msg. particularly, when i upload the n…

---

## [Number of times clicked](https://www.ruby-forum.com/t/number-of-times-clicked/135134)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 4\
**Last updated:** [April 18, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/number-of-times-clicked/135134 "2008-04-18T14:08:40Z")

</div>

Hello, right now I have a boolean set up to trigger when a user clicks a link. Is there a way to give some feed back to user to return how many times separate booleans on a page have been clicked and keep track of thi…

---

## [Relating to records in same table](https://www.ruby-forum.com/t/relating-to-records-in-same-table/135139)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 3\
**Last updated:** [April 18, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/relating-to-records-in-same-table/135139 "2008-04-18T13:28:02Z")

</div>

I’m in progress of making a little folder system with Ruby on Rails. I’ve got a “folders” table. Each “folder” has got an id and a folder\_id. The folder\_id is supposed to represent the folders’ parent folder. How can …

---

## [Sending mail from Mailer plugin is slow in development syst](https://www.ruby-forum.com/t/sending-mail-from-mailer-plugin-is-slow-in-development-syst/135129)

<div class="topic-metadata">

**Author:** [@vijayendra](https://www.ruby-forum.com/u/vijayendra)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 8:10am UTC](https://www.ruby-forum.com/t/sending-mail-from-mailer-plugin-is-slow-in-development-syst/135129 "2008-04-18T08:10:06Z")

</div>

Hi everyone, Here i am facing a problem with mailer in my development system which doesn’t have smtp in that . Its taking too much time to send mail, it is taking 2 or 3 min to send 5 mail continuously . Anybody plz t…

---

## [Bypass attachment\_fu on update?](https://www.ruby-forum.com/t/bypass-attachment-fu-on-update/134443)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [April 18, 2008, 7:13am UTC](https://www.ruby-forum.com/t/bypass-attachment-fu-on-update/134443 "2008-04-18T07:13:10Z")

</div>

I have an app that uses attachment\_fu and everything works fine, except when I update an attribute of the picture model such as the title or description, attachment\_fu goes and makes the thumbnails all over again, eve…

---

## [Newbea Restful Route ?/](https://www.ruby-forum.com/t/newbea-restful-route/135124)

<div class="topic-metadata">

**Author:** [@casid](https://www.ruby-forum.com/u/casid)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 6:53am UTC](https://www.ruby-forum.com/t/newbea-restful-route/135124 "2008-04-18T06:53:52Z")

</div>

Hello RoR Developers, I have tiny problem with router, could you check the code to help me finding issue. routes.rb resources = { :rule =\> { :collection =\> { :update\_assignments =\> :put , :details =\> :put …

---

## [\[ANN\] CapGun 0.0.1 released - super simple Capistrano deployment notifications](https://www.ruby-forum.com/t/ann-capgun-0-0-1-released-super-simple-capistrano-deployment-notifications/135120)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 4:00am UTC](https://www.ruby-forum.com/t/ann-capgun-0-0-1-released-super-simple-capistrano-deployment-notifications/135120 "2008-04-18T04:00:05Z")

</div>

Tell everyone about your releases! Send email notification after Capistrano deployments! Rule the world! Drop your ActionMailer configuration information into your deploy.rb file, configure recipients for the deploy…

---

## [Reading Modified time of a file](https://www.ruby-forum.com/t/reading-modified-time-of-a-file/134843)

<div class="topic-metadata">

**Author:** [@srikanth\_u37](https://www.ruby-forum.com/u/srikanth_u37)\
**Replies:** 1\
**Last updated:** [April 18, 2008, 3:36am UTC](https://www.ruby-forum.com/t/reading-modified-time-of-a-file/134843 "2008-04-18T03:36:32Z")

</div>

Hi, I have to write a method which executes a code block only if the file are modified. I am able to do it by reading modified time of the files but as the number of files in the directory are more its taking time to …

---

## [Collection\_select](https://www.ruby-forum.com/t/collection-select/135098)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [April 18, 2008, 3:00am UTC](https://www.ruby-forum.com/t/collection-select/135098 "2008-04-18T03:00:49Z")

</div>

I have posted before about collection\_select but have not gotten what I am working on to work. I have even searched the archives for similar discussions and am at a little bit of a loss because some have claimed to ha…

---

## [Basic Rails 2.0 scaffold and commands question](https://www.ruby-forum.com/t/basic-rails-2-0-scaffold-and-commands-question/135107)

<div class="topic-metadata">

**Author:** [@kellygreer1](https://www.ruby-forum.com/u/kellygreer1)\
**Replies:** 7\
**Last updated:** [April 18, 2008, 12:48am UTC](https://www.ruby-forum.com/t/basic-rails-2-0-scaffold-and-commands-question/135107 "2008-04-18T00:48:40Z")

</div>

Sorry if this a supper newb question… I’m trying to figure out how when I write: ruby script/generate scaffold post name:string description:text this generates model, controller, views, etc… But when I try to back …

---

## [Redbox + will\_paginate](https://www.ruby-forum.com/t/redbox-will-paginate/135114)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 1\
**Last updated:** [April 18, 2008, 12:44am UTC](https://www.ruby-forum.com/t/redbox-will-paginate/135114 "2008-04-18T00:44:59Z")

</div>

Hiya, I’m trying to use Will\_paginate with the RedBox plugin but having problems making it go to the next page of the collection. http://blog.craigambrose.com/articles/2006/09/22/redbox-release-2 as far as i can see …

---

## [Static route](https://www.ruby-forum.com/t/static-route/135108)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 4\
**Last updated:** [April 18, 2008, 12:39am UTC](https://www.ruby-forum.com/t/static-route/135108 "2008-04-18T00:39:54Z")

</div>

It would seem a simple thing to do but I’m not finding it… all I want to do is to serve my ‘doc/app/index.html’ API within my Rails application. I can’t figure out what to add to routes.rb to allow this to happen. So…

---

## [Pre-load second level association?](https://www.ruby-forum.com/t/pre-load-second-level-association/135104)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 3\
**Last updated:** [April 18, 2008, 12:11am UTC](https://www.ruby-forum.com/t/pre-load-second-level-association/135104 "2008-04-18T00:11:32Z")

</div>

Let’s say I have Customer -\> Invoice -\> OrderItem. All of those are one-to-many. Is there any way I can tell ActiveRecord than when I access some\_customer.invoices, AR should pre-load all the invoice.order\_items too…

---

## [Having problem with validates\_presence\_of fields in form when trying to also use ActiveScaffold (x-](https://www.ruby-forum.com/t/having-problem-with-validates-presence-of-fields-in-form-when-trying-to-also-use-activescaffold-x/135111)

<div class="topic-metadata">

**Author:** [@sharon](https://www.ruby-forum.com/u/sharon)\
**Replies:** 0\
**Last updated:** [April 17, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/having-problem-with-validates-presence-of-fields-in-form-when-trying-to-also-use-activescaffold-x/135111 "2008-04-17T23:47:47Z")

</div>

I have an events listing site that includes the models Event and DateAndTime, so an event that happens more than once (like a high school play) can have more than one date\_and\_time. The Event model has\_many date\_and\_t…

---

## [Can't handle \<% if logged\_in? %\> when running for the first time](https://www.ruby-forum.com/t/cant-handle-if-logged-in-when-running-for-the-first-time/135100)

<div class="topic-metadata">

**Author:** [@Mister\_Blood\_R](https://www.ruby-forum.com/u/Mister_Blood_R)\
**Replies:** 5\
**Last updated:** [April 17, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/cant-handle-if-logged-in-when-running-for-the-first-time/135100 "2008-04-17T22:57:43Z")

</div>

My app can’t handle \<% if logged\_in? %\> when running for the first time. It has no registered users, but why does it have to complain? It handles everything just fine after I register the first user manually through w…

---

## [Model to jpg](https://www.ruby-forum.com/t/model-to-jpg/135092)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 1\
**Last updated:** [April 17, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/model-to-jpg/135092 "2008-04-17T22:52:48Z")

</div>

Hi, I need to create a jpg representation of data in the model and embed that into an svg doc in base64 8-P From what I’ve seen around I could: 1- Use RMagick to create the jpg image 2- Endode it into Base64 3- Gen…

---

## [Script/generate resources](https://www.ruby-forum.com/t/script-generate-resources/134998)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 17, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/script-generate-resources/134998 "2008-04-17T22:10:58Z")

</div>

Hi, I am attempting to use script/generate resource. According to this post: http://www.softiesonrails.com/2008/1/29/rails-rest-101-meets-rails-2-0 it should create all of my methods in my controller automatically. F…

---

## [VERY simple question moving to RAILS 2](https://www.ruby-forum.com/t/very-simple-question-moving-to-rails-2/135096)

<div class="topic-metadata">

**Author:** [@apswartz](https://www.ruby-forum.com/u/apswartz)\
**Replies:** 1\
**Last updated:** [April 17, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/very-simple-question-moving-to-rails-2/135096 "2008-04-17T21:32:13Z")

</div>

In the old rails, I could just put a .rjs file and it would automagically work . ie, action is new\_child, it would use new\_child.rjs as the view. However, in rails 2.02 I am getting a “ActionController::MissingTempl…

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

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