# Rails

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

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

---

## [Recursive self-referential many-to-many relationship](https://www.ruby-forum.com/t/recursive-self-referential-many-to-many-relationship/190142)

<div class="topic-metadata">

**Author:** [@tobyr](https://www.ruby-forum.com/u/tobyr)\
**Replies:** 7\
**Last updated:** [June 18, 2010, 2:04pm UTC](https://www.ruby-forum.com/t/recursive-self-referential-many-to-many-relationship/190142 "2010-06-18T14:04:15Z")

</div>

I have a ‘Circuit’ table, and a ‘Glue’ table to perform a many-to-many join on the circuit records, such at a circuit can have many subcircuits (its component parts) and many supercircuits (circuits which it itself is…

---

## [Render JSONp format](https://www.ruby-forum.com/t/render-jsonp-format/190350)

<div class="topic-metadata">

**Author:** [@geoff](https://www.ruby-forum.com/u/geoff)\
**Replies:** 1\
**Last updated:** [June 18, 2010, 12:35pm UTC](https://www.ruby-forum.com/t/render-jsonp-format/190350 "2010-06-18T12:35:31Z")

</div>

I see that rendering json arrays is very simple but JQuery needs to have a jsonp format for cross domain requests. is there a way to have rails output in the jsonp format? Thanks in advance

---

## ["LoadError: no such file to load -- openssl", following Rails Guides](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-openssl-following-rails-guides/190335)

<div class="topic-metadata">

**Author:** [@James\_Fisher](https://www.ruby-forum.com/u/James_Fisher)\
**Replies:** 2\
**Last updated:** [June 18, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-openssl-following-rails-guides/190335 "2010-06-18T12:20:54Z")

</div>

\[With apologies for cross-posting at http://railsforum.com/viewtopic.php?id=39587\] Hi all, I’m following the edge ‘getting started’ guide at rails.info, running ROR 3. I’m running Ruby 1.9.2 (as instructed by the g…

---

## [Simple search in ror](https://www.ruby-forum.com/t/simple-search-in-ror/190354)

<div class="topic-metadata">

**Author:** [@punkaruby](https://www.ruby-forum.com/u/punkaruby)\
**Replies:** 0\
**Last updated:** [June 18, 2010, 11:51am UTC](https://www.ruby-forum.com/t/simple-search-in-ror/190354 "2010-06-18T11:51:03Z")

</div>

Hi, i need to implement a simple text function for the app i dev now. 1- the form in app/views/layouts \<% form\_tag({:controller =\> “teachers”, :action =\> “search”}, :method =\> “get”) do %\> \<%= text\_field\_tag :query,…

---

## [JQuery+AJAX partial in form\_for](https://www.ruby-forum.com/t/jquery-ajax-partial-in-form-for/190351)

<div class="topic-metadata">

**Author:** [@bebesuk](https://www.ruby-forum.com/u/bebesuk)\
**Replies:** 0\
**Last updated:** [June 18, 2010, 11:27am UTC](https://www.ruby-forum.com/t/jquery-ajax-partial-in-form-for/190351 "2010-06-18T11:27:53Z")

</div>

Hi! I want to render partial which depends on form builder “f”. How can I do it using AJAX+JQuery Files #new.html.haml %h1 New order form\_for(@order) do |f| = f.error\_messages %div#partial = render “#{@order.cu…

---

## [Link\_to\_remote the right way in Rails 3.0?](https://www.ruby-forum.com/t/link-to-remote-the-right-way-in-rails-3-0/190346)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 2\
**Last updated:** [June 18, 2010, 8:30am UTC](https://www.ruby-forum.com/t/link-to-remote-the-right-way-in-rails-3-0/190346 "2010-06-18T08:30:48Z")

</div>

I have been using link\_to\_remote forever now. I have also been using jquery through jrails. I am readying my code for Rails 3.0, and am wondering what is the best way to accomplish. For example, I have something like…

---

## [Nested Forms and ordering of new child elements](https://www.ruby-forum.com/t/nested-forms-and-ordering-of-new-child-elements/190348)

<div class="topic-metadata">

**Author:** [@jens](https://www.ruby-forum.com/u/jens)\
**Replies:** 0\
**Last updated:** [June 18, 2010, 7:30am UTC](https://www.ruby-forum.com/t/nested-forms-and-ordering-of-new-child-elements/190348 "2010-06-18T07:30:31Z")

</div>

Hi everybody, I am using Rails 2.3 and the new “nested forms” concept to add child objects to a parent object from within a single form. I have successfully gotten the example app from Github (alloy\_complex- form-exa…

---

## [Prototip(tool tip) not working in ie8](https://www.ruby-forum.com/t/prototip-tool-tip-not-working-in-ie8/197049)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 0\
**Last updated:** [June 18, 2010, 6:54am UTC](https://www.ruby-forum.com/t/prototip-tool-tip-not-working-in-ie8/197049 "2010-06-18T06:54:41Z")

</div>

i Hav created an application for prototip 2 in rails, application works well in firefox and ie7 but fails to work in ie8, can anyone provide ssolutions,please help me Thanks, Mathew A

---

## [Prototip not working in ie8](https://www.ruby-forum.com/t/prototip-not-working-in-ie8/190345)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 0\
**Last updated:** [June 18, 2010, 6:53am UTC](https://www.ruby-forum.com/t/prototip-not-working-in-ie8/190345 "2010-06-18T06:53:33Z")

</div>

i Hav created an application for prototip 2 in rails, application works well in firefox and ie7 but fails to work in ie8, can anyone provide ssolutions,please help me Thanks, Mathew A

---

## [Combobox from array](https://www.ruby-forum.com/t/combobox-from-array/190200)

<div class="topic-metadata">

**Author:** [@maese](https://www.ruby-forum.com/u/maese)\
**Replies:** 1\
**Last updated:** [June 18, 2010, 5:43am UTC](https://www.ruby-forum.com/t/combobox-from-array/190200 "2010-06-18T05:43:25Z")

</div>

Hi, I’m new in ruby and i need do the next: I want get a combobox from an array (@array) and save that value in a table called “form”, into a field called “combo”, i want save the value, not an id someone could tell…

---

## [Stopping enter from submitting a form](https://www.ruby-forum.com/t/stopping-enter-from-submitting-a-form/190224)

<div class="topic-metadata">

**Author:** [@Brent\_J](https://www.ruby-forum.com/u/Brent_J)\
**Replies:** 3\
**Last updated:** [June 18, 2010, 3:41am UTC](https://www.ruby-forum.com/t/stopping-enter-from-submitting-a-form/190224 "2010-06-18T03:41:06Z")

</div>

Hey all, I’m working on a rails app that will be accepting input from a wide array of brandless barcode scanners. Is there anyway of making the return key tab to the next field instead of submitting the form? I know …

---

## [Off Topic Advice Needed (Time objects)](https://www.ruby-forum.com/t/off-topic-advice-needed-time-objects/190167)

<div class="topic-metadata">

**Author:** [@Ants\_P](https://www.ruby-forum.com/u/Ants_P)\
**Replies:** 8\
**Last updated:** [June 18, 2010, 2:50am UTC](https://www.ruby-forum.com/t/off-topic-advice-needed-time-objects/190167 "2010-06-18T02:50:40Z")

</div>

I know this is a Ruby question but I’m not on any Ruby mailing lists and it’s for a Rails project (so might come under select\_time etc. :wink: ) I thought I’d try here. A user can choose integer values from select dro…

---

## [We're sorry, but something went wrong](https://www.ruby-forum.com/t/were-sorry-but-something-went-wrong/190181)

<div class="topic-metadata">

**Author:** [@GFP](https://www.ruby-forum.com/u/GFP)\
**Replies:** 6\
**Last updated:** [June 18, 2010, 12:28am UTC](https://www.ruby-forum.com/t/were-sorry-but-something-went-wrong/190181 "2010-06-18T00:28:38Z")

</div>

I am an RoR newb, so bear with me here. I am on an Intel based Mac running OS X 10.4.11 I have started the ‘RoR Essentials’ tutorial on lynda.com. I have installed (I believe) all the necessary components: ruby 1.8.7…

---

## [Subdomains](https://www.ruby-forum.com/t/subdomains/190325)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 11:39pm UTC](https://www.ruby-forum.com/t/subdomains/190325 "2010-06-17T23:39:21Z")

</div>

hi, Is there a way for me to have subdomains on my rails project? For example, if I create a post, i get this URL- http://www.localhost:3000/posts/#### (what ever number) How can I make the route so that it is---- …

---

## [Using Roles but donÂ´t want to show them](https://www.ruby-forum.com/t/using-roles-but-dona-t-want-to-show-them/190260)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 3\
**Last updated:** [June 17, 2010, 11:11pm UTC](https://www.ruby-forum.com/t/using-roles-but-dona-t-want-to-show-them/190260 "2010-06-17T23:11:16Z")

</div>

Hi everyone, i am using roles in my project for admin and author and so on… This is my code " ROLES = %w\[admin moderator author\] def roles=(roles) self.roles\_mask = (roles & ROLES).map { |r| 2\*\*ROLES.index® }.sum …

---

## [Split model in few files](https://www.ruby-forum.com/t/split-model-in-few-files/190106)

<div class="topic-metadata">

**Author:** [@mudge](https://www.ruby-forum.com/u/mudge)\
**Replies:** 10\
**Last updated:** [June 17, 2010, 10:16pm UTC](https://www.ruby-forum.com/t/split-model-in-few-files/190106 "2010-06-17T22:16:14Z")

</div>

Hi, I have the following (newbie) problem: in my ‘app/models’ folder is a class (User) with more then 1000 lines of code. I want to split the model in different files into a subfolder (a separat file for validations,…

---

## [Help .. A question about if then](https://www.ruby-forum.com/t/help-a-question-about-if-then/190334)

<div class="topic-metadata">

**Author:** [@bumper](https://www.ruby-forum.com/u/bumper)\
**Replies:** 1\
**Last updated:** [June 17, 2010, 9:56pm UTC](https://www.ruby-forum.com/t/help-a-question-about-if-then/190334 "2010-06-17T21:56:22Z")

</div>

Please be gentile … I am new at this ror thing I have a view which looks like this Nicaragua Stamps Scott Maxwell Description Url Mint Used \<% @stamps.each do |stamp| %\> \<%=h stam…

---

## [Session hash set from outside program?](https://www.ruby-forum.com/t/session-hash-set-from-outside-program/190331)

<div class="topic-metadata">

**Author:** [@sindrig](https://www.ruby-forum.com/u/sindrig)\
**Replies:** 0\
**Last updated:** [June 17, 2010, 8:49pm UTC](https://www.ruby-forum.com/t/session-hash-set-from-outside-program/190331 "2010-06-17T20:49:20Z")

</div>

Hi, I have had my new rails program up for a few days now. I’m running it on Ubuntu 10.4 with apache2 in another location than the website it’s made for (it’s a standalone database application for physiotherapists). T…

---

## [Rails 3: link\_to with "data-confirm"](https://www.ruby-forum.com/t/rails-3-link-to-with-data-confirm/189039)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 3\
**Last updated:** [June 17, 2010, 6:47pm UTC](https://www.ruby-forum.com/t/rails-3-link-to-with-data-confirm/189039 "2010-06-17T18:47:49Z")

</div>

Hi, has anyone experienced any problems with the new link\_to and data-confirm in Rails3? It seems when you create a link with instead of link text, an image, the confirm message isn’t shown. \<%= l…

---

## [Can i use a hash on a collection\_select? If don't, alternatives](https://www.ruby-forum.com/t/can-i-use-a-hash-on-a-collection-select-if-dont-alternatives/190245)

<div class="topic-metadata">

**Author:** [@Miguel.camba](https://www.ruby-forum.com/u/Miguel.camba)\
**Replies:** 3\
**Last updated:** [June 17, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/can-i-use-a-hash-on-a-collection-select-if-dont-alternatives/190245 "2010-06-17T18:18:31Z")

</div>

In my current application, i have food categories: mexican, home made, japanese, ect As these categories only have ID and name, no other attributes, i dont want to create a table on the DB. My first idea was to creat…

---

## [Onmouseover cell changing links color](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318)

<div class="topic-metadata">

**Author:** [@eltoni](https://www.ruby-forum.com/u/eltoni)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/onmouseover-cell-changing-links-color/190318 "2010-06-17T18:13:49Z")

</div>

I work with tables. I have many links in one cell and I wish when onmouseover the cell all links changing for the same new color. One link is possible. Many links, it is possible?

---

## [Interpreter Problems](https://www.ruby-forum.com/t/interpreter-problems/190156)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 5:37pm UTC](https://www.ruby-forum.com/t/interpreter-problems/190156 "2010-06-17T17:37:42Z")

</div>

I really aren’t sure why but my interpreter continues to fail after an unknown amount of requests or time on my local (home) computer. I’ve tried following instructions from people who have encountered similar problem…

---

## [Getting note only the class instances but also instances of subclasses on a has\_many associations](https://www.ruby-forum.com/t/getting-note-only-the-class-instances-but-also-instances-of-subclasses-on-a-has-many-associations/190291)

<div class="topic-metadata">

**Author:** [@gamov](https://www.ruby-forum.com/u/gamov)\
**Replies:** 9\
**Last updated:** [June 17, 2010, 5:23pm UTC](https://www.ruby-forum.com/t/getting-note-only-the-class-instances-but-also-instances-of-subclasses-on-a-has-many-associations/190291 "2010-06-17T17:23:26Z")

</div>

Hello, I have a model like this: Model class ContainerCharge \< ShipmentCharge belongs\_to :container end class Container \< ActiveRecord::Base has\_many :container\_charges end class HandlingContainerCharge \< Contain…

---

## [Field validation](https://www.ruby-forum.com/t/field-validation/190125)

<div class="topic-metadata">

**Author:** [@stanislavua](https://www.ruby-forum.com/u/stanislavua)\
**Replies:** 6\
**Last updated:** [June 17, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/field-validation/190125 "2010-06-17T17:17:00Z")

</div>

Hi I have a field called “cost”: \<%= f.text\_field :cost, :size=\>2, :maxlength=\>4 %\> I want to check that user enter numeral value and this value is integer In post.rb (model): def cost\_validate\_int errors.add\_to\_b…

---

## [Passenger and apache mpm's](https://www.ruby-forum.com/t/passenger-and-apache-mpms/190143)

<div class="topic-metadata">

**Author:** [@steux](https://www.ruby-forum.com/u/steux)\
**Replies:** 2\
**Last updated:** [June 17, 2010, 5:13pm UTC](https://www.ruby-forum.com/t/passenger-and-apache-mpms/190143 "2010-06-17T17:13:11Z")

</div>

Hi! Is it safe to run phusion passenger with all apache kinds of MPM? regards

---

## [Allow blank on should validate\_uniqueness\_of](https://www.ruby-forum.com/t/allow-blank-on-should-validate-uniqueness-of/190299)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 8\
**Last updated:** [June 17, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/allow-blank-on-should-validate-uniqueness-of/190299 "2010-06-17T16:51:47Z")

</div>

Hello, Using shoulda, any ideas how to allow blank when having this test: should validate\_uniqueness\_of(:email) Thanks. J. Pablo Fernández removed\_email\_address@domain.invalid (http://pupeno.com)

---

## [Can I have/use different Versions of rails in the same machine](https://www.ruby-forum.com/t/can-i-have-use-different-versions-of-rails-in-the-same-machine/190239)

<div class="topic-metadata">

**Author:** [@lakshmanan](https://www.ruby-forum.com/u/lakshmanan)\
**Replies:** 6\
**Last updated:** [June 17, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/can-i-have-use-different-versions-of-rails-in-the-same-machine/190239 "2010-06-17T16:35:20Z")

</div>

I am actually reading a rails book that is written for rails 2.3.5. I want to test Rails 3 beta as well. Is it possible to have such a setup in my Mac OS leopard? I have tried with gem list -d rails. There are many ve…

---

## [Need Help - New to RoR](https://www.ruby-forum.com/t/need-help-new-to-ror/190171)

<div class="topic-metadata">

**Author:** [@sangeetha](https://www.ruby-forum.com/u/sangeetha)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:34pm UTC](https://www.ruby-forum.com/t/need-help-new-to-ror/190171 "2010-06-17T16:34:43Z")

</div>

Hello All, I installed Ruby on Windows (using rubyinstaller-1.9.1-p378.exe from here - http://rubyforge.org/frs/?group\_id=167). Then I ran gem install rails. I was following instructions here -O'Reilly Media - Techno…

---

## [How do you access attributes in form templates?](https://www.ruby-forum.com/t/how-do-you-access-attributes-in-form-templates/190034)

<div class="topic-metadata">

**Author:** [@dee](https://www.ruby-forum.com/u/dee)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:34pm UTC](https://www.ruby-forum.com/t/how-do-you-access-attributes-in-form-templates/190034 "2010-06-17T16:34:43Z")

</div>

I have a Survey-Response application, where surveys can be created with an arbitrary number of questions, and users can respond to an arbitrary number of surveys. A Survey has\_many Questions and has\_many Responses. Bo…

---

## [Script/server vs mongrel\_rails start issue](https://www.ruby-forum.com/t/script-server-vs-mongrel-rails-start-issue/190195)

<div class="topic-metadata">

**Author:** [@structuralartistry](https://www.ruby-forum.com/u/structuralartistry)\
**Replies:** 5\
**Last updated:** [June 17, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/script-server-vs-mongrel-rails-start-issue/190195 "2010-06-17T16:27:02Z")

</div>

I am having different results between when I start mongrel with script/ server and with mongrel\_rails start. When I run script/server to boot mongrel everything runs fine, no errors. When I run mongrel\_rails start I …

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

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