# Rails

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

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

---

## [Help Adding "class method" to model](https://www.ruby-forum.com/t/help-adding-class-method-to-model/134421)

<div class="topic-metadata">

**Author:** [@apswartz](https://www.ruby-forum.com/u/apswartz)\
**Replies:** 5\
**Last updated:** [April 10, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/help-adding-class-method-to-model/134421 "2008-04-10T17:53:11Z")

</div>

I can’t help but think this should be really easy, but I am pulling my hair out. I have a model “Task” class Task \< ActiveRecord::Base acts\_as\_nested\_set def rootsForUser(user) … end end In the controller, I hav…

---

## [Synchronizing a table to a spreadsheet](https://www.ruby-forum.com/t/synchronizing-a-table-to-a-spreadsheet/134420)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 0\
**Last updated:** [April 10, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/synchronizing-a-table-to-a-spreadsheet/134420 "2008-04-10T17:53:11Z")

</div>

Hello all, As much as I hate saying this, I would like to maintain 2 copies of some data, one copy in the form of a table in a database, and one in the form of an Excel spreadsheet. Unfortunately, either or both cop…

---

## [Open\_id\_authentication](https://www.ruby-forum.com/t/open-id-authentication/134402)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/open-id-authentication/134402 "2008-04-10T17:52:00Z")

</div>

Hi Guys, Background: I am trying to run the Google OpenCellID project, but to no avail. I have searched long and hard for a solution to this problem, but to no avail. I have ensured that I have the latest version of …

---

## [RoR Developers](https://www.ruby-forum.com/t/ror-developers/134418)

<div class="topic-metadata">

**Author:** [@RubyPeople](https://www.ruby-forum.com/u/RubyPeople)\
**Replies:** 0\
**Last updated:** [April 10, 2008, 5:18pm UTC](https://www.ruby-forum.com/t/ror-developers/134418 "2008-04-10T17:18:58Z")

</div>

Hi I urgently require experienced Ruby on Rails developers for London. If you are currently on the market, I would be delighted to have a chat with you. Contact Lisa on: 0870 333 0017 or email: removed\_email\_address@…

---

## [Active Record Delete if not in](https://www.ruby-forum.com/t/active-record-delete-if-not-in/134415)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 0\
**Last updated:** [April 10, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/active-record-delete-if-not-in/134415 "2008-04-10T16:54:47Z")

</div>

Hy! How can i delete from an AR Object the opposite way like the following: Song.destroy( 10, 11, 20 ) SQL = DELETE FROM songs WHERE id IN (10,11,20) I need Song.destroy everthing but 10,11,12 SQL = DELETE FROM son…

---

## [Mac MySQL issues](https://www.ruby-forum.com/t/mac-mysql-issues/134412)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/mac-mysql-issues/134412 "2008-04-10T16:54:15Z")

</div>

Hi all, I’m having a problem with accessing MySQL from RoR on Mac OS X Leopard. Specifically when I try to create a scaffold, I get an access denied for user error, no matter what username and password I try to use. …

---

## [Problem with ActiveRecord and ActionWebService?](https://www.ruby-forum.com/t/problem-with-activerecord-and-actionwebservice/197283)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 3\
**Last updated:** [April 10, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/problem-with-activerecord-and-actionwebservice/197283 "2008-04-10T15:49:42Z")

</div>

Hi All, I am creating one webservice in ror.I have one function called sum(int1,int2) and it’s working fine to show output.Now i wanna save the value of int1 and int2 into database through my webservices. But i am ge…

---

## [Handle incoming mail](https://www.ruby-forum.com/t/handle-incoming-mail/134398)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/handle-incoming-mail/134398 "2008-04-10T15:37:17Z")

</div>

HI all, I would like to write a very simple mailinglist and wonder if (and how) this can be done with Rails. I have usergroups and want to automatically make a mailinglist for each group. eg a group is named testers …

---

## [Ajax Request Caching by Timestamp?](https://www.ruby-forum.com/t/ajax-request-caching-by-timestamp/134357)

<div class="topic-metadata">

**Author:** [@b0rdslide](https://www.ruby-forum.com/u/b0rdslide)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 3:26pm UTC](https://www.ruby-forum.com/t/ajax-request-caching-by-timestamp/134357 "2008-04-10T15:26:23Z")

</div>

Hi everyone, first post here in the forum. I’m usually in #rubyonrails on freenode. I’ve been thinking about the various types of caching, and I was wondering if its possible to have the server selectively send back d…

---

## [(Yet another) Noob design question](https://www.ruby-forum.com/t/yet-another-noob-design-question/134396)

<div class="topic-metadata">

**Author:** [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Replies:** 4\
**Last updated:** [April 10, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/yet-another-noob-design-question/134396 "2008-04-10T15:11:07Z")

</div>

Hello All I am unsure how to handle the following in terms of the “Rails way”: The design requirement: A user may create a “goal” for themselves or (if they have sufficient permissions) they may create a goal for some…

---

## [Using create, update and validation](https://www.ruby-forum.com/t/using-create-update-and-validation/134397)

<div class="topic-metadata">

**Author:** [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Replies:** 6\
**Last updated:** [April 10, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/using-create-update-and-validation/134397 "2008-04-10T14:42:13Z")

</div>

Hi List When using the create and update methods, is there anyway of confirming that the create/update method was unsuccessful- e.g. if it failed validation? The API documentation and playing around in the console su…

---

## [Making decision in RJS?](https://www.ruby-forum.com/t/making-decision-in-rjs/134395)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 2:38pm UTC](https://www.ruby-forum.com/t/making-decision-in-rjs/134395 "2008-04-10T14:38:15Z")

</div>

I have an .rjs file in which I want to check if ‘notice’ is there (whether hidden or visible) then it should remove it’s DOM. And if there is no ‘notice’, it shouldn’t do anything. Please help. Thanks

---

## [Can ruby support send http request or call other programs written in like c or c# or Java?](https://www.ruby-forum.com/t/can-ruby-support-send-http-request-or-call-other-programs-written-in-like-c-or-c-or-java/196638)

<div class="topic-metadata">

**Author:** [@lily](https://www.ruby-forum.com/u/lily)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/can-ruby-support-send-http-request-or-call-other-programs-written-in-like-c-or-c-or-java/196638 "2008-04-10T12:30:18Z")

</div>

hello, everyone, I am developping a website using Ruby on Rails which need to go to another website to get some information to update my own database. Does ruby have similar function support like in c#:WebRequest.Crea…

---

## [Generating fully qualified URL based on the server](https://www.ruby-forum.com/t/generating-fully-qualified-url-based-on-the-server/134381)

<div class="topic-metadata">

**Author:** [@subbu](https://www.ruby-forum.com/u/subbu)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 12:10pm UTC](https://www.ruby-forum.com/t/generating-fully-qualified-url-based-on-the-server/134381 "2008-04-10T12:10:48Z")

</div>

Hi, I have a cron job running at pre-determined time. This cron job is a small Ruby script that loads the whole Rails environment and does some jobs. One of the job is to send a link to users. The link needs to be fu…

---

## [Sphinx vs ferret](https://www.ruby-forum.com/t/sphinx-vs-ferret/125027)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 47\
**Last updated:** [April 10, 2008, 11:53am UTC](https://www.ruby-forum.com/t/sphinx-vs-ferret/125027 "2008-04-10T11:53:32Z")

</div>

I’ve got a smallish site with not a ton of data at the moment… but all that could change at some point so I’d like to plan with that in mind. Currently I’m deployed on an nginx/mongrel stack that works quite well. M…

---

## [How to use alt and title for href to a mehtod](https://www.ruby-forum.com/t/how-to-use-alt-and-title-for-href-to-a-mehtod/134377)

<div class="topic-metadata">

**Author:** [@vamsi](https://www.ruby-forum.com/u/vamsi)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 11:38am UTC](https://www.ruby-forum.com/t/how-to-use-alt-and-title-for-href-to-a-mehtod/134377 "2008-04-10T11:38:52Z")

</div>

hi all i know how to use alt and title for image but i want the same result when i point on a text(href) then it shows the title content like if i set :alt=\> “how r u”,:title=\>“how r u” then it needs to show “how r …

---

## [Reg: before\_filter](https://www.ruby-forum.com/t/reg-before-filter/134376)

<div class="topic-metadata">

**Author:** [@shiva](https://www.ruby-forum.com/u/shiva)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 11:35am UTC](https://www.ruby-forum.com/t/reg-before-filter/134376 "2008-04-10T11:35:51Z")

</div>

Hi, Whether it is possible to give two parameters in before\_filter ? eg: before\_filter :test2,:test1 so if it possible what sequence it will work? if any one knows the answer please help me

---

## [SMS's - whats the cheapest way to send/receive SMS's to/from a Ruby on Rails application?](https://www.ruby-forum.com/t/smss-whats-the-cheapest-way-to-send-receive-smss-to-from-a-ruby-on-rails-application/134281)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [April 10, 2008, 10:33am UTC](https://www.ruby-forum.com/t/smss-whats-the-cheapest-way-to-send-receive-smss-to-from-a-ruby-on-rails-application/134281 "2008-04-10T10:33:30Z")

</div>

Hi, Whats the cheapest way to send/receive SMS’s to/from a Ruby on Rails application? I’m assuming this might be a company that has a value-for-money means of interfacing to from Rails as a means to send, and recei…

---

## [Initializing a Global Instance of a Ruby Class](https://www.ruby-forum.com/t/initializing-a-global-instance-of-a-ruby-class/134364)

<div class="topic-metadata">

**Author:** [@M\_P](https://www.ruby-forum.com/u/M_P)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 10:10am UTC](https://www.ruby-forum.com/t/initializing-a-global-instance-of-a-ruby-class/134364 "2008-04-10T10:10:34Z")

</div>

Hello, I want to have an instance of a Ruby class I wrote initialized as a single instance on app startup, and have that instance accessible from my controllers. I assume this is simple, but have not been able to fig…

---

## [How to use actionmailer use gmail smtp?](https://www.ruby-forum.com/t/how-to-use-actionmailer-use-gmail-smtp/134237)

<div class="topic-metadata">

**Author:** [@SS\_SSSSS\_SSSSSSSSSS](https://www.ruby-forum.com/u/SS_SSSSS_SSSSSSSSSS)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 9:58am UTC](https://www.ruby-forum.com/t/how-to-use-actionmailer-use-gmail-smtp/134237 "2008-04-10T09:58:06Z")

</div>

how to use actionmailer use gmail???

---

## [Help with model relationship for Product/Bill of Materials](https://www.ruby-forum.com/t/help-with-model-relationship-for-product-bill-of-materials/134290)

<div class="topic-metadata">

**Author:** [@tonypm](https://www.ruby-forum.com/u/tonypm)\
**Replies:** 3\
**Last updated:** [April 10, 2008, 9:46am UTC](https://www.ruby-forum.com/t/help-with-model-relationship-for-product-bill-of-materials/134290 "2008-04-10T09:46:43Z")

</div>

I am struggling to find the best way to set up relationships to achieve this so that it fits the rails idioms. I have a table of products and I want to be able to create a bill of materials for a product… So a produc…

---

## [Merge error?](https://www.ruby-forum.com/t/merge-error/197075)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 9:30am UTC](https://www.ruby-forum.com/t/merge-error/197075 "2008-04-10T09:30:12Z")

</div>

When I write this line \<%= round\_form.select :round, :action, \[“a”, “b”, “c”, “d”\] %\> I get this. What gives? undefined method \`merge’ for \[“a”, “b”, “c”, “d”\]:Array

---

## [C, C++ codes in rails applications?](https://www.ruby-forum.com/t/c-c-codes-in-rails-applications/134369)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 9:27am UTC](https://www.ruby-forum.com/t/c-c-codes-in-rails-applications/134369 "2008-04-10T09:27:17Z")

</div>

Hi, I need to use some C,C++ codes in my rails controller. How to do this. I have a requirement to integrate a scanner or any twain compliant device to my application. For this i found some dll’s and twain.h file… I…

---

## [Amazon S3 and Rails](https://www.ruby-forum.com/t/amazon-s3-and-rails/134372)

<div class="topic-metadata">

**Author:** [@sweetpete](https://www.ruby-forum.com/u/sweetpete)\
**Replies:** 0\
**Last updated:** [April 10, 2008, 9:17am UTC](https://www.ruby-forum.com/t/amazon-s3-and-rails/134372 "2008-04-10T09:17:49Z")

</div>

Hi I have created a new website on a slicehost VPS server that has 10GB storage. I am using attachment\_fu for photo uploads. I am wondering if i should use Amazon S3 from the start. If i have a lot of storage space a…

---

## [How to get the right template](https://www.ruby-forum.com/t/how-to-get-the-right-template/134312)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [April 10, 2008, 8:33am UTC](https://www.ruby-forum.com/t/how-to-get-the-right-template/134312 "2008-04-10T08:33:07Z")

</div>

Back to my notorious entity : client relationship. Entity has\_one :client Client belongs\_to :entity. The route: map.resources :entities do |entity| # An entity can only have one client role entity.resource …

---

## [Help with a query - no comments in 90 days](https://www.ruby-forum.com/t/help-with-a-query-no-comments-in-90-days/134320)

<div class="topic-metadata">

**Author:** [@Marcello\_P](https://www.ruby-forum.com/u/Marcello_P)\
**Replies:** 8\
**Last updated:** [April 10, 2008, 8:27am UTC](https://www.ruby-forum.com/t/help-with-a-query-no-comments-in-90-days/134320 "2008-04-10T08:27:51Z")

</div>

Hello all, I tried to get this work for two days… by did not make it right… so I decided to call for help… I have users and comments, like this: User has\_many :comments Comment belongs\_to :user Each comment has a …

---

## [Custom Routes making permanent URLs with redirects](https://www.ruby-forum.com/t/custom-routes-making-permanent-urls-with-redirects/134367)

<div class="topic-metadata">

**Author:** [@kim](https://www.ruby-forum.com/u/kim)\
**Replies:** 1\
**Last updated:** [April 10, 2008, 7:18am UTC](https://www.ruby-forum.com/t/custom-routes-making-permanent-urls-with-redirects/134367 "2008-04-10T07:18:09Z")

</div>

Hello, I am looking for guidance, suggestions and best strategies on how to create readable, permanent URLs for my project. I have a project that serves up two types of pages: subject help guides course help guides …

---

## [Rake doc:plugins](https://www.ruby-forum.com/t/rake-doc-plugins/134287)

<div class="topic-metadata">

**Author:** [@shikha](https://www.ruby-forum.com/u/shikha)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 7:14am UTC](https://www.ruby-forum.com/t/rake-doc-plugins/134287 "2008-04-10T07:14:07Z")

</div>

When I executed the command â€“ rake doc:plugins Rdoc â€“o doc/plugins/rspec â€“title … … … vendor/plugins/rspec/lib/spec.rb vendor/plugins/rspec/README Rake aborted! You have a nil object when you didnâ€™t expect…

---

## [Complex Form](https://www.ruby-forum.com/t/complex-form/134356)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 5\
**Last updated:** [April 10, 2008, 6:57am UTC](https://www.ruby-forum.com/t/complex-form/134356 "2008-04-10T06:57:07Z")

</div>

I’m rending a form of a table in a partial. The rows can be adjusted dynamically. How do I write 1 2 3 4 5 ?? \<%= render :partial =\> ‘round’, :collection =\> @game.rounds %\> \<% fields\_for\_round(round) do |round\_…

---

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

<div class="topic-metadata">

**Author:** [@gattone](https://www.ruby-forum.com/u/gattone)\
**Replies:** 2\
**Last updated:** [April 10, 2008, 6:55am UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many/134331 "2008-04-10T06:55:22Z")

</div>

Hi everyone. I’ve got the following in my model: class Newsletter \< ActiveRecord::Base has\_and\_belongs\_to\_many :tags def tag\_attributes=(tag\_attributes) tag\_attributes.each do |attributes| tags.build(attributes) e…

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

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