# Rails

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

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

---

## [Re: how do you support languages? \[DAMN IT!\*\]](https://www.ruby-forum.com/t/re-how-do-you-support-languages-damn-it/149002)

<div class="topic-metadata">

**Author:** [@mekdigital](https://www.ruby-forum.com/u/mekdigital)\
**Replies:** 6\
**Last updated:** [September 19, 2008, 3:10pm UTC](https://www.ruby-forum.com/t/re-how-do-you-support-languages-damn-it/149002 "2008-09-19T15:10:09Z")

</div>

nobody ever answer my questions!! :slight\_smile: On Thu, Sep 18, 2008 at 7:30 PM, Emanuele T. removed\_email\_address@domain.invalidwrote: welcome: \*Benvenuto\* sul Sito – Emanuele T. +1 (619) 549 3230 4955 Narragan…

---

## [Updating timestamp when adding model via association](https://www.ruby-forum.com/t/updating-timestamp-when-adding-model-via-association/149017)

<div class="topic-metadata">

**Author:** [@kenny](https://www.ruby-forum.com/u/kenny)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/updating-timestamp-when-adding-model-via-association/149017 "2008-09-19T15:08:33Z")

</div>

What’s the proper way to update a models timestamp when you add an object to one of it’s associations? For example, if I have a model, Business, that has\_many :addresses, when I add a new Address, I’d like the updated…

---

## [1 comment system for multiple models](https://www.ruby-forum.com/t/1-comment-system-for-multiple-models/149026)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/1-comment-system-for-multiple-models/149026 "2008-09-19T15:06:48Z")

</div>

Hi all, I have a commenting system I use on different models (posts, reports, events) meaning that I have some difficulties using depend =\> destroy and counter cache. I now use a sub\_id in my comment indicating wheth…

---

## [Comparing datetime](https://www.ruby-forum.com/t/comparing-datetime/148986)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 4\
**Last updated:** [September 19, 2008, 2:37pm UTC](https://www.ruby-forum.com/t/comparing-datetime/148986 "2008-09-19T14:37:20Z")

</div>

Hi all, I have an event containing a datetime and want to see if that datetime is in the past. I have a method in event def future\_event? if self.start \<= DateTime.now() return true end false end on an event I …

---

## [Report display](https://www.ruby-forum.com/t/report-display/149019)

<div class="topic-metadata">

**Author:** [@ammu](https://www.ruby-forum.com/u/ammu)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 1:50pm UTC](https://www.ruby-forum.com/t/report-display/149019 "2008-09-19T13:50:57Z")

</div>

Would like to get code to display the project report for a particular period in ruby on rails.

---

## [Form margins : how to get rid of them](https://www.ruby-forum.com/t/form-margins-how-to-get-rid-of-them/149021)

<div class="topic-metadata">

**Author:** [@Shawn\_Tang](https://www.ruby-forum.com/u/Shawn_Tang)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/form-margins-how-to-get-rid-of-them/149021 "2008-09-19T13:46:51Z")

</div>

In ruby on rails i try to force the from\_tag to have a margin of 0 but it doesn’t seem to work. Forms always seem to have a margin inside a table. \<% form\_remote\_tag :url =\> {:controller =\> "sgpanel", :action =\> "remo…

---

## [Technical recruiters on list](https://www.ruby-forum.com/t/technical-recruiters-on-list/148961)

<div class="topic-metadata">

**Author:** [@pie-r-squared](https://www.ruby-forum.com/u/pie-r-squared)\
**Replies:** 18\
**Last updated:** [September 19, 2008, 1:03pm UTC](https://www.ruby-forum.com/t/technical-recruiters-on-list/148961 "2008-09-19T13:03:17Z")

</div>

I realize that the Rails list has historically been open to job postings, and I generally think that’s a good idea. Recently, though, there have been several posts by third-party recruiters and recruitment firms. My …

---

## [\[Quesiton\] Is there a way to debug the rake file I created?](https://www.ruby-forum.com/t/quesiton-is-there-a-way-to-debug-the-rake-file-i-created/148993)

<div class="topic-metadata">

**Author:** [@boblu](https://www.ruby-forum.com/u/boblu)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 12:21pm UTC](https://www.ruby-forum.com/t/quesiton-is-there-a-way-to-debug-the-rake-file-i-created/148993 "2008-09-19T12:21:01Z")

</div>

well, we all familar with the way of debugging normal code in controller, model and the helper. And I also want to add a ‘debugger’ line to the rake file I created which load all my data into database when executed, …

---

## [What ruby you are using 1.8.6 or 1.8.7 for development and hosting?](https://www.ruby-forum.com/t/what-ruby-you-are-using-1-8-6-or-1-8-7-for-development-and-hosting/149020)

<div class="topic-metadata">

**Author:** [@se\_pavel](https://www.ruby-forum.com/u/se_pavel)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 12:19pm UTC](https://www.ruby-forum.com/t/what-ruby-you-are-using-1-8-6-or-1-8-7-for-development-and-hosting/149020 "2008-09-19T12:19:51Z")

</div>

Hi All, We are using the 1.8.6 with rails 2.1.1 in our projects, but today I need to use the prawn library for pdf generating ( as I researched it is mainstream in ruby/rails world for pdf generating), but this line c…

---

## [ActiveResource Breaking Under FastCGI](https://www.ruby-forum.com/t/activeresource-breaking-under-fastcgi/149018)

<div class="topic-metadata">

**Author:** [@Eonflare](https://www.ruby-forum.com/u/Eonflare)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/activeresource-breaking-under-fastcgi/149018 "2008-09-19T12:02:51Z")

</div>

I’m developing a web service in rails which uses JSON as the transport format. I also have a front end rails site that talks to that web service to retrieve various bits of data. I’m using ActiveResource to accompli…

---

## [How to order @project.tasks?](https://www.ruby-forum.com/t/how-to-order-project-tasks/149000)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/how-to-order-project-tasks/149000 "2008-09-19T12:02:51Z")

</div>

I can access my a project’s tasks by @project.tasks. But how cam I order them by name? Currently it orders by ‘id’

---

## [Paginate in another controller](https://www.ruby-forum.com/t/paginate-in-another-controller/148906)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 5\
**Last updated:** [September 19, 2008, 11:18am UTC](https://www.ruby-forum.com/t/paginate-in-another-controller/148906 "2008-09-19T11:18:59Z")

</div>

When I’m in a controller and view A, and there bring up a layer with an id to list items from another controller B using AJAX (link\_to\_remote), how do I deal with that? I get an error with pure javascript on the page …

---

## [Handling association changes? What's the best practice?](https://www.ruby-forum.com/t/handling-association-changes-whats-the-best-practice/148900)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 8\
**Last updated:** [September 19, 2008, 10:23am UTC](https://www.ruby-forum.com/t/handling-association-changes-whats-the-best-practice/148900 "2008-09-19T10:23:05Z")

</div>

Hello all! I have a conundrum that I’m sure someone else has already thought of and solved. How does one best handle the scenario of association object changes and data integrity? For example, if I have a standard ec…

---

## [Create Graphical charts using rails](https://www.ruby-forum.com/t/create-graphical-charts-using-rails/148999)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 10:12am UTC](https://www.ruby-forum.com/t/create-graphical-charts-using-rails/148999 "2008-09-19T10:12:50Z")

</div>

Hi Could anybody please point me to some good links to draw Graphical charts using RubyOnRails and also suggest which is the best one? Thanks in advance Sijo

---

## [Help with best approach(fairly easy question)](https://www.ruby-forum.com/t/help-with-best-approach-fairly-easy-question/149006)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 10:03am UTC](https://www.ruby-forum.com/t/help-with-best-approach-fairly-easy-question/149006 "2008-09-19T10:03:40Z")

</div>

Hello! Well this is maybe a fairly easy question. I am writing an app where users that belong to a group have their own blog where they can make posts. I have a posts\_controller with all the CRUD operations and my in…

---

## [How do you support languages?](https://www.ruby-forum.com/t/how-do-you-support-languages/148996)

<div class="topic-metadata">

**Author:** [@mekdigital](https://www.ruby-forum.com/u/mekdigital)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 9:19am UTC](https://www.ruby-forum.com/t/how-do-you-support-languages/148996 "2008-09-19T09:19:03Z")

</div>

I want to customize notices and interfaces, would you use session\[:language\] and a YAML file ? I don’t want things automatically translated, just accurate text in Italian, Portuguese and English! lang.yml it: wel…

---

## [Ruby style programming (DRYness)](https://www.ruby-forum.com/t/ruby-style-programming-dryness/148960)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 6\
**Last updated:** [September 19, 2008, 8:56am UTC](https://www.ruby-forum.com/t/ruby-style-programming-dryness/148960 "2008-09-19T08:56:06Z")

</div>

Hi everybody, I have a line of the form: x = hash1.reject{ |key,value| !value}.keys.join(’,’) That worked fine but then I needed to do the same thing for hash2. So I had to add another line like so: y = hash2.reject…

---

## [:serialize "rot" after some time?](https://www.ruby-forum.com/t/serialize-rot-after-some-time/149003)

<div class="topic-metadata">

**Author:** [@macdigger](https://www.ruby-forum.com/u/macdigger)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 8:34am UTC](https://www.ruby-forum.com/t/serialize-rot-after-some-time/149003 "2008-09-19T08:34:36Z")

</div>

Hi all, I have some very weird problems going on with some Ruby on Rails (2.0.2)-driven sites on my server (which is RHEL 4.5, running Apache 2.2, Mongrel cluster) Basically, everything works perfect after my mongrel…

---

## [I wanna do a project on RoR](https://www.ruby-forum.com/t/i-wanna-do-a-project-on-ror/148976)

<div class="topic-metadata">

**Author:** [@shahidonrails](https://www.ruby-forum.com/u/shahidonrails)\
**Replies:** 4\
**Last updated:** [September 19, 2008, 6:38am UTC](https://www.ruby-forum.com/t/i-wanna-do-a-project-on-ror/148976 "2008-09-19T06:38:24Z")

</div>

Hi…Friends…I m a final yr IT engg student…I wanna learn RoR n use it for my Btech project…Kindly help me in dis regard…My exact query is: 1)Wat project topic to choose 2)How to learn dis technology n implement it in …

---

## [Validates\_uniqueness\_of](https://www.ruby-forum.com/t/validates-uniqueness-of/48956)

<div class="topic-metadata">

**Author:** [@tmatsumoto](https://www.ruby-forum.com/u/tmatsumoto)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 5:29am UTC](https://www.ruby-forum.com/t/validates-uniqueness-of/48956 "2008-09-19T05:29:21Z")

</div>

Hi, I’m trying to figure some stuff out about using validates\_uniqueness\_of, particularly if it is possible to validate a unique object in a database and rather than throwing an error like “name already exist”, use t…

---

## [About memcached](https://www.ruby-forum.com/t/about-memcached/148912)

<div class="topic-metadata">

**Author:** [@difei](https://www.ruby-forum.com/u/difei)\
**Replies:** 2\
**Last updated:** [September 19, 2008, 5:19am UTC](https://www.ruby-forum.com/t/about-memcached/148912 "2008-09-19T05:19:16Z")

</div>

Hi all, There is a new plugin for memcached query cache, I was hoping it will bring some performance boost for my application, so I write a simple ruby program to benchmark normal memcached performance, the result is …

---

## [Problems with collection\_selects](https://www.ruby-forum.com/t/problems-with-collection-selects/148995)

<div class="topic-metadata">

**Author:** [@maep](https://www.ruby-forum.com/u/maep)\
**Replies:** 0\
**Last updated:** [September 19, 2008, 4:02am UTC](https://www.ruby-forum.com/t/problems-with-collection-selects/148995 "2008-09-19T04:02:30Z")

</div>

Hello friends! I am trying to make city select on my page. So, I have countries, that has\_many cities. account belongs\_to city. I have found example here: http://pullmonkey.com/2008/3/30/dynamic-select-boxes-ruby-on-…

---

## [Form\_for not producing the correct form action=""](https://www.ruby-forum.com/t/form-for-not-producing-the-correct-form-action/148948)

<div class="topic-metadata">

**Author:** [@daveamos](https://www.ruby-forum.com/u/daveamos)\
**Replies:** 2\
**Last updated:** [September 19, 2008, 3:32am UTC](https://www.ruby-forum.com/t/form-for-not-producing-the-correct-form-action/148948 "2008-09-19T03:32:16Z")

</div>

Hi everyone, I’m using RESTful routes and am trying to implement a simple comment form. For some reason when I submit the form I get an error that it’s trying to render the index action, instead of processing the comm…

---

## [How to get the code staright in to Netbeans from GitHub](https://www.ruby-forum.com/t/how-to-get-the-code-staright-in-to-netbeans-from-github/148923)

<div class="topic-metadata">

**Author:** [@webreservoir](https://www.ruby-forum.com/u/webreservoir)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 3:18am UTC](https://www.ruby-forum.com/t/how-to-get-the-code-staright-in-to-netbeans-from-github/148923 "2008-09-19T03:18:16Z")

</div>

Hi, I am using Netbeans 6.1 for my Rails Projects. I have seen that many projects on GitHub, do not offer the code in zip formats for downloads, hence it becomes very tough to copy the code step by step and paste it …

---

## [Plugin or Gem install is too slow](https://www.ruby-forum.com/t/plugin-or-gem-install-is-too-slow/148962)

<div class="topic-metadata">

**Author:** [@sohdubom](https://www.ruby-forum.com/u/sohdubom)\
**Replies:** 3\
**Last updated:** [September 19, 2008, 2:37am UTC](https://www.ruby-forum.com/t/plugin-or-gem-install-is-too-slow/148962 "2008-09-19T02:37:18Z")

</div>

I’m using a Macbook with Leopard 10.5.4 . When I try to install a plugin from a remote source via Terminal it takes a long time to finish downloading all the files to my vendor/plugins folder. My internet connection i…

---

## [Capturing the sql from a statement without executing it?](https://www.ruby-forum.com/t/capturing-the-sql-from-a-statement-without-executing-it/148782)

<div class="topic-metadata">

**Author:** [@postscript07](https://www.ruby-forum.com/u/postscript07)\
**Replies:** 13\
**Last updated:** [September 19, 2008, 1:52am UTC](https://www.ruby-forum.com/t/capturing-the-sql-from-a-statement-without-executing-it/148782 "2008-09-19T01:52:51Z")

</div>

Hi guys, Is there an elegant way to capture the sql that would have been executed by an ActiveRecord statement, without actually executing it? :slight\_smile: I’m imagining something like sql = User.find(1).groups.to…

---

## [Specific table id](https://www.ruby-forum.com/t/specific-table-id/148944)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [September 19, 2008, 1:05am UTC](https://www.ruby-forum.com/t/specific-table-id/148944 "2008-09-19T01:05:29Z")

</div>

I tried to save records with specific ids, but without any success … @date = Time.now.to\_date tour\_id = (@date.year.to\_s + @date.month.to\_s + @date.day.to\_s).to\_i @tour = Tour.new(:id =\> tour\_id, :scheduled\_on =\> @da…

---

## [Custom data types](https://www.ruby-forum.com/t/custom-data-types/148914)

<div class="topic-metadata">

**Author:** [@josegalvan](https://www.ruby-forum.com/u/josegalvan)\
**Replies:** 6\
**Last updated:** [September 18, 2008, 11:52pm UTC](https://www.ruby-forum.com/t/custom-data-types/148914 "2008-09-18T23:52:22Z")

</div>

Hello, I have this class in my Rails project : class CreateModels \< ActiveRecord::Migration def self.up create\_table :models do |t| t.string :model, :default =\> “Model”, :limit =\> 10 t.string :description, :defau…

---

## [User\_observer (restful\_authentication) causes failure in loading rails](https://www.ruby-forum.com/t/user-observer-restful-authentication-causes-failure-in-loading-rails/148987)

<div class="topic-metadata">

**Author:** [@decostop](https://www.ruby-forum.com/u/decostop)\
**Replies:** 1\
**Last updated:** [September 18, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/user-observer-restful-authentication-causes-failure-in-loading-rails/148987 "2008-09-18T23:35:58Z")

</div>

I have restful\_authentication in use on an app and it has been working fine, but I recently was changing the account creation flow and needed to enable the UserObserver. I did so by including it in the environment.rb…

---

## [How to model a polymorphic relationship?](https://www.ruby-forum.com/t/how-to-model-a-polymorphic-relationship/148161)

<div class="topic-metadata">

**Author:** [@rpitting](https://www.ruby-forum.com/u/rpitting)\
**Replies:** 6\
**Last updated:** [September 18, 2008, 11:06pm UTC](https://www.ruby-forum.com/t/how-to-model-a-polymorphic-relationship/148161 "2008-09-18T23:06:45Z")

</div>

I have read many articles about polymorphic associations in Rails and also about plugins for this purpose (mainly the has\_many\_polymorphs plugin). Unfortunately, I am still unsure how to solve my problem: Let’s say y…

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

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