# Rails

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

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

---

## [Calculate Compound interest](https://www.ruby-forum.com/t/calculate-compound-interest/160849)

<div class="topic-metadata">

**Author:** [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Replies:** 1\
**Last updated:** [February 20, 2009, 9:25am UTC](https://www.ruby-forum.com/t/calculate-compound-interest/160849 "2009-02-20T09:25:45Z")

</div>

Hi I want to calculate compound interest on monthly and daily basis. I am doing this with the formula. Now the question is wats the syntax for ^ in raise to since i want to do something like A= p(1+R)^N Now ^ symbol…

---

## [HABTM creating duplicate records in test environment](https://www.ruby-forum.com/t/habtm-creating-duplicate-records-in-test-environment/160779)

<div class="topic-metadata">

**Author:** [@lee](https://www.ruby-forum.com/u/lee)\
**Replies:** 2\
**Last updated:** [February 20, 2009, 8:58am UTC](https://www.ruby-forum.com/t/habtm-creating-duplicate-records-in-test-environment/160779 "2009-02-20T08:58:13Z")

</div>

I have the following HABTM associations between two models, MemberEntityAccessibility and MemberEntity: has\_and\_belongs\_to\_many :member\_entities, :class\_name =\> "MemberEntity", …

---

## [Javascript](https://www.ruby-forum.com/t/javascript/160838)

<div class="topic-metadata">

**Author:** [@nisha\_t](https://www.ruby-forum.com/u/nisha_t)\
**Replies:** 3\
**Last updated:** [February 20, 2009, 8:57am UTC](https://www.ruby-forum.com/t/javascript/160838 "2009-02-20T08:57:02Z")

</div>

Please tell me how to integrate javascript in ruby code(in rhtml page)

---

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

<div class="topic-metadata">

**Author:** [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Replies:** 3\
**Last updated:** [February 20, 2009, 8:06am UTC](https://www.ruby-forum.com/t/validates-uniqueness-of/160827 "2009-02-20T08:06:02Z")

</div>

i have a table called requests which save the data of a form. but whenever i refresh the browser it again resubmit.it includes the following fields user\_id, arrival, departure, date this table can include same user\_i…

---

## [Fckeditor and rails 2.2.2](https://www.ruby-forum.com/t/fckeditor-and-rails-2-2-2/159124)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 1\
**Last updated:** [February 20, 2009, 7:56am UTC](https://www.ruby-forum.com/t/fckeditor-and-rails-2-2-2/159124 "2009-02-20T07:56:40Z")

</div>

Hi there after I upgraded to rails 2.2.2, i got the error -\> undefined fckeditor\_textarea method while it works fine on rails 2.1.0 any idea?

---

## [TinyMCE Editor](https://www.ruby-forum.com/t/tinymce-editor/160834)

<div class="topic-metadata">

**Author:** [@madhavi.k](https://www.ruby-forum.com/u/madhavi.k)\
**Replies:** 2\
**Last updated:** [February 20, 2009, 7:46am UTC](https://www.ruby-forum.com/t/tinymce-editor/160834 "2009-02-20T07:46:04Z")

</div>

Can you tell me the TinyMCE Editor is available in the gemlist? If so, how to implement it?

---

## [Javascript](https://www.ruby-forum.com/t/javascript/160844)

<div class="topic-metadata">

**Author:** [@nisha\_t](https://www.ruby-forum.com/u/nisha_t)\
**Replies:** 0\
**Last updated:** [February 20, 2009, 7:40am UTC](https://www.ruby-forum.com/t/javascript/160844 "2009-02-20T07:40:49Z")

</div>

How to give name for form\_for tag, so that javascript manipulation can be done on it

---

## [How to Generate Controllers from the command line](https://www.ruby-forum.com/t/how-to-generate-controllers-from-the-command-line/160791)

<div class="topic-metadata">

**Author:** [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Replies:** 6\
**Last updated:** [February 20, 2009, 7:12am UTC](https://www.ruby-forum.com/t/how-to-generate-controllers-from-the-command-line/160791 "2009-02-20T07:12:07Z")

</div>

Am I doing this correct. ruby script/generate controller Site index about help after I run the line above from the command prompt it spits out exists app/controllers/ exist app/helpers/ create app/views/site Etc… W…

---

## [Hash](https://www.ruby-forum.com/t/hash/160757)

<div class="topic-metadata">

**Author:** [@cyrus](https://www.ruby-forum.com/u/cyrus)\
**Replies:** 4\
**Last updated:** [February 20, 2009, 7:06am UTC](https://www.ruby-forum.com/t/hash/160757 "2009-02-20T07:06:51Z")

</div>

Hello all any one has idea how to add new column to existing hash array ? I have one hash instance like @restaurant using each with index i m looping it and want to add new key and value to each row how can i do th…

---

## [Create nested hash from array of objects](https://www.ruby-forum.com/t/create-nested-hash-from-array-of-objects/160824)

<div class="topic-metadata">

**Author:** [@northband](https://www.ruby-forum.com/u/northband)\
**Replies:** 2\
**Last updated:** [February 20, 2009, 6:06am UTC](https://www.ruby-forum.com/t/create-nested-hash-from-array-of-objects/160824 "2009-02-20T06:06:34Z")

</div>

Hi - What is the best way to create a nested hash from an array of objects? Here’s what I’m trying to do, take my array of objects and use the attribute ‘position’ as a key for each nested hash. The nested hash will…

---

## [Removing \<p\> from RedCloth](https://www.ruby-forum.com/t/removing-p-from-redcloth/157545)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 6\
**Last updated:** [February 20, 2009, 5:59am UTC](https://www.ruby-forum.com/t/removing-p-from-redcloth/157545 "2009-02-20T05:59:49Z")

</div>

Everytime I do to\_html with RedCloth it wraps the entire thing in which is really annoying. I’ve looked all over for an answer on how to disable this but I’ve found nothing. I’m surprised that I’m the only one that …

---

## [Auto complete for 2 tables](https://www.ruby-forum.com/t/auto-complete-for-2-tables/160835)

<div class="topic-metadata">

**Author:** [@priyadharsini](https://www.ruby-forum.com/u/priyadharsini)\
**Replies:** 0\
**Last updated:** [February 20, 2009, 5:54am UTC](https://www.ruby-forum.com/t/auto-complete-for-2-tables/160835 "2009-02-20T05:54:25Z")

</div>

Hi all, I’m using autocomplete in my application. I’m able to take values from single table for auto complete. Now i need to take values from two tables using many-to-many relationship. Actually i have to tables item…

---

## [Check the performance of helpers](https://www.ruby-forum.com/t/check-the-performance-of-helpers/160754)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 2\
**Last updated:** [February 20, 2009, 5:45am UTC](https://www.ruby-forum.com/t/check-the-performance-of-helpers/160754 "2009-02-20T05:45:46Z")

</div>

how to check the performance of helpers. For ex if am using content\_tag for creating li instead of writing directly.I want to check how much time content\_tag will take time to excute as

---

## [Trouble installing rails on CentOS 5.2](https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728)

<div class="topic-metadata">

**Author:** [@paryankkansara](https://www.ruby-forum.com/u/paryankkansara)\
**Replies:** 2\
**Last updated:** [February 20, 2009, 5:40am UTC](https://www.ruby-forum.com/t/trouble-installing-rails-on-centos-5-2/160728 "2009-02-20T05:40:07Z")

</div>

My PC is running CentOS 5.2 with Ruby 1.8.6 and Ruby-devel package installed. I have installed RubyGems by downloading rubygems-1.3.1.tgz from rubyforge.org. Now I am trying to install Rails by the following command: …

---

## [Weird ajax problem](https://www.ruby-forum.com/t/weird-ajax-problem/160737)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 1\
**Last updated:** [February 20, 2009, 4:07am UTC](https://www.ruby-forum.com/t/weird-ajax-problem/160737 "2009-02-20T04:07:45Z")

</div>

I put together a search based on a text field and a form observer. The observer triggers an ajax method that does a paginated search of a large number of items and does a render :update to update the list of items wi…

---

## [Realising a kind of virtual methods](https://www.ruby-forum.com/t/realising-a-kind-of-virtual-methods/160761)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 2\
**Last updated:** [February 20, 2009, 3:48am UTC](https://www.ruby-forum.com/t/realising-a-kind-of-virtual-methods/160761 "2009-02-20T03:48:30Z")

</div>

Hey, I want to realise some kind of virtual methods. I’ll explain this with an example: Let’s assume I’ve got a class called “Animal”. Every “Animal” instance can have various attributes, which are not fix, they depe…

---

## [Soft delete in HABTM tables](https://www.ruby-forum.com/t/soft-delete-in-habtm-tables/160739)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 10\
**Last updated:** [February 20, 2009, 3:02am UTC](https://www.ruby-forum.com/t/soft-delete-in-habtm-tables/160739 "2009-02-20T03:02:41Z")

</div>

Hi, I’m having a HABTM relationship between profiles and users where User and Profile are having a many to many relationship. User Model: has\_and\_belongs\_to\_many :Profiles Profile Model: has\_and\_belongs\_to\_many :Use…

---

## [Clilking on a link should replace that link with a form](https://www.ruby-forum.com/t/clilking-on-a-link-should-replace-that-link-with-a-form/160742)

<div class="topic-metadata">

**Author:** [@andrew](https://www.ruby-forum.com/u/andrew)\
**Replies:** 3\
**Last updated:** [February 20, 2009, 2:47am UTC](https://www.ruby-forum.com/t/clilking-on-a-link-should-replace-that-link-with-a-form/160742 "2009-02-20T02:47:29Z")

</div>

Hi everyone! I’m new to Ruby and JS, and there is a problem I’m trying to solve: I need a link that, when clicked, transforms into a form for inputting data. I have next code: (show.html.erb) \<%= link\_to\_remote…

---

## [ActionMailer question](https://www.ruby-forum.com/t/actionmailer-question/160818)

<div class="topic-metadata">

**Author:** [@Alexander\_Annese](https://www.ruby-forum.com/u/Alexander_Annese)\
**Replies:** 1\
**Last updated:** [February 20, 2009, 2:34am UTC](https://www.ruby-forum.com/t/actionmailer-question/160818 "2009-02-20T02:34:36Z")

</div>

http://pastie.org/394347 I’m trying to concat a few things inside the subject portion of an actionmailer method, is it possible?

---

## [ActiveRecord-2.2.2, association preloading, joins and order parameter weirdness](https://www.ruby-forum.com/t/activerecord-2-2-2-association-preloading-joins-and-order-parameter-weirdness/160817)

<div class="topic-metadata">

**Author:** [@michaelb](https://www.ruby-forum.com/u/michaelb)\
**Replies:** 1\
**Last updated:** [February 20, 2009, 12:07am UTC](https://www.ruby-forum.com/t/activerecord-2-2-2-association-preloading-joins-and-order-parameter-weirdness/160817 "2009-02-20T00:07:46Z")

</div>

Hello RoR Groupies, I’m seeing some weird ActiveRecord-2.2.2 SQL generation when doing eager association/preloading and using joins and ordering by said join table. Here’s an example: class Photo \< ActiveRecord::Bas…

---

## [Ruby On Rails Consultant Position In New York City](https://www.ruby-forum.com/t/ruby-on-rails-consultant-position-in-new-york-city/160819)

<div class="topic-metadata">

**Author:** [@irene](https://www.ruby-forum.com/u/irene)\
**Replies:** 0\
**Last updated:** [February 20, 2009, 12:04am UTC](https://www.ruby-forum.com/t/ruby-on-rails-consultant-position-in-new-york-city/160819 "2009-02-20T00:04:51Z")

</div>

IRENE CAPPUCCINO IMC ASSOCIATES 6 Moyse Pl., Edison, NJ 08820 Office: (908) 608-9111 Fax: (908) 608-9115 removed\_email\_address@domain.invalid \*\*\*\*\*\*\*\*\*\* HOT JOB OPENING AS OF 2/19/09 \*\*\*\*\*\*\*\*\*\* Ruby On Rails Develo…

---

## [Rcov not detecting request.xhr? test](https://www.ruby-forum.com/t/rcov-not-detecting-request-xhr-test/160815)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 11:23pm UTC](https://www.ruby-forum.com/t/rcov-not-detecting-request-xhr-test/160815 "2009-02-19T23:23:49Z")

</div>

I have a method def index if request.xhr? @users = User.find( :all ) end end And then I have a test for it: def test\_index user = users( :foo ) xhr :post, :index, {}, { :user\_id =\> user.user\_id } assert\_respons…

---

## [Error: uninitialized constant Authlogic](https://www.ruby-forum.com/t/error-uninitialized-constant-authlogic/158534)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 19, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/error-uninitialized-constant-authlogic/158534 "2009-02-19T23:20:18Z")

</div>

Hello, I’m a Ruby / Rails beginner and tried to use the Authlogic plugin which I have found here: http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup However I run into this error: uninitialized cons…

---

## [Electronic postage?](https://www.ruby-forum.com/t/electronic-postage/160813)

<div class="topic-metadata">

**Author:** [@ewo](https://www.ruby-forum.com/u/ewo)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/electronic-postage/160813 "2009-02-19T23:04:29Z")

</div>

Does anyone have any experience using electronic postage? We have a site that needs to send acknowledgement cards periodically using snail mail. We would like to print the whole card, including postage, all at once. T…

---

## [Windows Live Contacts API](https://www.ruby-forum.com/t/windows-live-contacts-api/160810)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/windows-live-contacts-api/160810 "2009-02-19T22:32:43Z")

</div>

I am trying to connect to the Windows Live Contacts REST API. In addition to an authentication header, the URL to retrieve data looks like this: https://livecontacts.services.live.com/users/@L@XXXXXXX/rest/LiveContact…

---

## [Photos display on the same page](https://www.ruby-forum.com/t/photos-display-on-the-same-page/159749)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/photos-display-on-the-same-page/159749 "2009-02-19T22:05:04Z")

</div>

Hi there I saw a nice way of displaying photos using rails, it is like the one in the following link http://www.opensourcerails.com/projects/16425-pictrails anyone knows the name of the plugin or the way to do it

---

## [ActiveRecord to\_xml includes](https://www.ruby-forum.com/t/activerecord-to-xml-includes/160806)

<div class="topic-metadata">

**Author:** [@Rodrigo\_K](https://www.ruby-forum.com/u/Rodrigo_K)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/activerecord-to-xml-includes/160806 "2009-02-19T21:53:12Z")

</div>

Guys Supposing I have three models Company has\_many :people Person has\_many :addresses Shouldn’t this work? a\_company.to\_xml(:include =\> {:people =\> :addresses}) I get this exception: TypeError: can’t convert Symb…

---

## [STI, polymorphism and base\_class?](https://www.ruby-forum.com/t/sti-polymorphism-and-base-class/143309)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 3\
**Last updated:** [February 19, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/sti-polymorphism-and-base-class/143309 "2009-02-19T21:18:05Z")

</div>

So a while back, I stumbled over here: http://dev.rubyonrails.org/ticket/8841 Turns out I was having problems because what seemed to me a bug: with a polymorphic relationship that also uses STI, Rails stores the type …

---

## [Job Opportunity - ROR Programmer - Austin, TX](https://www.ruby-forum.com/t/job-opportunity-ror-programmer-austin-tx/160803)

<div class="topic-metadata">

**Author:** [@heathers](https://www.ruby-forum.com/u/heathers)\
**Replies:** 0\
**Last updated:** [February 19, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/job-opportunity-ror-programmer-austin-tx/160803 "2009-02-19T21:16:43Z")

</div>

Ruby on Rails Programmer - Otherinbox OtherInbox is looking to hire an experienced Ruby On Rails Programmer to join our team. We are looking for a highly motivated, goal-oriented individual who will be responsible for…

---

## [Link path](https://www.ruby-forum.com/t/link-path/160801)

<div class="topic-metadata">

**Author:** [@bobbysantiago](https://www.ruby-forum.com/u/bobbysantiago)\
**Replies:** 1\
**Last updated:** [February 19, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/link-path/160801 "2009-02-19T21:06:10Z")

</div>

Just stepped over to Rails 2.3… I used scaffold to generate pages, it showed “show”, “edit” and “destroy”. I just changed the layout template and now the link paths are behind show. Ex: “show (registration/1)” How to …

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

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