# Rails

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

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

---

## [Use of :include option in find query](https://www.ruby-forum.com/t/use-of-include-option-in-find-query/193052)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 1\
**Last updated:** [August 10, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/use-of-include-option-in-find-query/193052 "2010-08-10T14:45:07Z")

</div>

Hi, I have a Person model and Company model like as follows:- Person.rb class Person \<ActiveRecord::Base has\_one :company end Company.rb class Company \< ActiveRecord::Base end I have a function def person\_detai…

---

## [Hello and some clarity please before I start](https://www.ruby-forum.com/t/hello-and-some-clarity-please-before-i-start/193026)

<div class="topic-metadata">

**Author:** [@mikertjones](https://www.ruby-forum.com/u/mikertjones)\
**Replies:** 2\
**Last updated:** [August 10, 2010, 2:28pm UTC](https://www.ruby-forum.com/t/hello-and-some-clarity-please-before-i-start/193026 "2010-08-10T14:28:52Z")

</div>

Hello I have been following a few Ruby on Rails tutorials developing some simple apps with inspiring levels of success. The reason is that I have a large project which I would consider using RoR for (previously I hav…

---

## [Undefined method \`has\_many' for Object:Class +Savage Beast 2.3 plugin](https://www.ruby-forum.com/t/undefined-method-has-many-for-object-class-savage-beast-2-3-plugin/193038)

<div class="topic-metadata">

**Author:** [@appu](https://www.ruby-forum.com/u/appu)\
**Replies:** 2\
**Last updated:** [August 10, 2010, 1:09pm UTC](https://www.ruby-forum.com/t/undefined-method-has-many-for-object-class-savage-beast-2-3-plugin/193038 "2010-08-10T13:09:52Z")

</div>

Hi, i am using Savage Beast 2.3 plugin for the forum and i got and error undefined method \`has\_many’ for Object:Class C:/forum/vendor/plugins/savage-beast/lib/savage\_beast/user\_init.rb: 9:in included' C:/forum/vendor…

---

## [Updating a collection in a RESTful mannerâ€¦](https://www.ruby-forum.com/t/updating-a-collection-in-a-restful-mannera/192913)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 4\
**Last updated:** [August 10, 2010, 10:28am UTC](https://www.ruby-forum.com/t/updating-a-collection-in-a-restful-mannera/192913 "2010-08-10T10:28:52Z")

</div>

Hi, Today I added a checkbox to each row of a table and a save button, to perform an Archive operation on N items in the table. This is essentially an update of the collection. My initial thought was to PUT to studen…

---

## [Locking Images in HTML Files..can use it on ROR also](https://www.ruby-forum.com/t/locking-images-in-html-files-can-use-it-on-ror-also/192963)

<div class="topic-metadata">

**Author:** [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Replies:** 6\
**Last updated:** [August 10, 2010, 9:37am UTC](https://www.ruby-forum.com/t/locking-images-in-html-files-can-use-it-on-ror-also/192963 "2010-08-10T09:37:56Z")

</div>

I was looking for this locking procedure. and found out the below code works like no one can click on the image and save it other than printscreen. this is best when a high resolution background image is being used. …

---

## [Attaching multiple files at a time on a has\_many through](https://www.ruby-forum.com/t/attaching-multiple-files-at-a-time-on-a-has-many-through/193030)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 0\
**Last updated:** [August 10, 2010, 8:43am UTC](https://www.ruby-forum.com/t/attaching-multiple-files-at-a-time-on-a-has-many-through/193030 "2010-08-10T08:43:03Z")

</div>

Hi My models are class MessageThread \< ActiveRecord::Base has\_many :messages accepts\_nested\_attributes\_for :messages end class Message \< ActiveRecord::Base has\_many :message\_participants belongs\_to :message\_threa…

---

## [Script/server throws out lot of errors](https://www.ruby-forum.com/t/script-server-throws-out-lot-of-errors/193027)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 1\
**Last updated:** [August 10, 2010, 8:04am UTC](https://www.ruby-forum.com/t/script-server-throws-out-lot-of-errors/193027 "2010-08-10T08:04:23Z")

</div>

Hello, I use Rails 2.3.8 on my Ubuntu (10.04) machine. I started a new app and when I started it using script/server , I get these following errors =\> Booting Mongrel =\> Rails 2.3.8 application starting on http://0.…

---

## [Expanding tests with own methods](https://www.ruby-forum.com/t/expanding-tests-with-own-methods/193009)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 0\
**Last updated:** [August 9, 2010, 11:41pm UTC](https://www.ruby-forum.com/t/expanding-tests-with-own-methods/193009 "2010-08-09T23:41:38Z")

</div>

I want to call the method ‘url\_for’ in my functional test. e.g. assert\_select “a\[href=?\]”, url\_for(:action =\> :new), :text =\> ‘Neue Seite’ The book I am reading suggests doing this: class PagesControllerTest \< Action…

---

## [What is @controller instance variable?](https://www.ruby-forum.com/t/what-is-controller-instance-variable/193001)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 6\
**Last updated:** [August 9, 2010, 11:39pm UTC](https://www.ruby-forum.com/t/what-is-controller-instance-variable/193001 "2010-08-09T23:39:35Z")

</div>

In a book I’m reading the author tries to do the following from within his controller test file: class PagesControllerTest \< ActionController::TestCase def test\_create\_link\_in\_index get :index assert\_select “a\[href=…

---

## [Want my daemons to have their own logger instance](https://www.ruby-forum.com/t/want-my-daemons-to-have-their-own-logger-instance/193006)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 9, 2010, 10:45pm UTC](https://www.ruby-forum.com/t/want-my-daemons-to-have-their-own-logger-instance/193006 "2010-08-09T22:45:53Z")

</div>

I have a daemon named “sketcher” and I want everything related to the “sketcher” program to go to “sketcher.log” I’ve tried putting logger = Logger.new(File.join("#{RAILS\_ROOT}/log", “sketcher.log”) in the top method…

---

## [Logging form delayed job class](https://www.ruby-forum.com/t/logging-form-delayed-job-class/193005)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [August 9, 2010, 10:37pm UTC](https://www.ruby-forum.com/t/logging-form-delayed-job-class/193005 "2010-08-09T22:37:06Z")

</div>

I have asked this before without any luck, trying again. this is what I have in my dj.rb initializer Delayed::Worker.backend = :active\_record Delayed::Worker.logger = Rails.logger #Delayed::Worker.logger = ActiveSupp…

---

## [How could I get the routes namespace in the view?](https://www.ruby-forum.com/t/how-could-i-get-the-routes-namespace-in-the-view/192973)

<div class="topic-metadata">

**Author:** [@xuwenhao](https://www.ruby-forum.com/u/xuwenhao)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 9:20pm UTC](https://www.ruby-forum.com/t/how-could-i-get-the-routes-namespace-in-the-view/192973 "2010-08-09T21:20:40Z")

</div>

I am currently working on an extension for spree. In this extension, we introduce more roles than the current user and admin role. For the new role, like a product supplier, we will only let them manage the products i…

---

## [DateTime#civil specs](https://www.ruby-forum.com/t/datetime-civil-specs/192989)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 2\
**Last updated:** [August 9, 2010, 8:38pm UTC](https://www.ruby-forum.com/t/datetime-civil-specs/192989 "2010-08-09T20:38:54Z")

</div>

Where to find the specs for DateTime#civil?

---

## [Flashed sign up and sign out messages - Devise](https://www.ruby-forum.com/t/flashed-sign-up-and-sign-out-messages-devise/192948)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 2\
**Last updated:** [August 9, 2010, 7:45pm UTC](https://www.ruby-forum.com/t/flashed-sign-up-and-sign-out-messages-devise/192948 "2010-08-09T19:45:11Z")

</div>

In following this tutorial: When I sign up or sign out I don’t get a flash message as shown in the tutorial, what could be the problem here? Thanks.

---

## [How to test multiple logins from single host?](https://www.ruby-forum.com/t/how-to-test-multiple-logins-from-single-host/192988)

<div class="topic-metadata">

**Author:** [@Jedrin](https://www.ruby-forum.com/u/Jedrin)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 7:34pm UTC](https://www.ruby-forum.com/t/how-to-test-multiple-logins-from-single-host/192988 "2010-08-09T19:34:27Z")

</div>

When logging in to a web server using watir or some other means through rails test api, we would like to test things like multiple users logged in as well as different functionality. The problem seems to be that the w…

---

## [Can't quit server after running script/server command](https://www.ruby-forum.com/t/cant-quit-server-after-running-script-server-command/192990)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 5:58pm UTC](https://www.ruby-forum.com/t/cant-quit-server-after-running-script-server-command/192990 "2010-08-09T17:58:57Z")

</div>

Am working on first\_app for RoR and am running Ruby 1.8.7 and Rails 2.3.8 on Mac OSX Snow Leopard. Having trouble after I run the script/server command which boots up Mongrel. When I press Control-C to quit the server…

---

## [Configure question and passenger](https://www.ruby-forum.com/t/configure-question-and-passenger/192955)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 6\
**Last updated:** [August 9, 2010, 5:26pm UTC](https://www.ruby-forum.com/t/configure-question-and-passenger/192955 "2010-08-09T17:26:13Z")

</div>

Greetings all. I have seen a couple of diagrams on the net that look like a computer set up as an nginx server and more than one mongrel server running at once. What is the advantage of having more than one mongrel …

---

## [Convert 0, "0", "true", etc. to boolean](https://www.ruby-forum.com/t/convert-0-0-true-etc-to-boolean/64329)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 6\
**Last updated:** [August 9, 2010, 5:25pm UTC](https://www.ruby-forum.com/t/convert-0-0-true-etc-to-boolean/64329 "2010-08-09T17:25:10Z")

</div>

Hi, is there a ruby / rails builtin function that converts 0 / 1 “0” / “1” “yes” / “no” “true” / “false” to a boolean? cheers peter

---

## [3tier suggestion (ROR \<--\> ROR \<--\> DB](https://www.ruby-forum.com/t/3tier-suggestion-ror-ror-db/192933)

<div class="topic-metadata">

**Author:** [@cyberjom](https://www.ruby-forum.com/u/cyberjom)\
**Replies:** 6\
**Last updated:** [August 9, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/3tier-suggestion-ror-ror-db/192933 "2010-08-09T17:15:05Z")

</div>

I have to develop an ROR application that talk to it’s self. 3 Server (1st server ROR \<—\> 2nd server ROR \<—\> 3rd server DBMS) How can I easily develop this ? I think it’s too much effort to build 2 separate RORs proje…

---

## [Geokit Plugin On Hosted Server](https://www.ruby-forum.com/t/geokit-plugin-on-hosted-server/192960)

<div class="topic-metadata">

**Author:** [@globalxolutions](https://www.ruby-forum.com/u/globalxolutions)\
**Replies:** 2\
**Last updated:** [August 9, 2010, 4:05pm UTC](https://www.ruby-forum.com/t/geokit-plugin-on-hosted-server/192960 "2010-08-09T16:05:16Z")

</div>

Hi, I am new here, but I hope somebody have a clue about this issue. I am using rails 2.2.2 and the geokit gem. It works very good for a while, but for unknown reason it stopped working on my hosting server, but it st…

---

## [Rails 3 - Ruby 1.9.2 - cannot output correctly HTML special characters](https://www.ruby-forum.com/t/rails-3-ruby-1-9-2-cannot-output-correctly-html-special-characters/192980)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [August 9, 2010, 3:40pm UTC](https://www.ruby-forum.com/t/rails-3-ruby-1-9-2-cannot-output-correctly-html-special-characters/192980 "2010-08-09T15:40:14Z")

</div>

this is my first Rails3-Ruby 1.9.2 test app… I cannot out a simple html string w special characters like © copyright = “Copyright © " + " 2010 , TestApp Ltd.” using copyright in my view, I see displayed Copyright © 2…

---

## [MySQL rake db:migrate gives me dyld: lazy symbol binding failed: Symbol not found: \_mysql\_init](https://www.ruby-forum.com/t/mysql-rake-db-migrate-gives-me-dyld-lazy-symbol-binding-failed-symbol-not-found-mysql-init/192985)

<div class="topic-metadata">

**Author:** [@neigaard](https://www.ruby-forum.com/u/neigaard)\
**Replies:** 0\
**Last updated:** [August 9, 2010, 3:37pm UTC](https://www.ruby-forum.com/t/mysql-rake-db-migrate-gives-me-dyld-lazy-symbol-binding-failed-symbol-not-found-mysql-init/192985 "2010-08-09T15:37:18Z")

</div>

Hi When I do a “rake db:migrate”, I get the following error: (in /Users/sneigaard/work/rails/mailtimer) dyld: lazy symbol binding failed: Symbol not found: \_mysql\_init Referenced from: /Library/Ruby/Gems/1.8/gems/my…

---

## [Creation of XML with objects](https://www.ruby-forum.com/t/creation-of-xml-with-objects/192974)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 6\
**Last updated:** [August 9, 2010, 3:25pm UTC](https://www.ruby-forum.com/t/creation-of-xml-with-objects/192974 "2010-08-09T15:25:00Z")

</div>

Hi, I am trying to get the response in xml format. For that I have written following code def user\_details @user=User.find(params\[:id\]) @company=@user.company respond\_to do |format| format.xml {render :xml=\> @user…

---

## [Rd /S /Q depot](https://www.ruby-forum.com/t/rd-s-q-depot/192981)

<div class="topic-metadata">

**Author:** [@pravin\_mishra](https://www.ruby-forum.com/u/pravin_mishra)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/rd-s-q-depot/192981 "2010-08-09T14:22:20Z")

</div>

hi can any one tell me about what is use of this command ““rd /S /Q depot”” in window ““rm -rf depot”” in linux here depot is the database name actually i have seen this command in agil web development tutorial t…

---

## [Virtual rails....installing rails?](https://www.ruby-forum.com/t/virtual-rails-installing-rails/192956)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 9, 2010, 1:46pm UTC](https://www.ruby-forum.com/t/virtual-rails-installing-rails/192956 "2010-08-09T13:46:37Z")

</div>

I am running windows vista on my laptop. i installed virtual machine and virtual rails and am using linux mint. after the installation i followed a tutorial which had me do the following: Log in and open a terminal…

---

## [Bundle Install issue](https://www.ruby-forum.com/t/bundle-install-issue/192783)

<div class="topic-metadata">

**Author:** [@Huet](https://www.ruby-forum.com/u/Huet)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 10:01am UTC](https://www.ruby-forum.com/t/bundle-install-issue/192783 "2010-08-09T10:01:43Z")

</div>

Hi all, Sorry for the long rambling post, but I thought it would be best to list my GEMS and Gemfile here as well. I have got myself a new laptop that is running unbuntu 10.4 and I am porting my code from a ubuntu 9.…

---

## [Shopping card tutorial](https://www.ruby-forum.com/t/shopping-card-tutorial/192966)

<div class="topic-metadata">

**Author:** [@pravin\_mishra](https://www.ruby-forum.com/u/pravin_mishra)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 9:53am UTC](https://www.ruby-forum.com/t/shopping-card-tutorial/192966 "2010-08-09T09:53:01Z")

</div>

hi please send me any good tutorial link for shopping card . where code will present along width explanation. thanks

---

## [Http://rails-bestpractices.com launched](https://www.ruby-forum.com/t/http-rails-bestpractices-com-launched/192967)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 0\
**Last updated:** [August 9, 2010, 9:42am UTC](https://www.ruby-forum.com/t/http-rails-bestpractices-com-launched/192967 "2010-08-09T09:42:29Z")

</div>

Hi I’m glad to tell you http://rails-bestpractices.com is now launched. It’s a website that provides the best practices to write rails codes and everybody can share his/her practices. It’s also the home page of rai…

---

## [Devise :current\_password validations and checking (how?)](https://www.ruby-forum.com/t/devise-current-password-validations-and-checking-how/192962)

<div class="topic-metadata">

**Author:** [@drec](https://www.ruby-forum.com/u/drec)\
**Replies:** 0\
**Last updated:** [August 9, 2010, 9:17am UTC](https://www.ruby-forum.com/t/devise-current-password-validations-and-checking-how/192962 "2010-08-09T09:17:45Z")

</div>

Hi Guys, In my devise applications in Rails 3, I created a separate form under my SettingsController class of which it handles the ‘Change Password’ of the User Model, so i can manipulate the current\_user in the Sett…

---

## [Rails 3 safe strings](https://www.ruby-forum.com/t/rails-3-safe-strings/192953)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 1\
**Last updated:** [August 9, 2010, 5:09am UTC](https://www.ruby-forum.com/t/rails-3-safe-strings/192953 "2010-08-09T05:09:42Z")

</div>

I am trying to convert my Rails 2.3.5 app to 2.3.8 and then to Rails 3.0 Currently, I am upgrading to Rails 2.3.8. The default escaping behavior is causing all kinds of problems. I have installed the rails\_xss plugin…

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

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