# Rails

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

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

---

## [Authorization recipe help](https://www.ruby-forum.com/t/authorization-recipe-help/129498)

<div class="topic-metadata">

**Author:** [@jvazquez](https://www.ruby-forum.com/u/jvazquez)\
**Replies:** 8\
**Last updated:** [February 20, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/authorization-recipe-help/129498 "2008-02-20T20:26:54Z")

</div>

Hello all, I am following the rails recipe book for authorization and it works as written. I have created a controller that will be administrate accounts and want to show each user with all their roles. I can’t seem …

---

## [Acts\_as\_sphinx - options\[:sort\_mode\] = \[:attr\_desc, 'purchase\_count'\]](https://www.ruby-forum.com/t/acts-as-sphinx-options-sort-mode-attr-desc-purchase-count/129572)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 8:09pm UTC](https://www.ruby-forum.com/t/acts-as-sphinx-options-sort-mode-attr-desc-purchase-count/129572 "2008-02-20T20:09:05Z")

</div>

Railsers: I can’t find acts\_as\_sphinx’s forum, so I must throw this question open: We have installed acts\_as\_sphinx and set almost everything up. The only issue is getting the :sort\_mode working. Now we want to rank …

---

## [Conditionals in the view based on a requested format](https://www.ruby-forum.com/t/conditionals-in-the-view-based-on-a-requested-format/129597)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/conditionals-in-the-view-based-on-a-requested-format/129597 "2008-02-20T20:02:34Z")

</div>

i am using respond\_to for a few actions in my controller. for some of the actions, the view for html and the view for javascript would be nearly identical. what can i do in my views to hide or add content based on whe…

---

## [Create yor own validation helper](https://www.ruby-forum.com/t/create-yor-own-validation-helper/129607)

<div class="topic-metadata">

**Author:** [@maxmustermann](https://www.ruby-forum.com/u/maxmustermann)\
**Replies:** 3\
**Last updated:** [February 20, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/create-yor-own-validation-helper/129607 "2008-02-20T20:01:19Z")

</div>

Hi there! Does anyone know if it’s possible to create your own customized validation helper? If yes, how do I do that? cheers guys julius

---

## [AJAX problem](https://www.ruby-forum.com/t/ajax-problem/129479)

<div class="topic-metadata">

**Author:** [@pierreact](https://www.ruby-forum.com/u/pierreact)\
**Replies:** 5\
**Last updated:** [February 20, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/ajax-problem/129479 "2008-02-20T19:57:45Z")

</div>

Hello everyone :slight\_smile: I have this ajax issue, I’d be glad if someone would be willing to help, thanks :slight\_smile: What I try to do: Have a select box with a list of countries. When the country select box …

---

## [Boolean column problem](https://www.ruby-forum.com/t/boolean-column-problem/129590)

<div class="topic-metadata">

**Author:** [@Robin\_F](https://www.ruby-forum.com/u/Robin_F)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/boolean-column-problem/129590 "2008-02-20T19:52:21Z")

</div>

Hi All, As part of a wider application, I have a todo list set up with boolean column indicating if the todo is complete or not. It defaults to false to indicate not complete. I’m using a check box that calls a defi…

---

## [Has\_many\_polymorphs: Tag could not be preloaded: #\<ActiveRecord::Associations::PolymorphicError](https://www.ruby-forum.com/t/has-many-polymorphs-tag-could-not-be-preloaded-activerecord-polymorphicerror/129595)

<div class="topic-metadata">

**Author:** [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/has-many-polymorphs-tag-could-not-be-preloaded-activerecord-polymorphicerror/129595 "2008-02-20T19:49:26Z")

</div>

Hello there, I’ve also posted this problem at the hmp forum @ http://rubyforge.org/forum/forum.php?thread\_id=22433&forum\_id=16450 but since this group has some higher traffic, maybe the one or another can help me her…

---

## [Additional plugin migrations rake tasks](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 4\
**Last updated:** [February 20, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/additional-plugin-migrations-rake-tasks/129542 "2008-02-20T19:41:41Z")

</div>

I’d like to add these rake tasks to Engines: http://pastie.caboo.se/154218 The background is that we could use something like this for Mephisto to give users a way to avoid version number clashes with their plugin mi…

---

## [Running Linux Command Through Ruby](https://www.ruby-forum.com/t/running-linux-command-through-ruby/129683)

<div class="topic-metadata">

**Author:** [@newbie](https://www.ruby-forum.com/u/newbie)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 7:39pm UTC](https://www.ruby-forum.com/t/running-linux-command-through-ruby/129683 "2008-02-20T19:39:19Z")

</div>

I wonder if anyone knows how to run Unix/Linux commands from Ruby? I understand that the Perl counterpart could be sth like the following. First I create a perl file example.pl Then inside the file I have the des…

---

## [ActiveRecord.find with hash?](https://www.ruby-forum.com/t/activerecord-find-with-hash/129588)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 4\
**Last updated:** [February 20, 2008, 7:33pm UTC](https://www.ruby-forum.com/t/activerecord-find-with-hash/129588 "2008-02-20T19:33:05Z")

</div>

The Agile Development book suggests one can pass a hash to the find class method on an ActiveRecord entity: hash = { :firstname =\> “john”, :lastname =\> “smith” } Customer.find(:all, hash) However, this doesn’t seem t…

---

## [Rmagick .tif image display](https://www.ruby-forum.com/t/rmagick-tif-image-display/129677)

<div class="topic-metadata">

**Author:** [@randall](https://www.ruby-forum.com/u/randall)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/rmagick-tif-image-display/129677 "2008-02-20T19:18:36Z")

</div>

Hi. I’m trying to display a .tif image file on my web page. The image is on another physical drive on the server and because .tif images don’t display very well i decided to use Rmagick… I would like to load the imag…

---

## [Link\_to weirdness, related to namespace?](https://www.ruby-forum.com/t/link-to-weirdness-related-to-namespace/129679)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 7:17pm UTC](https://www.ruby-forum.com/t/link-to-weirdness-related-to-namespace/129679 "2008-02-20T19:17:25Z")

</div>

Hi, In my app/views/admin/clieint/\_searchresults.rhtml partial, I have … \<% for user in @users %\> \<%=h user.ship\_to\_first\_name %\> \<%=h user.ship\_to\_last\_name %\> \<%=h user.email %\> \<%= link\_to 'Show'…

---

## [Select changed event for collection\_select](https://www.ruby-forum.com/t/select-changed-event-for-collection-select/106795)

<div class="topic-metadata">

**Author:** [@bins](https://www.ruby-forum.com/u/bins)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/select-changed-event-for-collection-select/106795 "2008-02-20T18:58:19Z")

</div>

Hello, I’m using collection\_select in one of the Rails application as follows. \<%= collection\_select(“occupation”,“id”,@occupations,“id”,“name”)%\> Could you please tell how I can call a javascript function on selectin…

---

## [Testable Logger](https://www.ruby-forum.com/t/testable-logger/129687)

<div class="topic-metadata">

**Author:** [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 6:32pm UTC](https://www.ruby-forum.com/t/testable-logger/129687 "2008-02-20T18:32:57Z")

</div>

I like the idea of having unit tests make sure what gets logged. I found a plugin called “testable logger” at http://code.teytek.com/rails/plugins/testable\_logger/ This promises to do what I’m looking for. But the co…

---

## [Two ActiveRecords OK?](https://www.ruby-forum.com/t/two-activerecords-ok/129599)

<div class="topic-metadata">

**Author:** [@newbie](https://www.ruby-forum.com/u/newbie)\
**Replies:** 3\
**Last updated:** [February 20, 2008, 5:57pm UTC](https://www.ruby-forum.com/t/two-activerecords-ok/129599 "2008-02-20T17:57:40Z")

</div>

I have a question regarding the compatbility of Rails and generic ActiveRecord. I am running Rails 2.0.2 on a Linux box. My ruby version is 1.8.6. I need to read from/write to some tables in the same rails production …

---

## [POST session values](https://www.ruby-forum.com/t/post-session-values/129675)

<div class="topic-metadata">

**Author:** [@m1k3y2](https://www.ruby-forum.com/u/m1k3y2)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/post-session-values/129675 "2008-02-20T17:36:44Z")

</div>

Hi, could someone explain to me how should I post session values to different controller and than make a search according to e.g. username or user id ? Thank You, M.

---

## [Creation of Bookmark Button](https://www.ruby-forum.com/t/creation-of-bookmark-button/129684)

<div class="topic-metadata">

**Author:** [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/creation-of-bookmark-button/129684 "2008-02-20T17:22:45Z")

</div>

Hi Everyone, I want to create a button in my app which can be placed on browser bookmarks toolbar. And for any website when i click on that bookmark, it will open a layered window (like popup) which will have page …

---

## [Ruby on Rails tutorials and other useful webresources?](https://www.ruby-forum.com/t/ruby-on-rails-tutorials-and-other-useful-webresources/129672)

<div class="topic-metadata">

**Author:** [@tom.jerry](https://www.ruby-forum.com/u/tom.jerry)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 4:46pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tutorials-and-other-useful-webresources/129672 "2008-02-20T16:46:23Z")

</div>

Hi there, We are trying to gather the best tutorials and other useful web resources (hosting, showcase, community sites,…) about Ruby on Rails in our web framework directory. Please don’t hesitate to have a look on o…

---

## [Noob Question - Javascript problem on Firefox](https://www.ruby-forum.com/t/noob-question-javascript-problem-on-firefox/129587)

<div class="topic-metadata">

**Author:** [@shendric](https://www.ruby-forum.com/u/shendric)\
**Replies:** 2\
**Last updated:** [February 20, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/noob-question-javascript-problem-on-firefox/129587 "2008-02-20T16:18:34Z")

</div>

Hello everyone, What I’m trying to accomplish is simply post a form using form\_remote\_tag and use :complete =\> “alert(DONE!’’)” to indicate succesfull post. I do not want to render a new page or update any part of t…

---

## [Running two apps on rails](https://www.ruby-forum.com/t/running-two-apps-on-rails/129651)

<div class="topic-metadata">

**Author:** [@mr.prabin](https://www.ruby-forum.com/u/mr.prabin)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/running-two-apps-on-rails/129651 "2008-02-20T16:01:50Z")

</div>

Dear Members, I am newbie to ruby on rails. someone has already installed rails on my computer. he has also hosted a site. now one of my fellow one has developed an application on rails. I have to host that applicatio…

---

## [HABTM problem](https://www.ruby-forum.com/t/habtm-problem/129667)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/habtm-problem/129667 "2008-02-20T15:35:45Z")

</div>

Hello, I have two tables “people” and “relations” Following are the models class Person \< ActiveRecord::Base has\_and\_belongs\_to\_many :relations class Relation \< ActiveRecord::Base has\_and\_belongs\_to\_many :people I…

---

## [Will\_paginate question](https://www.ruby-forum.com/t/will-paginate-question/129586)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 3\
**Last updated:** [February 20, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/will-paginate-question/129586 "2008-02-20T14:42:37Z")

</div>

Hi- Is it possible to use search parameters with will\_paginate? For example, something like this: @var = Model.paginate :per\_page =\> 20, :page =\> params\[:page\], :order =\> ‘my\_date DESC’, :conditions =\>\[“my\_date \>= ?…

---

## [Rendering SVG with respond\_to](https://www.ruby-forum.com/t/rendering-svg-with-respond-to/129537)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 3\
**Last updated:** [February 20, 2008, 2:19pm UTC](https://www.ruby-forum.com/t/rendering-svg-with-respond-to/129537 "2008-02-20T14:19:39Z")

</div>

Hi you all, I’ve used the library SVG::Graph to generate SVG images. I have this code in the controller: respond\_to do |format| format.html format.xml { render :xml =\> @graphic.to\_svg} end When html, I display a …

---

## [Error when upgrading application to Rails2](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 3\
**Last updated:** [February 20, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/error-when-upgrading-application-to-rails2/129541 "2008-02-20T14:10:21Z")

</div>

I have just tried to run my app under Rails 2 but I have hit a strange error message and wonder if anyone here can give me any pointers. The error is: ActionView::TemplateError (undefined method \`new’ for “rhtml”:Stri…

---

## [Markaby on Rails 2](https://www.ruby-forum.com/t/markaby-on-rails-2/129660)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/markaby-on-rails-2/129660 "2008-02-20T14:10:00Z")

</div>

I have been using Markaby in my application and have just started the port to Rails 2. So far it looks like Markaby does not work in Rails 2. Is Markaby still maintained? there seem to be no changes for Rails 2. All I…

---

## [How to connect multiple databases's users/roles](https://www.ruby-forum.com/t/how-to-connect-multiple-databasess-users-roles/129661)

<div class="topic-metadata">

**Author:** [@eduludi](https://www.ruby-forum.com/u/eduludi)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/how-to-connect-multiple-databasess-users-roles/129661 "2008-02-20T14:08:05Z")

</div>

Hi. I’m trying to authenticate users against database’s user/roles (PostgreSql), instead use an almighty user set in database.yml Can i use ActiveRecord::Base.establish\_conection() method? And is this related whit Act…

---

## [Strange thing with controller's helper method and method return value](https://www.ruby-forum.com/t/strange-thing-with-controllers-helper-method-and-method-return-value/129644)

<div class="topic-metadata">

**Author:** [@hei](https://www.ruby-forum.com/u/hei)\
**Replies:** 4\
**Last updated:** [February 20, 2008, 1:57pm UTC](https://www.ruby-forum.com/t/strange-thing-with-controllers-helper-method-and-method-return-value/129644 "2008-02-20T13:57:33Z")

</div>

1, why my helper method does not work I hava a controller named msg, and i define a method test(id) in / app/helpers/msg\_helper.rb but i can not use this method in /app/controllers/ msg\_controller.rb. Can anyone tel…

---

## [How to generate an xml file like this one?](https://www.ruby-forum.com/t/how-to-generate-an-xml-file-like-this-one/129657)

<div class="topic-metadata">

**Author:** [@differenthink](https://www.ruby-forum.com/u/differenthink)\
**Replies:** 1\
**Last updated:** [February 20, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/how-to-generate-an-xml-file-like-this-one/129657 "2008-02-20T13:45:46Z")

</div>

Hi, I ve got this tiny xml example, and i ve to be able to generate it dynamically : \<FLV\_PLAYLIST\> ##### I tried to handle it using rxml… but i guess i m to bad to do it… If someone could give me an han…

---

## [Call login page using ajax](https://www.ruby-forum.com/t/call-login-page-using-ajax/129658)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/call-login-page-using-ajax/129658 "2008-02-20T13:36:10Z")

</div>

hi all i want to call login page using ajax in a separate window…something like its there on www.imedix.com How can i do this? Please let me know thanks dhaval parikh

---

## [Download files from flex to rails](https://www.ruby-forum.com/t/download-files-from-flex-to-rails/129648)

<div class="topic-metadata">

**Author:** [@abhishekchess1](https://www.ruby-forum.com/u/abhishekchess1)\
**Replies:** 0\
**Last updated:** [February 20, 2008, 11:55am UTC](https://www.ruby-forum.com/t/download-files-from-flex-to-rails/129648 "2008-02-20T11:55:33Z")

</div>

could anyone tell me how to download files in flex using rails removed\_email\_address@domain.invalid

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

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