# Rails

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

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

---

## [XSL FO to PDF Conversion](https://www.ruby-forum.com/t/xsl-fo-to-pdf-conversion/173310)

<div class="topic-metadata">

**Author:** [@anandhkumar](https://www.ruby-forum.com/u/anandhkumar)\
**Replies:** 3\
**Last updated:** [August 7, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/xsl-fo-to-pdf-conversion/173310 "2009-08-07T15:40:55Z")

</div>

Hi everyone Is there any gem or any other way in ruby to generate PDF from XSL FO. I’ve been googling for hours but with no returns. Any help would be greatly appreciated. Thanks Anandh

---

## [Simple insert\_html RJS working in FF not in Safari](https://www.ruby-forum.com/t/simple-insert-html-rjs-working-in-ff-not-in-safari/173369)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 2\
**Last updated:** [August 7, 2009, 1:26pm UTC](https://www.ruby-forum.com/t/simple-insert-html-rjs-working-in-ff-not-in-safari/173369 "2009-08-07T13:26:16Z")

</div>

Hi, Im trying to insert a into a table. the code is as below. HTML \<%= render :partial =\> "item", :collection =\> @order.items %\> \<tr id="empty\_row"\> \<%= add\_item\_link "+" %\> …

---

## [Can no more POST after update 2.3.3](https://www.ruby-forum.com/t/can-no-more-post-after-update-2-3-3/173367)

<div class="topic-metadata">

**Author:** [@freakout](https://www.ruby-forum.com/u/freakout)\
**Replies:** 1\
**Last updated:** [August 7, 2009, 12:40pm UTC](https://www.ruby-forum.com/t/can-no-more-post-after-update-2-3-3/173367 "2009-08-07T12:40:02Z")

</div>

after updating a production rails site from 2.3.2 to 2.3.3 everything works fine. But i cannot POST any form without getting public/500.html rendered. What especially is annoying that i get NOTHING in production.log - …

---

## [2 onchange functions - 1 jquery, 1 prototype - not working in safari](https://www.ruby-forum.com/t/2-onchange-functions-1-jquery-1-prototype-not-working-in-safari/173305)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 6\
**Last updated:** [August 7, 2009, 11:01am UTC](https://www.ruby-forum.com/t/2-onchange-functions-1-jquery-1-prototype-not-working-in-safari/173305 "2009-08-07T11:01:41Z")

</div>

Hi all, Im using the jNice plugin on a select box in a form of mine. Im also calling a custom JS function which uses prototype on the same select box. \<%= f.collection\_select :item\_name, Item.all, :item\_for\_order, :n…

---

## [Acts\_as\_tree -- how to create new child](https://www.ruby-forum.com/t/acts-as-tree-how-to-create-new-child/173245)

<div class="topic-metadata">

**Author:** [@steven\_noble](https://www.ruby-forum.com/u/steven_noble)\
**Replies:** 11\
**Last updated:** [August 7, 2009, 10:31am UTC](https://www.ruby-forum.com/t/acts-as-tree-how-to-create-new-child/173245 "2009-08-07T10:31:50Z")

</div>

I have: In the Projects model… acts\_as\_tree :order =\> “name” In the Projects/show view… \<%= link\_to ‘Create Subproject’, new\_project\_path, { :parent =\> @project.id } %\> In the Projects controller… def new @pro…

---

## [Strange View Problem](https://www.ruby-forum.com/t/strange-view-problem/173322)

<div class="topic-metadata">

**Author:** [@skeptic](https://www.ruby-forum.com/u/skeptic)\
**Replies:** 3\
**Last updated:** [August 7, 2009, 10:26am UTC](https://www.ruby-forum.com/t/strange-view-problem/173322 "2009-08-07T10:26:53Z")

</div>

Hi, I’ve come across a strange issue with one of my views. Simple login form, \<% form\_tag do -%\> \<p\>\<label for="login"\>Login\</label\>\<br/\> \<%= text\_field\_tag 'login' %\>\</p\> \<p\>\<label for="password"\>Passwo…

---

## [Acts\_as\_ferret with :conditions](https://www.ruby-forum.com/t/acts-as-ferret-with-conditions/173363)

<div class="topic-metadata">

**Author:** [@neetal](https://www.ruby-forum.com/u/neetal)\
**Replies:** 0\
**Last updated:** [August 7, 2009, 9:27am UTC](https://www.ruby-forum.com/t/acts-as-ferret-with-conditions/173363 "2009-08-07T09:27:06Z")

</div>

Hi, I want to implement search in my rails application. I tried using acts\_as\_ferret plugin , and it worked for me.But i was not able to use the conditions over it. To make it clear I used acts\_as\_ferret as :- @resu…

---

## [Cookie session domain for many sites](https://www.ruby-forum.com/t/cookie-session-domain-for-many-sites/171229)

<div class="topic-metadata">

**Author:** [@pixel75](https://www.ruby-forum.com/u/pixel75)\
**Replies:** 1\
**Last updated:** [August 7, 2009, 9:25am UTC](https://www.ruby-forum.com/t/cookie-session-domain-for-many-sites/171229 "2009-08-07T09:25:05Z")

</div>

Hi! I have an issue that I think right now is like a “rails cliche”: I’m developing a Network, with a main site and secondary sites. The idea is that when you login in the main site, automatically you are login in th…

---

## [Add extra depth to input field in form\_for](https://www.ruby-forum.com/t/add-extra-depth-to-input-field-in-form-for/173356)

<div class="topic-metadata">

**Author:** [@iggar](https://www.ruby-forum.com/u/iggar)\
**Replies:** 0\
**Last updated:** [August 7, 2009, 9:05am UTC](https://www.ruby-forum.com/t/add-extra-depth-to-input-field-in-form-for/173356 "2009-08-07T09:05:57Z")

</div>

Hey all, I’m making a table form in rails who roughly looks like this: (form\_for :info,…) Header1 Item 1 yes/no comment Item 2 yes/no comment Header2 Item 1 yes/no comment Item 2 yes/no co…

---

## [Rails JSR286 portlets](https://www.ruby-forum.com/t/rails-jsr286-portlets/173352)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 0\
**Last updated:** [August 7, 2009, 8:37am UTC](https://www.ruby-forum.com/t/rails-jsr286-portlets/173352 "2009-08-07T08:37:59Z")

</div>

Hi, I created rails application and when i tried to build portlets i was getting an error . Please see my steps srinath@srinath-laptop:~$ rails example srinath@srinath-laptop:~$ cd example/ srinath@srinath-laptop:~…

---

## [Update partial after submit need Help](https://www.ruby-forum.com/t/update-partial-after-submit-need-help/173351)

<div class="topic-metadata">

**Author:** [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Replies:** 1\
**Last updated:** [August 7, 2009, 8:08am UTC](https://www.ruby-forum.com/t/update-partial-after-submit-need-help/173351 "2009-08-07T08:08:50Z")

</div>

hi here i have a todo manager. i’m render the whole todo with a partial. after i submit a new todo how can i refresh the todo partial samethin lik this \<%=render :partial=\>"todos" %\> -- here my new todo…

---

## [Initializers](https://www.ruby-forum.com/t/initializers/173280)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 6\
**Last updated:** [August 7, 2009, 7:56am UTC](https://www.ruby-forum.com/t/initializers/173280 "2009-08-07T07:56:44Z")

</div>

I created a “config/initializers/tasks.rb” In it I have the following is all: logger.info(“Running tasks”) However nothing is logged or run. Am I missing something?

---

## [Submite\_to\_remote not works for me](https://www.ruby-forum.com/t/submite-to-remote-not-works-for-me/173326)

<div class="topic-metadata">

**Author:** [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Replies:** 2\
**Last updated:** [August 7, 2009, 7:24am UTC](https://www.ruby-forum.com/t/submite-to-remote-not-works-for-me/173326 "2009-08-07T07:24:30Z")

</div>

\<% form\_for :todo,:url =\>todos\_path,:html=\>{:name=\>“new\_todo”} do |f| %\> Title \<%= f.text\_field :title,:class=\>“validate\[required,length \[5,8\]\] text-input” %\> Description \<%= f.text\_area :descripti…

---

## [Thx](https://www.ruby-forum.com/t/thx/173350)

<div class="topic-metadata">

**Author:** [@kunalan\_kandiah](https://www.ruby-forum.com/u/kunalan_kandiah)\
**Replies:** 0\
**Last updated:** [August 7, 2009, 7:22am UTC](https://www.ruby-forum.com/t/thx/173350 "2009-08-07T07:22:09Z")

</div>

fixed thx for the reply Regards Kunalan Kandiah

---

## [Change that as onclick](https://www.ruby-forum.com/t/change-that-as-onclick/173349)

<div class="topic-metadata">

**Author:** [@kunalan\_kandiah](https://www.ruby-forum.com/u/kunalan_kandiah)\
**Replies:** 0\
**Last updated:** [August 7, 2009, 7:20am UTC](https://www.ruby-forum.com/t/change-that-as-onclick/173349 "2009-08-07T07:20:24Z")

</div>

Hi i faced the similar prob b4 1 month and then i find out this solution cange the function from onchange to onclick . this onchange not works with IE7 as well Regards Kunalan Kandiah

---

## [Overriding save\_with\_validation and alias\_method\_chain error](https://www.ruby-forum.com/t/overriding-save-with-validation-and-alias-method-chain-error/173345)

<div class="topic-metadata">

**Author:** [@knodi](https://www.ruby-forum.com/u/knodi)\
**Replies:** 0\
**Last updated:** [August 7, 2009, 6:21am UTC](https://www.ruby-forum.com/t/overriding-save-with-validation-and-alias-method-chain-error/173345 "2009-08-07T06:21:36Z")

</div>

So i’m trying to override save\_with\_validation in activerecord validations.rb and i’m running in to problems with alias\_chain method. module ActiveRecord module Validations def save\_with\_validation(perform\_validation…

---

## [Best place to host ROR website](https://www.ruby-forum.com/t/best-place-to-host-ror-website/173237)

<div class="topic-metadata">

**Author:** [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Replies:** 11\
**Last updated:** [August 7, 2009, 5:51am UTC](https://www.ruby-forum.com/t/best-place-to-host-ror-website/173237 "2009-08-07T05:51:00Z")

</div>

Hi, I finished developing a website in ROR and want to host it. Which is the best hosting service for ROR??? Someone who will have ROR based tech support too? I tried godaddy and its pathetic. They used 2.2.2 rails a…

---

## [Ajax - Updating Field with Selection](https://www.ruby-forum.com/t/ajax-updating-field-with-selection/173318)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 6, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/ajax-updating-field-with-selection/173318 "2009-08-06T23:05:56Z")

</div>

Hi all, I have two fields in a form. One text field non asociated to the model for the user type a value. the view is: \<%= text\_field\_tag ‘item\_cod’,’’, :size =\> 3 %\> Other a field with a select list with codes, na…

---

## [Passenger, switching from development to production](https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 2\
**Last updated:** [August 6, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155 "2009-08-06T22:15:00Z")

</div>

It appears my http setup is working but I am getting an error when I try to use a web browser to connect. All I have done so far is to change the setting from what was working in httpd.conf and move it to ssl.conf (ad…

---

## [Relacionamento com campos diferentes de id](https://www.ruby-forum.com/t/relacionamento-com-campos-diferentes-de-id/173278)

<div class="topic-metadata">

**Author:** [@cifroes](https://www.ruby-forum.com/u/cifroes)\
**Replies:** 3\
**Last updated:** [August 6, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/relacionamento-com-campos-diferentes-de-id/173278 "2009-08-06T21:37:32Z")

</div>

Pessoal estou tentando fazer um relacionamento com os seguintes campos: TABELA PESSOA cpf --\> RELACIONAR nome data TABELA DIVIDA id descricacao pessoa\_cpf --\> RELACIONAR VIsto que nÃ£o se trata de um campo ID te…

---

## [Acts\_as\_versioned small question](https://www.ruby-forum.com/t/acts-as-versioned-small-question/173321)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [August 6, 2009, 9:21pm UTC](https://www.ruby-forum.com/t/acts-as-versioned-small-question/173321 "2009-08-06T21:21:44Z")

</div>

I have this in the RSL model: acts\_as\_versioned self.non\_versioned\_columns \<\< ‘rsl\_verified’ When I perform this ajax action it still updates the version table when I toggle this value in the RSL table. @rsl = Rsl.…

---

## [I'm new](https://www.ruby-forum.com/t/im-new/173295)

<div class="topic-metadata">

**Author:** [@akramwasim1234](https://www.ruby-forum.com/u/akramwasim1234)\
**Replies:** 2\
**Last updated:** [August 6, 2009, 8:57pm UTC](https://www.ruby-forum.com/t/im-new/173295 "2009-08-06T20:57:44Z")

</div>

can anyone tell about has and belongs to many

---

## [Renamed Table, Test Failing](https://www.ruby-forum.com/t/renamed-table-test-failing/173316)

<div class="topic-metadata">

**Author:** [@rwhiten1](https://www.ruby-forum.com/u/rwhiten1)\
**Replies:** 2\
**Last updated:** [August 6, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/renamed-table-test-failing/173316 "2009-08-06T20:49:32Z")

</div>

Hey all - I’m brand new to both Ruby & Rails coming from a long history of C- style syntax. I’m trying to assimilate a lot of things at the same time, so I’m bumping into all kinds of issues. Many I can track down vi…

---

## [Rails 2.3.2 way to do "Item.find( :all, :select =\> 'DISTINCT fieldname' )"](https://www.ruby-forum.com/t/rails-2-3-2-way-to-do-item-find-all-select-distinct-fieldname/173315)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 0\
**Last updated:** [August 6, 2009, 8:28pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-way-to-do-item-find-all-select-distinct-fieldname/173315 "2009-08-06T20:28:29Z")

</div>

Is there a more modern way to do something like: distinct\_items = Item.find( :all, :select =\> ‘DISTINCT fieldname’ ) I have found a number of circa 2007 web pages that all recommend the use of :select, and I can’t fin…

---

## [Drop\_receiving\_element - how to get ID of droppable?](https://www.ruby-forum.com/t/drop-receiving-element-how-to-get-id-of-droppable/173317)

<div class="topic-metadata">

**Author:** [@Drrrrrr](https://www.ruby-forum.com/u/Drrrrrr)\
**Replies:** 0\
**Last updated:** [August 6, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/drop-receiving-element-how-to-get-id-of-droppable/173317 "2009-08-06T19:59:48Z")

</div>

I want to know how to get the id of the dropped-in-element. I already have this code: \<%= drop\_receiving\_element(“drop”, :onDrop =\> “function() { set\_image (), delete\_drag(element.id) }”) %\> but its not working. Fire…

---

## [Duplicate model object with associations?](https://www.ruby-forum.com/t/duplicate-model-object-with-associations/173282)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 2\
**Last updated:** [August 6, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/duplicate-model-object-with-associations/173282 "2009-08-06T19:59:48Z")

</div>

class Patient \< AR::Base has\_many :aaas has\_many :bbbs ,:through=\>:aaas end class Aaa \< AR::Base has\_many :bbbs end i want like this @patient=Patient.find(id) @new\_patient=@patient.duplicate now the @new\_patien…

---

## [Error in authentasaurus](https://www.ruby-forum.com/t/error-in-authentasaurus/173261)

<div class="topic-metadata">

**Author:** [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Replies:** 1\
**Last updated:** [August 6, 2009, 7:53pm UTC](https://www.ruby-forum.com/t/error-in-authentasaurus/173261 "2009-08-06T19:53:22Z")

</div>

i developed one simple application using Authentasaurus plugin. it generates a default admin, but when i want to access my account it gives the follwing erroe c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.5/lib/action…

---

## [Logging out with Rake:Auth:Basic](https://www.ruby-forum.com/t/logging-out-with-rakebasic/173260)

<div class="topic-metadata">

**Author:** [@bagadoughnuts](https://www.ruby-forum.com/u/bagadoughnuts)\
**Replies:** 5\
**Last updated:** [August 6, 2009, 7:50pm UTC](https://www.ruby-forum.com/t/logging-out-with-rakebasic/173260 "2009-08-06T19:50:26Z")

</div>

Hi all, I’m writting a small app that requires basic authentication in Sinatra. I followed the advice of the official Sinatra faq (Sinatra: Frequently Asked Questions) and have implemented this code with success: re…

---

## [Nested has\_many :through](https://www.ruby-forum.com/t/nested-has-many-through/173264)

<div class="topic-metadata">

**Author:** [@Addy\_Naik](https://www.ruby-forum.com/u/Addy_Naik)\
**Replies:** 2\
**Last updated:** [August 6, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/nested-has-many-through/173264 "2009-08-06T19:47:30Z")

</div>

here is the situation class Entity \< ActiveRecord::Base belongs\_to :parent, :foreign\_key =\> :parent\_id, :class\_name =\> ‘Entity’ end class Player \< Entity end class Team \< Entity has\_many :players, :foreign\_key =\> …

---

## [I want new Enumerable Methods, "includes, anies"](https://www.ruby-forum.com/t/i-want-new-enumerable-methods-includes-anies/173274)

<div class="topic-metadata">

**Author:** [@hiphapis](https://www.ruby-forum.com/u/hiphapis)\
**Replies:** 2\
**Last updated:** [August 6, 2009, 7:44pm UTC](https://www.ruby-forum.com/t/i-want-new-enumerable-methods-includes-anies/173274 "2009-08-06T19:44:00Z")

</div>

\#includes ##before: enum.each do |e| if e == “1” #bla~ #bla~ end end ##after: enum.includes(“1”). do #bla~ #bla~ end #anies ##before: enum.each do |e| if e.id == “1” #bla~ #bla~ end end ##after: enu…

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

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