# Rails

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

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

---

## [Undefined method \`include?'](https://www.ruby-forum.com/t/undefined-method-include/154724)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 1\
**Last updated:** [December 3, 2008, 10:14am UTC](https://www.ruby-forum.com/t/undefined-method-include/154724 "2008-12-03T10:14:50Z")

</div>

Hi guys, I was just working on this application (http://pastie.org/329613) when I added this line “session\[:user\].include?(params\[:id\])” to an unless statement and the app threw this error: NoMethodError in SignupsCo…

---

## [Can I export db data to fixtures?](https://www.ruby-forum.com/t/can-i-export-db-data-to-fixtures/154604)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 5\
**Last updated:** [December 3, 2008, 10:10am UTC](https://www.ruby-forum.com/t/can-i-export-db-data-to-fixtures/154604 "2008-12-03T10:10:18Z")

</div>

Hi Guys, Is there any way to export db data to fixtures files? (like the reverse of “rake db:fixtures:load”) Thanks, Arthur

---

## [Authenticity Token change under 2.2.2?](https://www.ruby-forum.com/t/authenticity-token-change-under-2-2-2/154692)

<div class="topic-metadata">

**Author:** [@sijomo](https://www.ruby-forum.com/u/sijomo)\
**Replies:** 4\
**Last updated:** [December 3, 2008, 9:14am UTC](https://www.ruby-forum.com/t/authenticity-token-change-under-2-2-2/154692 "2008-12-03T09:14:26Z")

</div>

Hi, We have the following code which sends a request on unload of one of our pages. It was working fine until I upgraded to rails 2.2.2, but now is giving ‘ActionController::InvalidAuthenticityToken (ActionController…

---

## [Collect issue](https://www.ruby-forum.com/t/collect-issue/154717)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 1\
**Last updated:** [December 3, 2008, 9:03am UTC](https://www.ruby-forum.com/t/collect-issue/154717 "2008-12-03T09:03:18Z")

</div>

Hi all, I am filtering products specs = Product.find(:all, :conditions =\> \[ … \], :order =\> “…”) @products = specs.collect { |spec| spec.??? } And I would like to collect all of the product fields. I dont know what t…

---

## [How to set no cach in rails?](https://www.ruby-forum.com/t/how-to-set-no-cach-in-rails/154714)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 0\
**Last updated:** [December 3, 2008, 7:35am UTC](https://www.ruby-forum.com/t/how-to-set-no-cach-in-rails/154714 "2008-12-03T07:35:58Z")

</div>

Dear all, I have been using ajax concept in my application, as the updates are not made properly, and once i clear cache in firefox and temporary internet files in IE& iam getting the reult properly. So i have decide…

---

## [Window size](https://www.ruby-forum.com/t/window-size/154713)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [December 3, 2008, 7:33am UTC](https://www.ruby-forum.com/t/window-size/154713 "2008-12-03T07:33:11Z")

</div>

I hope someone could help me on my problem. I want to show my div(User Add Form) at center of the browser window.like pop up window.the Pop-Up has to be shown at center of the browser’s window I used this code.In Fir…

---

## [Getting IP address through Ruby On Rails](https://www.ruby-forum.com/t/getting-ip-address-through-ruby-on-rails/154639)

<div class="topic-metadata">

**Author:** [@hema\_mca](https://www.ruby-forum.com/u/hema_mca)\
**Replies:** 2\
**Last updated:** [December 3, 2008, 6:39am UTC](https://www.ruby-forum.com/t/getting-ip-address-through-ruby-on-rails/154639 "2008-12-03T06:39:56Z")

</div>

Hi, Can Anyone tell me how to get the IP address of the system through rails application? The system’s IP on which the application running Thanks,

---

## [Drag & drop, file renaming, updation using ajax doesnt work?](https://www.ruby-forum.com/t/drag-drop-file-renaming-updation-using-ajax-doesnt-work/154712)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 0\
**Last updated:** [December 3, 2008, 6:21am UTC](https://www.ruby-forum.com/t/drag-drop-file-renaming-updation-using-ajax-doesnt-work/154712 "2008-12-03T06:21:14Z")

</div>

Dear all, I was struck in a task for changing the banner images. Actually my task was, I have a folder banner inside images. It contains some sample gif images. I need to display the current banner image. Like i hav…

---

## [Best route for has\_many subrecords](https://www.ruby-forum.com/t/best-route-for-has-many-subrecords/154709)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 0\
**Last updated:** [December 3, 2008, 6:08am UTC](https://www.ruby-forum.com/t/best-route-for-has-many-subrecords/154709 "2008-12-03T06:08:56Z")

</div>

Hello all, I have a model, say it’s called Person, which has\_many Responsibilities. I would like the “show” view for the person controller to list all of the responsibilities for that person. (That’s the easy part –…

---

## [Rails on shared hosting](https://www.ruby-forum.com/t/rails-on-shared-hosting/154589)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 13\
**Last updated:** [December 3, 2008, 5:27am UTC](https://www.ruby-forum.com/t/rails-on-shared-hosting/154589 "2008-12-03T05:27:57Z")

</div>

Dear all, Has anyone run RoR on cPanel based shared hosting? I’ve got my RoR application on http://mydomain:10024/ Now I’ve uploaded all my Product model, view and controller. Then I tried hitting: http://mydomain:10…

---

## [To het element's height and width](https://www.ruby-forum.com/t/to-het-elements-height-and-width/154622)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [December 3, 2008, 5:06am UTC](https://www.ruby-forum.com/t/to-het-elements-height-and-width/154622 "2008-12-03T05:06:16Z")

</div>

Hi… i m trying to give my form opacity effect with external javascript. In that i want to get div element’s height and width. My div width is fixed like 500px. Height is not fixed one. According to the content it il…

---

## [Checking if an association already exists between two records](https://www.ruby-forum.com/t/checking-if-an-association-already-exists-between-two-records/154558)

<div class="topic-metadata">

**Author:** [@GearSSS\_id\_OSCealla](https://www.ruby-forum.com/u/GearSSS_id_OSCealla)\
**Replies:** 3\
**Last updated:** [December 3, 2008, 4:25am UTC](https://www.ruby-forum.com/t/checking-if-an-association-already-exists-between-two-records/154558 "2008-12-03T04:25:25Z")

</div>

Hey, I’m creating an app which has two models - bands and users. A relationship between users and bands in many to many. However, when I’m adding an existing to user to a band (ie. updating the bands\_users table) how…

---

## [Ruby can't do arithmetic? How do I fix this?](https://www.ruby-forum.com/t/ruby-cant-do-arithmetic-how-do-i-fix-this/154701)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 4\
**Last updated:** [December 3, 2008, 3:55am UTC](https://www.ruby-forum.com/t/ruby-cant-do-arithmetic-how-do-i-fix-this/154701 "2008-12-03T03:55:35Z")

</div>

Hi, I have this code @accept\_ratio = @no\_quotes / @no\_accepted\_quotes. I am deviding an integer by an integer but the resultant is not an iterger it should be floating to x decimal places. I was under the impression …

---

## [A question about link\_to tag](https://www.ruby-forum.com/t/a-question-about-link-to-tag/154625)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 2\
**Last updated:** [December 3, 2008, 3:30am UTC](https://www.ruby-forum.com/t/a-question-about-link-to-tag/154625 "2008-12-03T03:30:58Z")

</div>

Please see this code: \<%= link\_to ‘New info’, new\_info\_path %\> I wander what new\_info\_path means?

---

## [Win32/service problems on Server 2003](https://www.ruby-forum.com/t/win32-service-problems-on-server-2003/154702)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 0\
**Last updated:** [December 3, 2008, 3:20am UTC](https://www.ruby-forum.com/t/win32-service-problems-on-server-2003/154702 "2008-12-03T03:20:45Z")

</div>

Hello, I’m trying to get a basic service running on my development box. For testing purposes, I’m using the demo\_daemon.rb and demo\_daemon\_ctl.rb that come as working examples with the gem. On my WinXP machine (with …

---

## [Retitled: Best way to customize \<option\> tags in Rails](https://www.ruby-forum.com/t/retitled-best-way-to-customize-option-tags-in-rails/154697)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [December 3, 2008, 1:47am UTC](https://www.ruby-forum.com/t/retitled-best-way-to-customize-option-tags-in-rails/154697 "2008-12-03T01:47:05Z")

</div>

All, (sorry, I mis-titled this post as “Best way to add custom onclick handler to select options” and posted it before I could fix the title). I want to make an individual in a act as an in-place edit field. I get…

---

## [Best way to add custom onclick handler to select options](https://www.ruby-forum.com/t/best-way-to-add-custom-onclick-handler-to-select-options/154694)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [December 3, 2008, 1:45am UTC](https://www.ruby-forum.com/t/best-way-to-add-custom-onclick-handler-to-select-options/154694 "2008-12-03T01:45:16Z")

</div>

All, I want to make an individual in a act as an in-place edit field. I get how the in\_place\_editor works, and it appears if I simply place a tag “around” the of interest, and then mark this tag as the edit-in-pl…

---

## [BOM Component](https://www.ruby-forum.com/t/bom-component/149372)

<div class="topic-metadata">

**Author:** [@justin](https://www.ruby-forum.com/u/justin)\
**Replies:** 2\
**Last updated:** [December 3, 2008, 12:13am UTC](https://www.ruby-forum.com/t/bom-component/149372 "2008-12-03T00:13:47Z")

</div>

I’ve been using an excel spreadsheet to track our component bill of materials and would like to migrate to a more robust system. Does anyone know of a Bill of Material component that supports multiple parent / child …

---

## [Trying to get started](https://www.ruby-forum.com/t/trying-to-get-started/154655)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 10\
**Last updated:** [December 2, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/trying-to-get-started/154655 "2008-12-02T23:51:06Z")

</div>

I’m having a lot of trouble getting going in InstantRails on Windows in a new development installation. I should mention that I’ve installed InstantRails 2.0 on this machine, and I’m using cygwin over windows for comm…

---

## [Does a method string.to\_class exist?](https://www.ruby-forum.com/t/does-a-method-string-to-class-exist/154675)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 2\
**Last updated:** [December 2, 2008, 11:30pm UTC](https://www.ruby-forum.com/t/does-a-method-string-to-class-exist/154675 "2008-12-02T23:30:08Z")

</div>

I have A Definition model, is it possible to do something like this in Rails 2.1.0, Ruby 1.8.6 : foo = “Definition” @definition = foo.to\_class.find(:all)

---

## [Select boxes for country and state](https://www.ruby-forum.com/t/select-boxes-for-country-and-state/154686)

<div class="topic-metadata">

**Author:** [@ali](https://www.ruby-forum.com/u/ali)\
**Replies:** 0\
**Last updated:** [December 2, 2008, 11:08pm UTC](https://www.ruby-forum.com/t/select-boxes-for-country-and-state/154686 "2008-12-02T23:08:45Z")

</div>

Hello I’ve a user model which I would like to assign a state and municipal. Can some one tell me how should I do that? I tried “Dynamic Select Boxes” solution, but I couldn’t get the expected solution. I also tried #…

---

## [Incompatible versioning of InstantRails?](https://www.ruby-forum.com/t/incompatible-versioning-of-instantrails/154584)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 2\
**Last updated:** [December 2, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/incompatible-versioning-of-instantrails/154584 "2008-12-02T23:03:29Z")

</div>

I’m trying to get InstantRails running on a different computer than I originally started and I’ve gotten stuck. I kind of think it’s a versioning issue, but don’t have a real good “reason why” I think that. Here’s th…

---

## [Generating ERB directly from RoR code](https://www.ruby-forum.com/t/generating-erb-directly-from-ror-code/154674)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 1\
**Last updated:** [December 2, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/generating-erb-directly-from-ror-code/154674 "2008-12-02T22:23:38Z")

</div>

I have a situation where it would be useful to generate ERB directly from Rails code, rather than taking it from a file. Is this possible? If so, how would one go about it? Thanks, Ken McDonald

---

## [Wich scraping tool?](https://www.ruby-forum.com/t/wich-scraping-tool/154680)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 0\
**Last updated:** [December 2, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/wich-scraping-tool/154680 "2008-12-02T21:53:22Z")

</div>

Hi, I want to develop a scraping tool. What is the best tool to use? scrubyt? hpricot? other? remco

---

## [Record to RTF linefeed problem](https://www.ruby-forum.com/t/record-to-rtf-linefeed-problem/154679)

<div class="topic-metadata">

**Author:** [@rudy](https://www.ruby-forum.com/u/rudy)\
**Replies:** 0\
**Last updated:** [December 2, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/record-to-rtf-linefeed-problem/154679 "2008-12-02T21:47:18Z")

</div>

Hi, looks like a classic problem, but can’t find a real solution anywhere. Im using the Ruby rtf plugin. I get a record from the DB with in there a large textfield, WITH linefeeds. (I can see them in de record in php…

---

## [ActiveResource - xml and json format return different results](https://www.ruby-forum.com/t/activeresource-xml-and-json-format-return-different-results/154642)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 2\
**Last updated:** [December 2, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/activeresource-xml-and-json-format-return-different-results/154642 "2008-12-02T21:12:03Z")

</div>

Hi, I’m using Rails 2.1.2. and I wanted to switch ActiveResource format to JSON and thought that it will work smoothly, but unfortunately it wasn’t the case. XML and JSON formats generate different objects: XML vers…

---

## [Debian packages for Passenger](https://www.ruby-forum.com/t/debian-packages-for-passenger/154671)

<div class="topic-metadata">

**Author:** [@Alban\_P](https://www.ruby-forum.com/u/Alban_P)\
**Replies:** 0\
**Last updated:** [December 2, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/debian-packages-for-passenger/154671 "2008-12-02T20:43:15Z")

</div>

Hi all, Ubuntu packages provided by Brightbox have been backported to debian. They are available for etch, lenny and sid on i386 and amd64. For more details : http://blog.tryphon.org/alban/archives/2008/12/02/debian-…

---

## [Rails: database connection](https://www.ruby-forum.com/t/rails-database-connection/154660)

<div class="topic-metadata">

**Author:** [@geneeyuss](https://www.ruby-forum.com/u/geneeyuss)\
**Replies:** 8\
**Last updated:** [December 2, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/rails-database-connection/154660 "2008-12-02T20:10:55Z")

</div>

I have been using rails to talk to MySQL. I followed the below tutorial and I have been getting erros on using rake db:migrate. Could some let me know how to resolve it. Tutorial: Error: srilatha-bhuvanapallis-mac…

---

## [ActionController::UnknownAction (No action responded to 1):](https://www.ruby-forum.com/t/actioncontroller-unknownaction-no-action-responded-to-1/127773)

<div class="topic-metadata">

**Author:** [@juano](https://www.ruby-forum.com/u/juano)\
**Replies:** 3\
**Last updated:** [December 2, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/actioncontroller-unknownaction-no-action-responded-to-1/127773 "2008-12-02T19:51:33Z")

</div>

Im new to ROR but i started prior to ROR 2.02. I spent a lot of time with the Depot app from “Agile web development 2nd” then upgraded to 2.02 and have learned alot getting the Depot app to work. the app works well ex…

---

## [Sharing a partial between multiple controllers](https://www.ruby-forum.com/t/sharing-a-partial-between-multiple-controllers/154659)

<div class="topic-metadata">

**Author:** [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Replies:** 4\
**Last updated:** [December 2, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/sharing-a-partial-between-multiple-controllers/154659 "2008-12-02T19:41:31Z")

</div>

I want to share a partial between 2 or more controllers. I have a “location” partial that I want users to enter “Address, City, State, Zip” information in however I have “Payees”, “Institution”, and “Event” models tha…

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

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