# Rails

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

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

---

## [How to set a page of root/ dir of a site](https://www.ruby-forum.com/t/how-to-set-a-page-of-root-dir-of-a-site/161835)

<div class="topic-metadata">

**Author:** [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Replies:** 2\
**Last updated:** [March 2, 2009, 11:39pm UTC](https://www.ruby-forum.com/t/how-to-set-a-page-of-root-dir-of-a-site/161835 "2009-03-02T23:39:47Z")

</div>

Hi all, I have started making a site in ruby/rails and just wondering how to set the page for the root/ dir of the site as i have got the other pages done ie:- example/dir1 example/dir2 example/dir3 example/dir4 …

---

## [Convert dynamic rails app to static html](https://www.ruby-forum.com/t/convert-dynamic-rails-app-to-static-html/161828)

<div class="topic-metadata">

**Author:** [@johan-vm](https://www.ruby-forum.com/u/johan-vm)\
**Replies:** 5\
**Last updated:** [March 2, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/convert-dynamic-rails-app-to-static-html/161828 "2009-03-02T23:02:08Z")

</div>

Can I convert a dynamic rails app to static html pages? I’d like to build some small (portfolio) sites; it would be nice if I could create them in Rails: create a basic scaffold to add about 20 projects… Afterwards, …

---

## [What is the best login/acl generator?](https://www.ruby-forum.com/t/what-is-the-best-login-acl-generator/84752)

<div class="topic-metadata">

**Author:** [@harper](https://www.ruby-forum.com/u/harper)\
**Replies:** 2\
**Last updated:** [March 2, 2009, 10:28pm UTC](https://www.ruby-forum.com/t/what-is-the-best-login-acl-generator/84752 "2009-03-02T22:28:23Z")

</div>

any best / easy ones?

---

## [Creating a tar file for download](https://www.ruby-forum.com/t/creating-a-tar-file-for-download/161810)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/creating-a-tar-file-for-download/161810 "2009-03-02T22:11:10Z")

</div>

Hello, I have an action on my controller named download which creates a tar file and then sends the file (via send\_file) to the user. Its working but I will like to delete the file once it is sent. The tar file shoul…

---

## [Writing Multi-Tenant Applications in Rails](https://www.ruby-forum.com/t/writing-multi-tenant-applications-in-rails/160722)

<div class="topic-metadata">

**Author:** [@friarminor](https://www.ruby-forum.com/u/friarminor)\
**Replies:** 2\
**Last updated:** [March 2, 2009, 10:04pm UTC](https://www.ruby-forum.com/t/writing-multi-tenant-applications-in-rails/160722 "2009-03-02T22:04:57Z")

</div>

Just wanted to share this link of Guy N. at AAC2009 http://aac2009.confreaks.com/06-feb-2009-14-30-writing-multi-tenant-applications-in-rails-guy-naor.html

---

## [Implementing conditional read-only attributes of ActiveRecord objects](https://www.ruby-forum.com/t/implementing-conditional-read-only-attributes-of-activerecord-objects/161827)

<div class="topic-metadata">

**Author:** [@jens](https://www.ruby-forum.com/u/jens)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 9:49pm UTC](https://www.ruby-forum.com/t/implementing-conditional-read-only-attributes-of-activerecord-objects/161827 "2009-03-02T21:49:04Z")

</div>

Hello, my goal is to implement the option of specifying a condition in attr\_protected, attr\_readonly and possibly other attribute methods in ActiveRecord objects. Rationale (example): class User \< AR:Base User shou…

---

## [Model Knowledge Of Controller Calling It](https://www.ruby-forum.com/t/model-knowledge-of-controller-calling-it/161818)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/model-knowledge-of-controller-calling-it/161818 "2009-03-02T21:10:37Z")

</div>

Does anyone know a good way for a Model to be aware of which Controller is calling it? For example, I have an after\_find method that should always be called unless the Controller is the ‘FooController’.

---

## [Form creates multiple models - handling errors](https://www.ruby-forum.com/t/form-creates-multiple-models-handling-errors/161822)

<div class="topic-metadata">

**Author:** [@psujohn](https://www.ruby-forum.com/u/psujohn)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/form-creates-multiple-models-handling-errors/161822 "2009-03-02T21:03:53Z")

</div>

Ok I’m sure I could find the answer to this if I knew the correct terminology but anyway … So I have a form to create a new vendor. A vendor has\_many services through services\_vendors. The new view has a couple “coll…

---

## [Managing multiple rails applications with apache](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764)

<div class="topic-metadata">

**Author:** [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Replies:** 8\
**Last updated:** [March 2, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/managing-multiple-rails-applications-with-apache/161764 "2009-03-02T20:31:22Z")

</div>

how can manage multiple rails applications with apache i have followed the following tutorial and successfullt set up my rails site using apache http://www.howtoforge.com/ruby\_on\_rails\_debian\_etch but how can i conf…

---

## [Rails2.3 plugin install git:// problem](https://www.ruby-forum.com/t/rails2-3-plugin-install-git-problem/161817)

<div class="topic-metadata">

**Author:** [@rick](https://www.ruby-forum.com/u/rick)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/rails2-3-plugin-install-git-problem/161817 "2009-03-02T20:12:46Z")

</div>

What am I missing here? This doesn’t work: -- mode: compilation; default-directory: “~/journeys/” -- Compilation started at Mon Mar 2 08:13:15 script/plugin install git://github.com/rubyist/aasm.git Plugin not foun…

---

## [Display keys and values of a hash](https://www.ruby-forum.com/t/display-keys-and-values-of-a-hash/161773)

<div class="topic-metadata">

**Author:** [@Toro](https://www.ruby-forum.com/u/Toro)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 7:52pm UTC](https://www.ruby-forum.com/t/display-keys-and-values-of-a-hash/161773 "2009-03-02T19:52:02Z")

</div>

Hello, I have a hash, represented by @hash. I want to display the keys and values of @hash in my view. I realize that if say one of keys was “ip\_address” i could simple add this to my view: \<%= @hash\[‘ip\_address’\] %\>.…

---

## [Changing the way form fields with errors are displayed](https://www.ruby-forum.com/t/changing-the-way-form-fields-with-errors-are-displayed/161816)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/changing-the-way-form-fields-with-errors-are-displayed/161816 "2009-03-02T19:27:49Z")

</div>

What file I must to edit? 7.1. Changing the way form fields with errors are displayed http://guides.rubyonrails.org/activerecord\_validations\_callbacks.html ActionView::Base.field\_error\_proc = Proc.new do |html\_tag, in…

---

## [Calendar in Rails](https://www.ruby-forum.com/t/calendar-in-rails/126218)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 4\
**Last updated:** [March 2, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/calendar-in-rails/126218 "2009-03-02T18:52:59Z")

</div>

HI All, Please can anyone tell me whether there is a rails plugin/app that allows creation of a calendar that can render events. I am not talking about a calendar date picker of which there are several, but something …

---

## [Admin links](https://www.ruby-forum.com/t/admin-links/161811)

<div class="topic-metadata">

**Author:** [@yaphi](https://www.ruby-forum.com/u/yaphi)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/admin-links/161811 "2009-03-02T18:47:35Z")

</div>

Is there a better way to show admin link than this? I want to implement page caching but can’t due to it not having conditions. Fragment caching seems wrong for my site since every page should be cached except I have …

---

## [Rails 2.2.2, Mac OS X and MySQL](https://www.ruby-forum.com/t/rails-2-2-2-mac-os-x-and-mysql/161799)

<div class="topic-metadata">

**Author:** [@nevermoo](https://www.ruby-forum.com/u/nevermoo)\
**Replies:** 17\
**Last updated:** [March 2, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/rails-2-2-2-mac-os-x-and-mysql/161799 "2009-03-02T18:35:52Z")

</div>

Hi all, I hope someone can inform me on this. I was shocked to find that since upgrading to Rails 2.2.2 my Rails projects using MySQL have broken. I have read some webpages that talk about checking whether you have l…

---

## [New project at the same domain](https://www.ruby-forum.com/t/new-project-at-the-same-domain/161803)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 5\
**Last updated:** [March 2, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/new-project-at-the-same-domain/161803 "2009-03-02T17:56:59Z")

</div>

Hi, just a quick question, is there a way how to run two apps on the same domain? Both for testing purposes. Thank you. P.

---

## [Rails Magazine - Issue #1 is now available](https://www.ruby-forum.com/t/rails-magazine-issue-1-is-now-available/161721)

<div class="topic-metadata">

**Author:** [@Olimpiu\_M](https://www.ruby-forum.com/u/Olimpiu_M)\
**Replies:** 2\
**Last updated:** [March 2, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/rails-magazine-issue-1-is-now-available/161721 "2009-03-02T17:49:19Z")

</div>

I am happy to announce the very first issue of Rails Magazine! This edition has 36 pages full of quality content, is printed in glossy full-color and can be ordered in US, UK and Canada. The paper is FSC certified fo…

---

## [Table lock](https://www.ruby-forum.com/t/table-lock/161759)

<div class="topic-metadata">

**Author:** [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Replies:** 8\
**Last updated:** [March 2, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/table-lock/161759 "2009-03-02T17:34:36Z")

</div>

How to lock a table in rails not row level lock .

---

## [Restful delete is driving me nuts](https://www.ruby-forum.com/t/restful-delete-is-driving-me-nuts/161796)

<div class="topic-metadata">

**Author:** [@jlf](https://www.ruby-forum.com/u/jlf)\
**Replies:** 2\
**Last updated:** [March 2, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/restful-delete-is-driving-me-nuts/161796 "2009-03-02T17:31:03Z")

</div>

Hi, In my project, all delete links aren’t working. They keep acting as “show” action. Here is an example for the announcements controller. In routes.rb : map.resources :announcements In my index view, I have the s…

---

## [Scope problem: controller class methods and helpers](https://www.ruby-forum.com/t/scope-problem-controller-class-methods-and-helpers/161805)

<div class="topic-metadata">

**Author:** [@jbc](https://www.ruby-forum.com/u/jbc)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/scope-problem-controller-class-methods-and-helpers/161805 "2009-03-02T16:48:23Z")

</div>

http://pastie.org/404716 Only produces “hello”, not “world”. Which is as designed, but how do I make it do what I want - namely, set a variable in a class method, and have that variable available in a view helper?

---

## [Are files in lib supposed to be loaded automatically?](https://www.ruby-forum.com/t/are-files-in-lib-supposed-to-be-loaded-automatically/161784)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 3:54pm UTC](https://www.ruby-forum.com/t/are-files-in-lib-supposed-to-be-loaded-automatically/161784 "2009-03-02T15:54:00Z")

</div>

Can anyone set me straight on this? I often put files in lib which add new modules or monkey patch existing classes etc. These always need to be explicitly required in my environment file. That all works, but one of…

---

## [Form helper](https://www.ruby-forum.com/t/form-helper/161800)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/form-helper/161800 "2009-03-02T15:40:07Z")

</div>

How can I set a default value: M ? How can I order optios? \<%= select( “user”, “sex”, { t(“male”) =\> “M”, t(“female”) =\> “F” }, {:include\_blank =\> true} ) %\>

---

## [Creating/Storing Attendance Records for different Rooms](https://www.ruby-forum.com/t/creating-storing-attendance-records-for-different-rooms/161797)

<div class="topic-metadata">

**Author:** [@noddy](https://www.ruby-forum.com/u/noddy)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 3:08pm UTC](https://www.ruby-forum.com/t/creating-storing-attendance-records-for-different-rooms/161797 "2009-03-02T15:08:22Z")

</div>

I’m developing a small rails application for my local community centre to help them record their attendance. The community centre (building) has several rooms and each room is used on a daily basis for numerous activi…

---

## [How can I load a session from the cookie store manually?](https://www.ruby-forum.com/t/how-can-i-load-a-session-from-the-cookie-store-manually/161768)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/how-can-i-load-a-session-from-the-cookie-store-manually/161768 "2009-03-02T14:59:07Z")

</div>

Hi all, I’m trying to achieve something a bit unusual - I want to use a session\_id I have to retrieve the session object from the CookieStore. Obviously, Rails does it somehow but I couldn’t figure out how. Can anyon…

---

## [Simple Captcha setup problem](https://www.ruby-forum.com/t/simple-captcha-setup-problem/161765)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 1:34pm UTC](https://www.ruby-forum.com/t/simple-captcha-setup-problem/161765 "2009-03-02T13:34:42Z")

</div>

$ rake simple\_captcha:setup rake aborted! libMagickCore.so.1: cannot open shared object file: No such file or directory - /usr/lib/ruby/site\_ruby/1.8/x86\_64-linux/RMagick.so (See full trace by running task with --tra…

---

## [Default format for Date and update/create date on DB](https://www.ruby-forum.com/t/default-format-for-date-and-update-create-date-on-db/161780)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 12:38pm UTC](https://www.ruby-forum.com/t/default-format-for-date-and-update-create-date-on-db/161780 "2009-03-02T12:38:34Z")

</div>

Hello, I’ve changed the default date format in my envornment.rb: ActiveSupport::CoreExtensions::date::Conversions::DATE\_FORMATS.merge!(:default =\> ‘%d/%m/%Y’) Now I can display my database date rows with the .to\_s an…

---

## [Scheduling in Ruby on Rails](https://www.ruby-forum.com/t/scheduling-in-ruby-on-rails/161775)

<div class="topic-metadata">

**Author:** [@nevermoo](https://www.ruby-forum.com/u/nevermoo)\
**Replies:** 3\
**Last updated:** [March 2, 2009, 12:06pm UTC](https://www.ruby-forum.com/t/scheduling-in-ruby-on-rails/161775 "2009-03-02T12:06:59Z")

</div>

Hi all, I hope someone can point me in the right direction. I am looking for some sample code to help with writing some code for scheduling maintenance for machinery. The idea is that, like a car, this machinery need…

---

## [Display order becomes oposite in tag\_list(acts\_as\_taggable](https://www.ruby-forum.com/t/display-order-becomes-oposite-in-tag-list-acts-as-taggable/161777)

<div class="topic-metadata">

**Author:** [@tuhin\_cse99](https://www.ruby-forum.com/u/tuhin_cse99)\
**Replies:** 0\
**Last updated:** [March 2, 2009, 11:38am UTC](https://www.ruby-forum.com/t/display-order-becomes-oposite-in-tag-list-acts-as-taggable/161777 "2009-03-02T11:38:39Z")

</div>

Hi everyone, I am using acts\_as\_taggable\_on\_steroids plugin in my app for tagging. When I create a helper method by using tag\_list method of acts\_as\_taggable.rb The display order becomes opposite. But when I use ta…

---

## [Strange behavior of Source.column\_names](https://www.ruby-forum.com/t/strange-behavior-of-source-column-names/161722)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 10:34am UTC](https://www.ruby-forum.com/t/strange-behavior-of-source-column-names/161722 "2009-03-02T10:34:04Z")

</div>

I have a class named Source and a controller named SourceController etc. When I use Source.column\_names in the view all names except names ending in \_id is listed, although according to the documentation all names sh…

---

## [How to Change Up Methods According to Parameter](https://www.ruby-forum.com/t/how-to-change-up-methods-according-to-parameter/161755)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [March 2, 2009, 10:30am UTC](https://www.ruby-forum.com/t/how-to-change-up-methods-according-to-parameter/161755 "2009-03-02T10:30:33Z")

</div>

Hi… I have two methods.but the parameter will be changing. For the first method i send only one parameter(f). But for the second method i’ll send 3 parameters(f,search\_string\_1,search\_string\_2). And also for 3rd Met…

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

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