# Rails

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

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

---

## [Default value for scope in multi-account App, best way](https://www.ruby-forum.com/t/default-value-for-scope-in-multi-account-app-best-way/166548)

<div class="topic-metadata">

**Author:** [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Replies:** 2\
**Last updated:** [April 27, 2009, 10:20am UTC](https://www.ruby-forum.com/t/default-value-for-scope-in-multi-account-app-best-way/166548 "2009-04-27T10:20:43Z")

</div>

Hi, I’m working on a multi-user, multi-account App where 1 account can have n users. It is very important that every user can only access info from its account. My approach is to add an account\_id to every model in th…

---

## [Link\_to\_remote with javascript to fetch multiple checkboxes](https://www.ruby-forum.com/t/link-to-remote-with-javascript-to-fetch-multiple-checkboxes/166552)

<div class="topic-metadata">

**Author:** [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Replies:** 1\
**Last updated:** [April 27, 2009, 10:14am UTC](https://www.ruby-forum.com/t/link-to-remote-with-javascript-to-fetch-multiple-checkboxes/166552 "2009-04-27T10:14:16Z")

</div>

Hello, I’m trying to submit a link using: \<%= link\_to\_remote " add selected", :html =\>{:id =\> ‘multiple\_select\_form’}, :url =\> { :controller =\> “sms”, :action =\> “add\_selected\_to\_recipients\_list”, :recipients\_sess…

---

## [Deletion of sessions](https://www.ruby-forum.com/t/deletion-of-sessions/166555)

<div class="topic-metadata">

**Author:** [@santoshturamari](https://www.ruby-forum.com/u/santoshturamari)\
**Replies:** 0\
**Last updated:** [April 27, 2009, 10:02am UTC](https://www.ruby-forum.com/t/deletion-of-sessions/166555 "2009-04-27T10:02:02Z")

</div>

Hi all, I am new to RoR, I want to delete sessions, and dont know how and where to use the following, ActiveRecord::SessionStore.Session.delete\_all \[‘updated\_at \< ?’, 1.week.ago\] or ActiveRecord::SessionStore.delet…

---

## [To Rails Guide Authors](https://www.ruby-forum.com/t/to-rails-guide-authors/166535)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 1\
**Last updated:** [April 27, 2009, 9:44am UTC](https://www.ruby-forum.com/t/to-rails-guide-authors/166535 "2009-04-27T09:44:23Z")

</div>

I think the guide Getting Started with Rails isn’t quite complete. Following along with your theme, you should create an action in the Post controller called “get”. Don’t worry, you are in good company with lots of ot…

---

## [Use a Time Zone without setting Time.zone?](https://www.ruby-forum.com/t/use-a-time-zone-without-setting-time-zone/164995)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 3\
**Last updated:** [April 27, 2009, 9:30am UTC](https://www.ruby-forum.com/t/use-a-time-zone-without-setting-time-zone/164995 "2009-04-27T09:30:54Z")

</div>

Hello! Is there an easy way to get a time in a particular time zone without calling Time.zone = some\_zone ? I store events in UTC in the DB, and I also store a string representation of the time zone as an attribute o…

---

## [Encoding Problem / mod\_rails / passenger / Postgresql 8.3](https://www.ruby-forum.com/t/encoding-problem-mod-rails-passenger-postgresql-8-3/166550)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 27, 2009, 9:19am UTC](https://www.ruby-forum.com/t/encoding-problem-mod-rails-passenger-postgresql-8-3/166550 "2009-04-27T09:19:45Z")

</div>

Hi, when I use mod\_rails/passenger with apache2 on linux instead of webbrick for our application, then it stops working with certain browsers like the ie, and konqueror but still works with firefox. I get the followi…

---

## [Default values for new table entry](https://www.ruby-forum.com/t/default-values-for-new-table-entry/166227)

<div class="topic-metadata">

**Author:** [@cbnewman](https://www.ruby-forum.com/u/cbnewman)\
**Replies:** 3\
**Last updated:** [April 27, 2009, 6:39am UTC](https://www.ruby-forum.com/t/default-values-for-new-table-entry/166227 "2009-04-27T06:39:09Z")

</div>

All, I would like a new record that is created with the new.html.erb page to always populate a specific variable with a default value. The simplest way would be to have a check\_box that defaults to checked when the p…

---

## [Find\_by\_sql](https://www.ruby-forum.com/t/find-by-sql/166514)

<div class="topic-metadata">

**Author:** [@dmarc](https://www.ruby-forum.com/u/dmarc)\
**Replies:** 3\
**Last updated:** [April 27, 2009, 5:58am UTC](https://www.ruby-forum.com/t/find-by-sql/166514 "2009-04-27T05:58:35Z")

</div>

I’m having some difficulty getting find\_by\_sql to work. This code below works perfect: @available = Elevator.find\_by\_sql(“select name from elevator\_timeslots WHERE NOT EXISTS(select elevator\_timeslot\_id from elevators…

---

## [Problem inserting date\_select values in the database](https://www.ruby-forum.com/t/problem-inserting-date-select-values-in-the-database/166521)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 5\
**Last updated:** [April 27, 2009, 4:17am UTC](https://www.ruby-forum.com/t/problem-inserting-date-select-values-in-the-database/166521 "2009-04-27T04:17:45Z")

</div>

I’m trying to insert the selected values of the date\_select object in the database but I’m getting nothing controller looks like this. def create @post = Post.new(params\[:post\]) if @post.save flash\[:notice\] = ‘Post…

---

## [Ruby mysql adaptor](https://www.ruby-forum.com/t/ruby-mysql-adaptor/166536)

<div class="topic-metadata">

**Author:** [@Norm](https://www.ruby-forum.com/u/Norm)\
**Replies:** 0\
**Last updated:** [April 27, 2009, 2:45am UTC](https://www.ruby-forum.com/t/ruby-mysql-adaptor/166536 "2009-04-27T02:45:03Z")

</div>

I know that the versions of RoR after 2 want you to use the C adaptor for MySql. Is there some reason for this other than performance? Not all of us need the highest performance solution (or we wouldn't be using RoR)…

---

## [Overriding a Relationships Propertry](https://www.ruby-forum.com/t/overriding-a-relationships-propertry/166534)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 0\
**Last updated:** [April 27, 2009, 1:58am UTC](https://www.ruby-forum.com/t/overriding-a-relationships-propertry/166534 "2009-04-27T01:58:19Z")

</div>

I have a child relationship that is denormalized. I want to normalize it at the object level once it’s retrieved: class Parent has\_many :denormalized\_children, :class\_name=\>‘Child’ def children if @normalized\_child…

---

## [Weird auto-complete production problem in Rails 2.3.2](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 4\
**Last updated:** [April 27, 2009, 1:19am UTC](https://www.ruby-forum.com/t/weird-auto-complete-production-problem-in-rails-2-3-2/166506 "2009-04-27T01:19:50Z")

</div>

Hello. ruby 1.8.6 (patchlevel 111) rails 2.3.2 Windows XP Professional I am getting quite a weird problem. I have several auto-complete fields in a page. When I run the code in development mode everything works but…

---

## [Does anybody have an example of using Google Analytics to track unique pages?](https://www.ruby-forum.com/t/does-anybody-have-an-example-of-using-google-analytics-to-track-unique-pages/166530)

<div class="topic-metadata">

**Author:** [@InventoryTrackers](https://www.ruby-forum.com/u/InventoryTrackers)\
**Replies:** 1\
**Last updated:** [April 27, 2009, 12:12am UTC](https://www.ruby-forum.com/t/does-anybody-have-an-example-of-using-google-analytics-to-track-unique-pages/166530 "2009-04-27T00:12:31Z")

</div>

I posted two days ago asking how this group tracks their traffic and received the reply “Google Analytics?” I Googled on “Rails Analytics” and have gone about 20 pages back without finding any explanations of how one …

---

## [SQLite3::SQLException: unable to open database file](https://www.ruby-forum.com/t/sqlite3-unable-to-open-database-file/166485)

<div class="topic-metadata">

**Author:** [@serenobs](https://www.ruby-forum.com/u/serenobs)\
**Replies:** 5\
**Last updated:** [April 26, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/sqlite3-unable-to-open-database-file/166485 "2009-04-26T20:14:10Z")

</div>

Hi. I was trying to code same as the rails guide : getting started. I could follow steps to 6.3 Working with Posts in the Browser. (setting home page, creating a resource, running a migration) After clicked create bu…

---

## [Simple Question: How do I install Authlogic w/o git?](https://www.ruby-forum.com/t/simple-question-how-do-i-install-authlogic-w-o-git/155572)

<div class="topic-metadata">

**Author:** [@davox](https://www.ruby-forum.com/u/davox)\
**Replies:** 4\
**Last updated:** [April 26, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/simple-question-how-do-i-install-authlogic-w-o-git/155572 "2009-04-26T20:14:09Z")

</div>

I don’t think I’m going to figure out how to install Git anytime soon. The install fails everytime I issue a “make.” The authlogic plugin page only offers a git repository (git://github.com/binarylogic/authlogic.git …

---

## [Login system - user password being updated](https://www.ruby-forum.com/t/login-system-user-password-being-updated/166511)

<div class="topic-metadata">

**Author:** [@furrot](https://www.ruby-forum.com/u/furrot)\
**Replies:** 2\
**Last updated:** [April 26, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/login-system-user-password-being-updated/166511 "2009-04-26T18:35:10Z")

</div>

I am developing a small site. The login system works fine and I am using the sha1 hashing alg to hash passwords. I have an admin side that can enable or disable users. The problem seems to lie in the disable (destroy)…

---

## [Is Rails the Right Choice?](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366)

<div class="topic-metadata">

**Author:** [@Carmine\_P](https://www.ruby-forum.com/u/Carmine_P)\
**Replies:** 4\
**Last updated:** [April 26, 2009, 6:22pm UTC](https://www.ruby-forum.com/t/is-rails-the-right-choice/166366 "2009-04-26T18:22:53Z")

</div>

We are a group of developers that are about to start a project and so we are searching for the best tools and languages for the job. The project is essentially a “server” web application that holds data in XML, and an…

---

## [Concatenating to an array constant for options\_for\_select](https://www.ruby-forum.com/t/concatenating-to-an-array-constant-for-options-for-select/166493)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 1\
**Last updated:** [April 26, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/concatenating-to-an-array-constant-for-options-for-select/166493 "2009-04-26T17:58:18Z")

</div>

Hello, I have the following code: \<%= select\_tag :role, options\_for\_select(Project::COMPANY\_ROLES.concat (\[‘Other…’\]), @relationship.role), :class =\> ‘selectInput hasOtherValue’ %\> For some reason it concatenates “O…

---

## [Creating a WYSIWYG editor with Protoype and Scirptaculous](https://www.ruby-forum.com/t/creating-a-wysiwyg-editor-with-protoype-and-scirptaculous/166512)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 0\
**Last updated:** [April 26, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/creating-a-wysiwyg-editor-with-protoype-and-scirptaculous/166512 "2009-04-26T17:10:31Z")

</div>

Hi, In my little blog engine, display a sidebar that has the 10 latest images I have uploaded, it’s a list formatted with its Textile html equivalent. So I’d like to make my little list draggable. That’s easy, but no…

---

## [Combining acts\_as\_taggable, will\_paginate and scope\_out](https://www.ruby-forum.com/t/combining-acts-as-taggable-will-paginate-and-scope-out/166510)

<div class="topic-metadata">

**Author:** [@Commander\_J](https://www.ruby-forum.com/u/Commander_J)\
**Replies:** 1\
**Last updated:** [April 26, 2009, 5:04pm UTC](https://www.ruby-forum.com/t/combining-acts-as-taggable-will-paginate-and-scope-out/166510 "2009-04-26T17:04:26Z")

</div>

I want to display published posts that are tagged using will\_paginate. Options include: Add :conditions =\> { :published =\> true } to the find options. Does not work because will\_paginate will then return too many re…

---

## [Change link color on mouse over](https://www.ruby-forum.com/t/change-link-color-on-mouse-over/166455)

<div class="topic-metadata">

**Author:** [@jicksta](https://www.ruby-forum.com/u/jicksta)\
**Replies:** 6\
**Last updated:** [April 26, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/change-link-color-on-mouse-over/166455 "2009-04-26T15:15:23Z")

</div>

Hi, I googled around for more than 5 hours now but still I couldn’t get the solution for my question: How can I change the color of the link as the mouse is rolled over it? Also, change the color of the active link an…

---

## [Changing the ActiveRecord mapping of boolean values in the DB?](https://www.ruby-forum.com/t/changing-the-activerecord-mapping-of-boolean-values-in-the-db/166502)

<div class="topic-metadata">

**Author:** [@wet](https://www.ruby-forum.com/u/wet)\
**Replies:** 1\
**Last updated:** [April 26, 2009, 1:40pm UTC](https://www.ruby-forum.com/t/changing-the-activerecord-mapping-of-boolean-values-in-the-db/166502 "2009-04-26T13:40:29Z")

</div>

Hi, I want to insert some rows into a sqlite3 database where some tables contain BOOLEAN columns. Some older applications accessing the same DB require boolean columns to be 0 and 1, whereas the default behaviour of …

---

## [Want to switch my apps to RonR](https://www.ruby-forum.com/t/want-to-switch-my-apps-to-ronr/166498)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 26, 2009, 10:38am UTC](https://www.ruby-forum.com/t/want-to-switch-my-apps-to-ronr/166498 "2009-04-26T10:38:45Z")

</div>

Hello everyone, Please help, need 2 developers to switch my website from php to RonR. Please give quote Vnguyen

---

## [\[JOBS\] Looking for a Rails tutor 20 USD/hour Part-Time and Remote](https://www.ruby-forum.com/t/jobs-looking-for-a-rails-tutor-20-usd-hour-part-time-and-remote/166445)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 26, 2009, 10:35am UTC](https://www.ruby-forum.com/t/jobs-looking-for-a-rails-tutor-20-usd-hour-part-time-and-remote/166445 "2009-04-26T10:35:48Z")

</div>

Hi, I’m looking for some who has a good understanding with Rails and RSpec. You basically help me working with my project. Payment done by PayPal weekly. Skills (for the time being): Rails RSpec TDD Good English s…

---

## [Back in PHP/CSS hell](https://www.ruby-forum.com/t/back-in-php-css-hell/166450)

<div class="topic-metadata">

**Author:** [@kallep](https://www.ruby-forum.com/u/kallep)\
**Replies:** 2\
**Last updated:** [April 26, 2009, 9:04am UTC](https://www.ruby-forum.com/t/back-in-php-css-hell/166450 "2009-04-26T09:04:34Z")

</div>

I think one of the main reason why I like Ruby on Rail is the fact it is a opinionated software. Unfortunately when it come to the design (css) part you don’t get any guidance. I have now spent quite some time, trying…

---

## [Relationship + XML](https://www.ruby-forum.com/t/relationship-xml/166214)

<div class="topic-metadata">

**Author:** [@wouter](https://www.ruby-forum.com/u/wouter)\
**Replies:** 1\
**Last updated:** [April 26, 2009, 8:11am UTC](https://www.ruby-forum.com/t/relationship-xml/166214 "2009-04-26T08:11:57Z")

</div>

Hey, I am developping a website in ruby on rails and I am wondering how i can creaty something like this! xml: \<…\> 1 parent model activity and 2 child models user and plaze! How can i make this in ruby on r…

---

## [Non-repeatable "undefined error 'path'" error](https://www.ruby-forum.com/t/non-repeatable-undefined-error-path-error/166479)

<div class="topic-metadata">

**Author:** [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Replies:** 2\
**Last updated:** [April 26, 2009, 6:28am UTC](https://www.ruby-forum.com/t/non-repeatable-undefined-error-path-error/166479 "2009-04-26T06:28:34Z")

</div>

I’m seeing an error the first time I run a create after restarting my webserver (thin). Same create succeeds on all following attempts. Details: ruby 1.9.2dev rails 2.3.2 rack 0.9.1 thin 1.0.0 rmagick 2.9.1 I’m …

---

## [Symlink and map.root config](https://www.ruby-forum.com/t/symlink-and-map-root-config/166491)

<div class="topic-metadata">

**Author:** [@oily](https://www.ruby-forum.com/u/oily)\
**Replies:** 0\
**Last updated:** [April 26, 2009, 5:27am UTC](https://www.ruby-forum.com/t/symlink-and-map-root-config/166491 "2009-04-26T05:27:59Z")

</div>

Hi. If you have map.root :controller =\> “home”,:action=\>‘just\_arrived’, how do you set a symlink? I can link like railsapp/home/just\_arrived.rhtml but if you do that then map.root configuration is wasted.

---

## [If...elseif...else, broken; need help](https://www.ruby-forum.com/t/if-elseif-else-broken-need-help/166324)

<div class="topic-metadata">

**Author:** [@DrV](https://www.ruby-forum.com/u/DrV)\
**Replies:** 5\
**Last updated:** [April 26, 2009, 2:49am UTC](https://www.ruby-forum.com/t/if-elseif-else-broken-need-help/166324 "2009-04-26T02:49:25Z")

</div>

I’ve been working on a new project and created a custom method for one of the models. Nothing major. I brought up the console in --sandbox mode (also have tried in standard console), and tried playing with it. To my…

---

## [Write Static File for View Output?](https://www.ruby-forum.com/t/write-static-file-for-view-output/166469)

<div class="topic-metadata">

**Author:** [@Sav](https://www.ruby-forum.com/u/Sav)\
**Replies:** 2\
**Last updated:** [April 26, 2009, 1:11am UTC](https://www.ruby-forum.com/t/write-static-file-for-view-output/166469 "2009-04-26T01:11:36Z")

</div>

Is it possible to save a view’s output into a static file rather than dynamically generate it each request?.. I’ve got a working controller method and view to select my db records and format them into a custom XML out…

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

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