# Rails

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

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

---

## [Loading Seed Data from MySQL exported file](https://www.ruby-forum.com/t/loading-seed-data-from-mysql-exported-file/181787)

<div class="topic-metadata">

**Author:** [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Replies:** 6\
**Last updated:** [January 18, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/loading-seed-data-from-mysql-exported-file/181787 "2010-01-18T17:10:15Z")

</div>

Hello, I’m developing an application, and I want to automatically load seed data into database. The seed data exists in a SQL file (exported from MySQL database). I want the application to load such data when I make …

---

## [Disabling "Submit" button in form\_remote\_tag in dialog box](https://www.ruby-forum.com/t/disabling-submit-button-in-form-remote-tag-in-dialog-box/181804)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 4:42pm UTC](https://www.ruby-forum.com/t/disabling-submit-button-in-form-remote-tag-in-dialog-box/181804 "2010-01-18T16:42:35Z")

</div>

Hello all, I have a jQuery dialog that renders a search form using “form\_remote\_tag” \_searchDialog.html.erb - Please type IRB number or part of a number If search does not retrieve desired results, please …

---

## [Dreamhost & Rails](https://www.ruby-forum.com/t/dreamhost-rails/181664)

<div class="topic-metadata">

**Author:** [@dwdw](https://www.ruby-forum.com/u/dwdw)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/dreamhost-rails/181664 "2010-01-18T16:38:45Z")

</div>

Hello, I want to start my app in dreamhost but it’s impossible!! I emailed with support team, and I chatted with them, but every solutions was the same that I did. I create an app in SSH: $ script/generate controller…

---

## [Comment syntax and strange partial rendering](https://www.ruby-forum.com/t/comment-syntax-and-strange-partial-rendering/181777)

<div class="topic-metadata">

**Author:** [@brahn](https://www.ruby-forum.com/u/brahn)\
**Replies:** 8\
**Last updated:** [January 18, 2010, 3:40pm UTC](https://www.ruby-forum.com/t/comment-syntax-and-strange-partial-rendering/181777 "2010-01-18T15:40:41Z")

</div>

Using rails 2.3.2 I have a partial \_foo.rhtml that begins with a comment as follows: \<% # here is a comment %\> \<li\>\<%= foo %\>\</li\> When I render the partial from a view in the traditional way, e.g. \<% some\_numbers = …

---

## [Specifying the foreign key in a has\_many :through relationship](https://www.ruby-forum.com/t/specifying-the-foreign-key-in-a-has-many-through-relationship/181779)

<div class="topic-metadata">

**Author:** [@mark42](https://www.ruby-forum.com/u/mark42)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 3:37pm UTC](https://www.ruby-forum.com/t/specifying-the-foreign-key-in-a-has-many-through-relationship/181779 "2010-01-18T15:37:49Z")

</div>

I have the following three models: User, Project, and Assignment. A User has\_many Projects through an assignment. However, Assignment actually has TWO foreign keys that relate to a user: user\_id (representing the user…

---

## [Ruby Array to Java Script Array](https://www.ruby-forum.com/t/ruby-array-to-java-script-array/181783)

<div class="topic-metadata">

**Author:** [@tiwaripk](https://www.ruby-forum.com/u/tiwaripk)\
**Replies:** 7\
**Last updated:** [January 18, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/ruby-array-to-java-script-array/181783 "2010-01-18T15:34:58Z")

</div>

Hi, How can we use an array created in Ruby in Java script ? Regards, Prashant

---

## [SNMP in rails](https://www.ruby-forum.com/t/snmp-in-rails/181801)

<div class="topic-metadata">

**Author:** [@atheeq](https://www.ruby-forum.com/u/atheeq)\
**Replies:** 0\
**Last updated:** [January 18, 2010, 3:00pm UTC](https://www.ruby-forum.com/t/snmp-in-rails/181801 "2010-01-18T15:00:27Z")

</div>

Hello, Can any one please help me in converting this php code into ruby on rails? $oid = ‘1.3.6.1.4.1.318.1.1.12.3.3.1.1.4’; $row\[‘address’\] = xx.xx.xx.xx //contains an IP address. $row\[‘snmp\_community\_str’\]…

---

## [No such file to load -- chronic](https://www.ruby-forum.com/t/no-such-file-to-load-chronic/181793)

<div class="topic-metadata">

**Author:** [@oreng](https://www.ruby-forum.com/u/oreng)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 2:12pm UTC](https://www.ruby-forum.com/t/no-such-file-to-load-chronic/181793 "2010-01-18T14:12:16Z")

</div>

I have require ‘chronic’ in a controller but I get the above error when trying to see access this controller. I am using it in a cucmber step and it’s ok. the only issue is the controller. System info: ruby 1.9.1p24…

---

## [IIS + Apache + Mongrel: Problem with big data submit form](https://www.ruby-forum.com/t/iis-apache-mongrel-problem-with-big-data-submit-form/181343)

<div class="topic-metadata">

**Author:** [@viettrung\_do](https://www.ruby-forum.com/u/viettrung_do)\
**Replies:** 7\
**Last updated:** [January 18, 2010, 1:50pm UTC](https://www.ruby-forum.com/t/iis-apache-mongrel-problem-with-big-data-submit-form/181343 "2010-01-18T13:50:40Z")

</div>

Hi all, I deployed a Rails application on a Windows Server 2003 machine as follows: I created two instances of Mongrel at ports 4001, 4002 to serve the application I set up an Apache instance at port 8080 for ba…

---

## [Help with nested model forms](https://www.ruby-forum.com/t/help-with-nested-model-forms/181789)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 2\
**Last updated:** [January 18, 2010, 1:37pm UTC](https://www.ruby-forum.com/t/help-with-nested-model-forms/181789 "2010-01-18T13:37:09Z")

</div>

class Message \< ActiveRecord::Base belongs\_to :author accepts\_nested\_attributes\_for :author end I’m using the above and it’s working perfectly. The message gets saved with an author\_id attribute which references the…

---

## [Check\_box\_tag doesn't insert parameter into table](https://www.ruby-forum.com/t/check-box-tag-doesnt-insert-parameter-into-table/181724)

<div class="topic-metadata">

**Author:** [@Demetrius](https://www.ruby-forum.com/u/Demetrius)\
**Replies:** 3\
**Last updated:** [January 18, 2010, 11:59am UTC](https://www.ruby-forum.com/t/check-box-tag-doesnt-insert-parameter-into-table/181724 "2010-01-18T11:59:25Z")

</div>

Help! Can anyone see why my code isn’t inserting the course\_id parameter into my table? \<%= f.label :course\_id %\> \<% for course in current\_user.courses.find(:all, :order =\> 'order\_taught') %\> \<%= check\_bo…

---

## [Convert IP address to long](https://www.ruby-forum.com/t/convert-ip-address-to-long/181644)

<div class="topic-metadata">

**Author:** [@ashwin](https://www.ruby-forum.com/u/ashwin)\
**Replies:** 5\
**Last updated:** [January 18, 2010, 11:29am UTC](https://www.ruby-forum.com/t/convert-ip-address-to-long/181644 "2010-01-18T11:29:17Z")

</div>

Hi, I want to compare two IP addresses so I want to convert them to long integers. Can anyone tell me how it can be done? I need to convert IP address to long and after I have to convert them back to IP address. Tha…

---

## [Accessing Raw Post Data](https://www.ruby-forum.com/t/accessing-raw-post-data/181554)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 11\
**Last updated:** [January 18, 2010, 4:56am UTC](https://www.ruby-forum.com/t/accessing-raw-post-data/181554 "2010-01-18T04:56:12Z")

</div>

Rails conveniently packages post data in the params hash. The order in which data is stored in a hash is typically not the order in which the data was entered. Generally this is not a problem; however, there are som…

---

## [DRYing up helper](https://www.ruby-forum.com/t/drying-up-helper/181749)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 3\
**Last updated:** [January 18, 2010, 4:35am UTC](https://www.ruby-forum.com/t/drying-up-helper/181749 "2010-01-18T04:35:47Z")

</div>

Hi, I’m trying to make a helper in my application DRYer. Here is an edited version of the current relevant code: module MyControllerHelper PERSON\_FIELDS = \[‘last\_name’, ‘first\_name’\] ADDRESS\_FIELDS = \[‘address\_1’,…

---

## [Binarylogic-searchlogic ~\> 2.0 binarylogic-authlogic mbleigh-subdomain\_fu](https://www.ruby-forum.com/t/binarylogic-searchlogic-2-0-binarylogic-authlogic-mbleigh-subdomain-fu/181768)

<div class="topic-metadata">

**Author:** [@johnny](https://www.ruby-forum.com/u/johnny)\
**Replies:** 1\
**Last updated:** [January 18, 2010, 2:40am UTC](https://www.ruby-forum.com/t/binarylogic-searchlogic-2-0-binarylogic-authlogic-mbleigh-subdomain-fu/181768 "2010-01-18T02:40:27Z")

</div>

I am having problem starting my app, here’s the error message, i am running Ubuntu 9.04 with Apache with Passenger: The application has exited during startup (i.e. during the evaluation of config/environment.rb). The …

---

## [Beginner to Ruby](https://www.ruby-forum.com/t/beginner-to-ruby/181722)

<div class="topic-metadata">

**Author:** [@aksnavs](https://www.ruby-forum.com/u/aksnavs)\
**Replies:** 5\
**Last updated:** [January 18, 2010, 1:19am UTC](https://www.ruby-forum.com/t/beginner-to-ruby/181722 "2010-01-18T01:19:22Z")

</div>

Hello to all Ruby members, I am eager to learn Ruby for Rails… I just bought the book “Ruby For Rails” by David A. Black Is it good enough for the beginner like me to start with this book Please Suggest…

---

## [TUTORIAL - How to create and manage Mailers and Observers](https://www.ruby-forum.com/t/tutorial-how-to-create-and-manage-mailers-and-observers/181763)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 7\
**Last updated:** [January 18, 2010, 1:11am UTC](https://www.ruby-forum.com/t/tutorial-how-to-create-and-manage-mailers-and-observers/181763 "2010-01-18T01:11:22Z")

</div>

======================================================= | (TUTORIAL) - How to Create and Manage Your Mailers | Key Notes: Our pretend rails app is going to be called (mailbag). If I reference our rails application …

---

## ["Vary" header](https://www.ruby-forum.com/t/vary-header/181764)

<div class="topic-metadata">

**Author:** [@Guilherme\_Silveira](https://www.ruby-forum.com/u/Guilherme_Silveira)\
**Replies:** 0\
**Last updated:** [January 18, 2010, 1:02am UTC](https://www.ruby-forum.com/t/vary-header/181764 "2010-01-18T01:02:05Z")

</div>

Hello guys, Is there anyone trying to work with content negotiation and caching capabilities? The Vary header needs to be implemented and I am looking to see if someone has already implemented support to “Vary” when …

---

## [Object#send takes 10 seconds to complete](https://www.ruby-forum.com/t/object-send-takes-10-seconds-to-complete/181744)

<div class="topic-metadata">

**Author:** [@roallen](https://www.ruby-forum.com/u/roallen)\
**Replies:** 1\
**Last updated:** [January 17, 2010, 11:42pm UTC](https://www.ruby-forum.com/t/object-send-takes-10-seconds-to-complete/181744 "2010-01-17T23:42:29Z")

</div>

My rails app has over 400 models and close to 2000 methods. I call Object#send in one of them and in production it takes a 10-12 seconds for that call to complete. In development where config.cache\_classes = false, …

---

## [Issues in 0.3.3](https://www.ruby-forum.com/t/issues-in-0-3-3/181510)

<div class="topic-metadata">

**Author:** [@knapo](https://www.ruby-forum.com/u/knapo)\
**Replies:** 3\
**Last updated:** [January 17, 2010, 11:40pm UTC](https://www.ruby-forum.com/t/issues-in-0-3-3/181510 "2010-01-17T23:40:09Z")

</div>

Hi, After great Jose’s article at I started using 0.3.3 (thanks for great improvements!), unfortunately had some issue I reported on Issues · ruby-i18n/i18n · GitHub. Here are described fixes and more thoughts about…

---

## [Build translations from translations](https://www.ruby-forum.com/t/build-translations-from-translations/181751)

<div class="topic-metadata">

**Author:** [@james](https://www.ruby-forum.com/u/james)\
**Replies:** 0\
**Last updated:** [January 17, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/build-translations-from-translations/181751 "2010-01-17T20:17:40Z")

</div>

I’d like to do something like the following in my en.yml file: foo: “foo” bar: “bar” foobar: “{:foo} {:bar}” Some languages will demand that foobar come out as “{:bar} {:foo}” or some other combination. Is there sup…

---

## [Mapping locale to language name via the YML file](https://www.ruby-forum.com/t/mapping-locale-to-language-name-via-the-yml-file/181592)

<div class="topic-metadata">

**Author:** [@malesca](https://www.ruby-forum.com/u/malesca)\
**Replies:** 3\
**Last updated:** [January 17, 2010, 6:56pm UTC](https://www.ruby-forum.com/t/mapping-locale-to-language-name-via-the-yml-file/181592 "2010-01-17T18:56:16Z")

</div>

This is fairly obvious, but I thought I’d share since I haven’t seen quite this solution mentioned elsewhere. I wanted some way to map a locale (e.g. :en) to the language name (e.g. “English”) for a select box. Rather…

---

## [Globalize2 - virtual attributes to access field in a specific language directly](https://www.ruby-forum.com/t/globalize2-virtual-attributes-to-access-field-in-a-specific-language-directly/181583)

<div class="topic-metadata">

**Author:** [@hydrozen](https://www.ruby-forum.com/u/hydrozen)\
**Replies:** 2\
**Last updated:** [January 17, 2010, 4:05pm UTC](https://www.ruby-forum.com/t/globalize2-virtual-attributes-to-access-field-in-a-specific-language-directly/181583 "2010-01-17T16:05:24Z")

</div>

Hi, I just did a small extension to the translates method of globalize2 so that it defines a couple additional attributes to my model. For example, since my application supports french and english, when I do translat…

---

## [Noob Question D'Jour](https://www.ruby-forum.com/t/noob-question-djour/181726)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 3\
**Last updated:** [January 17, 2010, 9:22am UTC](https://www.ruby-forum.com/t/noob-question-djour/181726 "2010-01-17T09:22:48Z")

</div>

Hello and thank you in advance. I am fairly new to Ruby and Rails and am working on an app in order to get more familiar. I feel I should be able to solve this problem on my own but have thus far been stymied. Thanks …

---

## [Some routes don't load in production](https://www.ruby-forum.com/t/some-routes-dont-load-in-production/181730)

<div class="topic-metadata">

**Author:** [@carpeliam](https://www.ruby-forum.com/u/carpeliam)\
**Replies:** 0\
**Last updated:** [January 17, 2010, 9:21am UTC](https://www.ruby-forum.com/t/some-routes-dont-load-in-production/181730 "2010-01-17T09:21:38Z")

</div>

This one is really tricking me out. I’ve made a minimal sample app that reproduces the problem I’m facing, it’s at http://github.com/carpeliam/plogger\_ts\_devise\_problem\_example. Some minimal explanation is there as we…

---

## [Delayed Redirect](https://www.ruby-forum.com/t/delayed-redirect/181720)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 1\
**Last updated:** [January 17, 2010, 2:19am UTC](https://www.ruby-forum.com/t/delayed-redirect/181720 "2010-01-17T02:19:13Z")

</div>

I want to create a page that when it opens it waits about five seconds and then redirects the user to another page. Is this normally done with JS? What is the easiest way to do this rails. Thanks.

---

## [Do you love to submit Bug reports? I have a patch to add better HTTP OPTIONS support](https://www.ruby-forum.com/t/do-you-love-to-submit-bug-reports-i-have-a-patch-to-add-better-http-options-support/181677)

<div class="topic-metadata">

**Author:** [@coolaj86](https://www.ruby-forum.com/u/coolaj86)\
**Replies:** 1\
**Last updated:** [January 17, 2010, 1:36am UTC](https://www.ruby-forum.com/t/do-you-love-to-submit-bug-reports-i-have-a-patch-to-add-better-http-options-support/181677 "2010-01-17T01:36:31Z")

</div>

I’ve got a monkey patch to add support for HTTP OPTIONS. If it tickles your fancy to create and submit patched, tested bug reports, please take this opportunity to enjoy yourself, but the barrier to entry to learn how…

---

## [Authorize state transitions](https://www.ruby-forum.com/t/authorize-state-transitions/181723)

<div class="topic-metadata">

**Author:** [@hjhjhj](https://www.ruby-forum.com/u/hjhjhj)\
**Replies:** 0\
**Last updated:** [January 17, 2010, 1:25am UTC](https://www.ruby-forum.com/t/authorize-state-transitions/181723 "2010-01-17T01:25:23Z")

</div>

Does anybody know how to authorize state transitions? I’m using state\_machine in my rails app to define the state of an Article (published or unpublished). I’m also using declarative\_authorization to determine the aut…

---

## [Dynamic Assets - can it be done?](https://www.ruby-forum.com/t/dynamic-assets-can-it-be-done/181641)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 21\
**Last updated:** [January 17, 2010, 1:25am UTC](https://www.ruby-forum.com/t/dynamic-assets-can-it-be-done/181641 "2010-01-17T01:25:23Z")

</div>

I’m looking for 3 areas to work as dynamic assets: image\_path, javascript\_path, and stylesheet\_path When I say dynamic, I mean that they will be dynamic through controller/models. I have been working through approx. …

---

## [Problem with 3-tier delete](https://www.ruby-forum.com/t/problem-with-3-tier-delete/181717)

<div class="topic-metadata">

**Author:** [@sultan](https://www.ruby-forum.com/u/sultan)\
**Replies:** 0\
**Last updated:** [January 16, 2010, 10:46pm UTC](https://www.ruby-forum.com/t/problem-with-3-tier-delete/181717 "2010-01-16T22:46:09Z")

</div>

When I try to delete a grandfather in a grandfather, father & son relationship as in the following, the grandfather and all the associated fathers are deleted, but the sons are left as orphans. It seems ROR can do a 2…

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

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