# Rails

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

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

---

## [Participar do grupo de estudo ruby on rails](https://www.ruby-forum.com/t/participar-do-grupo-de-estudo-ruby-on-rails/187470)

<div class="topic-metadata">

**Author:** [@juvencio](https://www.ruby-forum.com/u/juvencio)\
**Replies:** 0\
**Last updated:** [April 23, 2010, 5:29pm UTC](https://www.ruby-forum.com/t/participar-do-grupo-de-estudo-ruby-on-rails/187470 "2010-04-23T17:29:33Z")

</div>

Quero aprender ruby on rails

---

## [Profile comments creation issue](https://www.ruby-forum.com/t/profile-comments-creation-issue/187467)

<div class="topic-metadata">

**Author:** [@catalin](https://www.ruby-forum.com/u/catalin)\
**Replies:** 0\
**Last updated:** [April 23, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/profile-comments-creation-issue/187467 "2010-04-23T17:01:58Z")

</div>

Got a social network going on and I want users to comment on each others profiles. If you guys are so kind and point me to some tutorials or examples. Been searching for two days now and nothing seems to work. Found …

---

## [Data relationships for a World Cup Football App](https://www.ruby-forum.com/t/data-relationships-for-a-world-cup-football-app/187465)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 0\
**Last updated:** [April 23, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/data-relationships-for-a-world-cup-football-app/187465 "2010-04-23T16:27:15Z")

</div>

how would I map relationships for world cup football matches. Currently in my app I have Countries, that’s it, all 32 competing nations are represented, with flags and details working great. I’d like to introduce two …

---

## [Can i have a model called FILE.RB?](https://www.ruby-forum.com/t/can-i-have-a-model-called-file-rb/187432)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 5\
**Last updated:** [April 23, 2010, 3:57pm UTC](https://www.ruby-forum.com/t/can-i-have-a-model-called-file-rb/187432 "2010-04-23T15:57:02Z")

</div>

Is “file” reserved? Can i use it for my model name? Because I am getting this error- NoMethodError in FilesController#new undefined method \`quoted\_table\_name’ for File:Class

---

## [Slow tests on large rails app](https://www.ruby-forum.com/t/slow-tests-on-large-rails-app/168961)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 12\
**Last updated:** [April 23, 2010, 2:40pm UTC](https://www.ruby-forum.com/t/slow-tests-on-large-rails-app/168961 "2010-04-23T14:40:09Z")

</div>

My app has 64 models and my test are so slow. 30 seconds at least. I’m using Machinist. How can I speed up my tests? It has really killed my motivation to test at all… I’m using rails-test-serve but that only brings t…

---

## [AR create\_or\_update\_if\_needed rant -- must be a better way!](https://www.ruby-forum.com/t/ar-create-or-update-if-needed-rant-must-be-a-better-way/187423)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 1\
**Last updated:** [April 23, 2010, 2:34pm UTC](https://www.ruby-forum.com/t/ar-create-or-update-if-needed-rant-must-be-a-better-way/187423 "2010-04-23T14:34:26Z")

</div>

I’ll preface this by saying I (still) consider myself a relative newcomer to Rails, and its likely that I’m missing something obvious in ActiveRecords, but this has been bugging me… I’ve written a function that I use …

---

## [Globalize2 updates - please test!](https://www.ruby-forum.com/t/globalize2-updates-please-test/187451)

<div class="topic-metadata">

**Author:** [@hukl](https://www.ruby-forum.com/u/hukl)\
**Replies:** 0\
**Last updated:** [April 23, 2010, 11:59am UTC](https://www.ruby-forum.com/t/globalize2-updates-please-test/187451 "2010-04-23T11:59:23Z")

</div>

Hey, I spent last nite with recreational ruby hacking and closed some longstanding globalize2 issues. One fix was for #to\_xml to include translated and untranslated attributes. I therefor overloaded #attributes and #…

---

## [Mocking, a common practice](https://www.ruby-forum.com/t/mocking-a-common-practice/187448)

<div class="topic-metadata">

**Author:** [@mariek](https://www.ruby-forum.com/u/mariek)\
**Replies:** 2\
**Last updated:** [April 23, 2010, 11:47am UTC](https://www.ruby-forum.com/t/mocking-a-common-practice/187448 "2010-04-23T11:47:41Z")

</div>

I would like to ask for Your experience how to handle mocking class method only for one specific test. Scenario is: I have unit test suite and in one of the test I have mocked a class method, and I want this class me…

---

## [Passing variables](https://www.ruby-forum.com/t/passing-variables/187385)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 3\
**Last updated:** [April 23, 2010, 10:49am UTC](https://www.ruby-forum.com/t/passing-variables/187385 "2010-04-23T10:49:47Z")

</div>

Hello all, I am trying to pass variables in Ajax.Request method. I can see that we can pass a single variable as:- new Ajax.Request(’/controller/action?id=" + value + “&status=JOINING’, {asynchronous:true, evalScript…

---

## [Ruby Job in San Francisco](https://www.ruby-forum.com/t/ruby-job-in-san-francisco/187443)

<div class="topic-metadata">

**Author:** [@echeyde](https://www.ruby-forum.com/u/echeyde)\
**Replies:** 0\
**Last updated:** [April 23, 2010, 9:29am UTC](https://www.ruby-forum.com/t/ruby-job-in-san-francisco/187443 "2010-04-23T09:29:31Z")

</div>

hi, I am looking for some awesome ruby developers in San Francisco for singlefeed. Please see my posting at http://bit.ly/9C9hVP Thanks Echeyde

---

## [HOW TO Track How Many Recipients Open Your Mail IN RAILS?](https://www.ruby-forum.com/t/how-to-track-how-many-recipients-open-your-mail-in-rails/197038)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 3\
**Last updated:** [April 23, 2010, 5:54am UTC](https://www.ruby-forum.com/t/how-to-track-how-many-recipients-open-your-mail-in-rails/197038 "2010-04-23T05:54:38Z")

</div>

HOW TO Track How Many Recipients Open Your Mail IN RAILS? please help me PROVIDE SOLUTIONS AND STEPS OR ELSE ANY PLUGIN

---

## [Script/plugin install not working](https://www.ruby-forum.com/t/script-plugin-install-not-working/187434)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 2\
**Last updated:** [April 23, 2010, 4:15am UTC](https://www.ruby-forum.com/t/script-plugin-install-not-working/187434 "2010-04-23T04:15:45Z")

</div>

I’m trying to install paperclip -script/plugin install git://github.com/thoughtbot/paperclip.git But nothing happens, no error, it just goes over to the next line in my terminal. And im positive it isn’t installed ar…

---

## [Trying to receive emails with ActionMailer + Postfix](https://www.ruby-forum.com/t/trying-to-receive-emails-with-actionmailer-postfix/187436)

<div class="topic-metadata">

**Author:** [@webo](https://www.ruby-forum.com/u/webo)\
**Replies:** 0\
**Last updated:** [April 23, 2010, 3:53am UTC](https://www.ruby-forum.com/t/trying-to-receive-emails-with-actionmailer-postfix/187436 "2010-04-23T03:53:31Z")

</div>

I’ve been having a world of issues with trying to get ActionMailer (using Rails 3.0 beta 2) to receive emails from Postfix. Currently in Postfix’s aliases file I have the line: rails\_mailer: | “/home/directory/to/app/…

---

## [SMS service](https://www.ruby-forum.com/t/sms-service/187326)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [April 23, 2010, 12:26am UTC](https://www.ruby-forum.com/t/sms-service/187326 "2010-04-23T00:26:42Z")

</div>

What’s a good SMS service to use? I want to start sending messages from my apps via SMS. Thanks!

---

## [Caching of data on server?](https://www.ruby-forum.com/t/caching-of-data-on-server/187255)

<div class="topic-metadata">

**Author:** [@hostep](https://www.ruby-forum.com/u/hostep)\
**Replies:** 10\
**Last updated:** [April 22, 2010, 11:57pm UTC](https://www.ruby-forum.com/t/caching-of-data-on-server/187255 "2010-04-22T23:57:16Z")

</div>

Hi I am looking to speed up my rails application and am working through all the SQL queries and trying to remove unnecessary queries. I thought of the following and would love to hear whether it is possible. I have …

---

## [Api.rubyonrails.org site is taken over by a domain squatter](https://www.ruby-forum.com/t/api-rubyonrails-org-site-is-taken-over-by-a-domain-squatter/187259)

<div class="topic-metadata">

**Author:** [@dkindlund](https://www.ruby-forum.com/u/dkindlund)\
**Replies:** 19\
**Last updated:** [April 22, 2010, 11:54pm UTC](https://www.ruby-forum.com/t/api-rubyonrails-org-site-is-taken-over-by-a-domain-squatter/187259 "2010-04-22T23:54:21Z")

</div>

All, Visiting http://api.rubyonrails.org now redirects to an domain squatter page. If you’re not seeing it (probably because the original site may still be cached by an upstream proxy), look at CorelCDN’s cached vers…

---

## [STI Design Questions](https://www.ruby-forum.com/t/sti-design-questions/187284)

<div class="topic-metadata">

**Author:** [@DGerton](https://www.ruby-forum.com/u/DGerton)\
**Replies:** 2\
**Last updated:** [April 22, 2010, 11:45pm UTC](https://www.ruby-forum.com/t/sti-design-questions/187284 "2010-04-22T23:45:18Z")

</div>

It’s often hard to keep up with changes in RoR, especially when you’re still learning. A lot information on the web is for older versions of RoR. So I want to make sure this design using single-table inheritance (STI)…

---

## [Checkboxes in a loop - I get the same id](https://www.ruby-forum.com/t/checkboxes-in-a-loop-i-get-the-same-id/187210)

<div class="topic-metadata">

**Author:** [@oreng](https://www.ruby-forum.com/u/oreng)\
**Replies:** 3\
**Last updated:** [April 22, 2010, 11:41pm UTC](https://www.ruby-forum.com/t/checkboxes-in-a-loop-i-get-the-same-id/187210 "2010-04-22T23:41:47Z")

</div>

\<% f.fields\_for :keys do |key\_form| %\> \<%= check\_box\_tag “keys\_to\_update\[\]”, key\_form.object.id %\> \<%= key\_form.label :name, key\_form.object.name %\> \<% end %\> This is the output: I try to use cucumber and check …

---

## [Best practice around putting rails database info into git](https://www.ruby-forum.com/t/best-practice-around-putting-rails-database-info-into-git/187252)

<div class="topic-metadata">

**Author:** [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Replies:** 15\
**Last updated:** [April 22, 2010, 10:57pm UTC](https://www.ruby-forum.com/t/best-practice-around-putting-rails-database-info-into-git/187252 "2010-04-22T22:57:17Z")

</div>

This maybe too vague a question, but I wonder if there’s some wisdom out there for me to tap… Sometimes when I get ready to commit, git says that db/schema.rb has changed. This is weird, and I think it’s because I did…

---

## [Database query question](https://www.ruby-forum.com/t/database-query-question/187251)

<div class="topic-metadata">

**Author:** [@cghost](https://www.ruby-forum.com/u/cghost)\
**Replies:** 11\
**Last updated:** [April 22, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/database-query-question/187251 "2010-04-22T22:28:20Z")

</div>

I’m new to rails and I’m also new to database access so hopefully this will be easy to answer, and hopefully I can explain it well enough to be understood. I’ve got ActiveRecord objects that all relate to eachother. …

---

## [Sorting posts](https://www.ruby-forum.com/t/sorting-posts/187300)

<div class="topic-metadata">

**Author:** [@DanC](https://www.ruby-forum.com/u/DanC)\
**Replies:** 3\
**Last updated:** [April 22, 2010, 10:00pm UTC](https://www.ruby-forum.com/t/sorting-posts/187300 "2010-04-22T22:00:21Z")

</div>

Hi, I have a topic model which has\_many replies. On my topic index page I would like to be able to sort the topics by the number of replies. In my topic model I have defined Topic.rb … has\_many :replies … def to…

---

## [How does one set an HTTP header in @request for a functional test](https://www.ruby-forum.com/t/how-does-one-set-an-http-header-in-request-for-a-functional-test/187419)

<div class="topic-metadata">

**Author:** [@ate50eggs](https://www.ruby-forum.com/u/ate50eggs)\
**Replies:** 1\
**Last updated:** [April 22, 2010, 9:42pm UTC](https://www.ruby-forum.com/t/how-does-one-set-an-http-header-in-request-for-a-functional-test/187419 "2010-04-22T21:42:20Z")

</div>

I have a very simple functional test for a controller, but I need to set a header field in the request before the invocation of the action, but the headers seem to be getting reset, even though I’m not doing multiple …

---

## [Requires RubyGems version \>= 1.3.6](https://www.ruby-forum.com/t/requires-rubygems-version-1-3-6/187421)

<div class="topic-metadata">

**Author:** [@codegenesys](https://www.ruby-forum.com/u/codegenesys)\
**Replies:** 0\
**Last updated:** [April 22, 2010, 9:40pm UTC](https://www.ruby-forum.com/t/requires-rubygems-version-1-3-6/187421 "2010-04-22T21:40:34Z")

</div>

Hi, I have ruby 1.8.7. I have RubyGems version 1.3.6 installed. I am trying to install/attach i18n v 0.3.7. However gem install complains that I need RubyGems version 1.3.6 atleast (which is already installed). (I …

---

## [How to: Set a datetime params-value to nil in the controller](https://www.ruby-forum.com/t/how-to-set-a-datetime-params-value-to-nil-in-the-controller/187402)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 6\
**Last updated:** [April 22, 2010, 9:00pm UTC](https://www.ruby-forum.com/t/how-to-set-a-datetime-params-value-to-nil-in-the-controller/187402 "2010-04-22T21:00:46Z")

</div>

Hi there, Suppose I submit an object called “task” from a form with… task\[enddate(1i)\] -\> 2011 task\[enddate(2i)\] -\> 3 task\[enddate(3i)\] -\> 1 …how do I set the value ‘params\[:task\]\[:enddate\]’ to ‘nil’ in the c…

---

## [Display utf 8 characters in text fields in edit page](https://www.ruby-forum.com/t/display-utf-8-characters-in-text-fields-in-edit-page/186921)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 7\
**Last updated:** [April 22, 2010, 7:12pm UTC](https://www.ruby-forum.com/t/display-utf-8-characters-in-text-fields-in-edit-page/186921 "2010-04-22T19:12:28Z")

</div>

I have no problems displaying data from my database with characters like é à è etc. anywhere in my application; however on my edit page, when it tries to display the data in the text fields I get incompatible characte…

---

## [RAILS not SCALABLE?](https://www.ruby-forum.com/t/rails-not-scalable/187347)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 9\
**Last updated:** [April 22, 2010, 7:10pm UTC](https://www.ruby-forum.com/t/rails-not-scalable/187347 "2010-04-22T19:10:43Z")

</div>

Heyyy First off, I love rails. Even thuogh I’m not as good as some of you guys here, but hey, I started couple months ago, and I am still on my way learning more. But… I know there are downsides to Rails too. One of …

---

## [Model controlled by API calls](https://www.ruby-forum.com/t/model-controlled-by-api-calls/187404)

<div class="topic-metadata">

**Author:** [@tomuhs](https://www.ruby-forum.com/u/tomuhs)\
**Replies:** 1\
**Last updated:** [April 22, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/model-controlled-by-api-calls/187404 "2010-04-22T19:03:41Z")

</div>

Hello, I was wondering if anybody knew of a library (acts\_as\_ or similar) that provides a simple framework for mapping ActiveRecord calls to API calls for model instances that are managed via API calls rather than a …

---

## [Specifying charset for selects](https://www.ruby-forum.com/t/specifying-charset-for-selects/187409)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 0\
**Last updated:** [April 22, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/specifying-charset-for-selects/187409 "2010-04-22T18:50:47Z")

</div>

How can I explicitly say that I want my select statements from the database to be in charset utf8?

---

## [How to automatically set params based on passed object when generating a route?](https://www.ruby-forum.com/t/how-to-automatically-set-params-based-on-passed-object-when-generating-a-route/187406)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 0\
**Last updated:** [April 22, 2010, 5:50pm UTC](https://www.ruby-forum.com/t/how-to-automatically-set-params-based-on-passed-object-when-generating-a-route/187406 "2010-04-22T17:50:29Z")

</div>

Hi, having i.e. a post model that has many categories - is it possible for member routes like i.e. post\_path(post) to generate path like “/ posts/:post\_category\_name/:post\_id” without manually passing the category pa…

---

## [Advice on memcached caching](https://www.ruby-forum.com/t/advice-on-memcached-caching/187375)

<div class="topic-metadata">

**Author:** [@fredd](https://www.ruby-forum.com/u/fredd)\
**Replies:** 1\
**Last updated:** [April 22, 2010, 4:45pm UTC](https://www.ruby-forum.com/t/advice-on-memcached-caching/187375 "2010-04-22T16:45:25Z")

</div>

Hi! I need to cache an overview page that lists the latest events (messages, documents, etc). By the side of each event I show the user who created it (including the user’s avatar). I have tried to use a cache this wi…

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

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