# Rails

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

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

---

## [Begore\_filter and XHR/Ajax calls](https://www.ruby-forum.com/t/begore-filter-and-xhr-ajax-calls/119276)

<div class="topic-metadata">

**Author:** [@raghus](https://www.ruby-forum.com/u/raghus)\
**Replies:** 2\
**Last updated:** [November 5, 2007, 7:34pm UTC](https://www.ruby-forum.com/t/begore-filter-and-xhr-ajax-calls/119276 "2007-11-05T19:34:14Z")

</div>

What’s the best way to do a javascript alert warning when someone is trying to access a ajax method that requires authentication - for example to rate a recipe, I have a star-based ajax/css interface. To actually add …

---

## [Executing .rb file within view](https://www.ruby-forum.com/t/executing-rb-file-within-view/119250)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [November 5, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/executing-rb-file-within-view/119250 "2007-11-05T19:26:37Z")

</div>

Hello everyone, I need to execute a ruby script from within my view. It’s a script that dynamically generates an image as output, so the invocation should look something like this: \<%= image\_tag “/images/myScript.rb?…

---

## [Can someone please help me? I think i'm going crazy! \[bug\]](https://www.ruby-forum.com/t/can-someone-please-help-me-i-think-im-going-crazy-bug/119268)

<div class="topic-metadata">

**Author:** [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Replies:** 14\
**Last updated:** [November 5, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/can-someone-please-help-me-i-think-im-going-crazy-bug/119268 "2007-11-05T19:23:06Z")

</div>

hello all… i’m experiencing what seems to be a bug in rails while trying to pass a local variable to a partial. i’m referencing code from : http://www.pointstorm.com/~gavin/partials-doc/classes/ActionView/Partials.ht…

---

## [Create and read XML](https://www.ruby-forum.com/t/create-and-read-xml/119206)

<div class="topic-metadata">

**Author:** [@zaid](https://www.ruby-forum.com/u/zaid)\
**Replies:** 1\
**Last updated:** [November 5, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/create-and-read-xml/119206 "2007-11-05T18:36:50Z")

</div>

Hello I am trying to create and read an xml. But I am not able to store them on a map. I think so: xml = Builder:: XmlMarkup.new(:target =\> ‘./inf.xml’, :indent =\> 1) xml.id (1) But I do not know how to save it in …

---

## [ActiveRecord AssociationProxy magic?](https://www.ruby-forum.com/t/activerecord-associationproxy-magic/119153)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 8\
**Last updated:** [November 5, 2007, 6:08pm UTC](https://www.ruby-forum.com/t/activerecord-associationproxy-magic/119153 "2007-11-05T18:08:42Z")

</div>

In the following ActiveRecord code, it defines a method to access associations like user.addresses (has\_many) def collection\_reader\_method(reflection, association\_proxy\_class) define\_method(reflection.name) do |\*…

---

## [Multiple HABTM](https://www.ruby-forum.com/t/multiple-habtm/119200)

<div class="topic-metadata">

**Author:** [@heldopslippers](https://www.ruby-forum.com/u/heldopslippers)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/multiple-habtm/119200 "2007-11-05T18:01:35Z")

</div>

hee guys… I have a problem with HABTM… I have articles en users… wich are connected to rights… beceause users can have more then 1 right and rights can have more than one user… and the same by articles of course I h…

---

## [Scaffold in Rails 2](https://www.ruby-forum.com/t/scaffold-in-rails-2/119215)

<div class="topic-metadata">

**Author:** [@Arash](https://www.ruby-forum.com/u/Arash)\
**Replies:** 5\
**Last updated:** [November 5, 2007, 5:35pm UTC](https://www.ruby-forum.com/t/scaffold-in-rails-2/119215 "2007-11-05T17:35:14Z")

</div>

Hi, I am trying rails 2 and the dynamic scaffolding does not work. I wonder if the syntax changed or what?

---

## [RESTful show or index?](https://www.ruby-forum.com/t/restful-show-or-index/119034)

<div class="topic-metadata">

**Author:** [@monkeyten](https://www.ruby-forum.com/u/monkeyten)\
**Replies:** 9\
**Last updated:** [November 5, 2007, 5:30pm UTC](https://www.ruby-forum.com/t/restful-show-or-index/119034 "2007-11-05T17:30:34Z")

</div>

This one has been puzzling me and its probably fairly simple(!), so maybe someone could shed some light on it… I have a resource called messages. By RESTful principles, the index method shows all messages and the show…

---

## [Authentication: is a guest a user or an "exception"?](https://www.ruby-forum.com/t/authentication-is-a-guest-a-user-or-an-exception/119264)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [November 5, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/authentication-is-a-guest-a-user-or-an-exception/119264 "2007-11-05T17:22:15Z")

</div>

Hi all I’m currently implementing authentication/authorization in my app. Now I’m wondering what’s the common way to handle a guest… In fact, many of the visitors of my app will be anonymous users that just want to r…

---

## [Handling browser differences](https://www.ruby-forum.com/t/handling-browser-differences/118877)

<div class="topic-metadata">

**Author:** [@avramd](https://www.ruby-forum.com/u/avramd)\
**Replies:** 8\
**Last updated:** [November 5, 2007, 3:38pm UTC](https://www.ruby-forum.com/t/handling-browser-differences/118877 "2007-11-05T15:38:42Z")

</div>

Hello, Are there any resources or tutorials on how to handle browser differences in Rails? I’m mainly talking about when they render HTML and/or CSS differently. Do people set up groups of partials that are browser s…

---

## [\[ANN\] November Houston RoR/Ruby Meeting](https://www.ruby-forum.com/t/ann-november-houston-ror-ruby-meeting/119260)

<div class="topic-metadata">

**Author:** [@klancaster](https://www.ruby-forum.com/u/klancaster)\
**Replies:** 0\
**Last updated:** [November 5, 2007, 3:05pm UTC](https://www.ruby-forum.com/t/ann-november-houston-ror-ruby-meeting/119260 "2007-11-05T15:05:34Z")

</div>

The November meeting of the Houston RoR/Ruby group will be on the 13th at 6:00 PM. We have Gregg Sporar from Sun coming in to discuss the latest in support for Ruby/Rails in Netbeans. See http://houstonrb.com/ for mor…

---

## [Quick rubyinline fix for leopard (image\_science) Undefined symbols issue](https://www.ruby-forum.com/t/quick-rubyinline-fix-for-leopard-image-science-undefined-symbols-issue/118520)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/quick-rubyinline-fix-for-leopard-image-science-undefined-symbols-issue/118520 "2007-11-05T15:00:31Z")

</div>

if you install the RubyInline gem and image\_science and are having problems… remove your .ruby\_inline directory and run this sed one-liner. sudo sed -i -e “387,1s/flags\\ =\\ @flags.join('\\ ')/&\\ +\\ ' -lruby'/” /usr/l…

---

## [Observe\_field - problems saving form values](https://www.ruby-forum.com/t/observe-field-problems-saving-form-values/119060)

<div class="topic-metadata">

**Author:** [@randall](https://www.ruby-forum.com/u/randall)\
**Replies:** 4\
**Last updated:** [November 5, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/observe-field-problems-saving-form-values/119060 "2007-11-05T14:46:46Z")

</div>

Hi, I have a form that has two drop down lists in it. I have an observe\_field for the first list, that updates the second list. To better visualize this, the first list is country, the second is county. Now all this…

---

## [Will method value be cached?](https://www.ruby-forum.com/t/will-method-value-be-cached/119253)

<div class="topic-metadata">

**Author:** [@xain](https://www.ruby-forum.com/u/xain)\
**Replies:** 0\
**Last updated:** [November 5, 2007, 1:32pm UTC](https://www.ruby-forum.com/t/will-method-value-be-cached/119253 "2007-11-05T13:32:36Z")

</div>

Will method value be cached? For example, in situation like this: class Book \< ActiveRecord::Base def best\_book Book.find(:first, :conditions =\> \[…\]) end def open\_best\_book best\_book.ready best\_book.open end …

---

## [Coercion to child class? (between classes)](https://www.ruby-forum.com/t/coercion-to-child-class-between-classes/119231)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kornienko](https://www.ruby-forum.com/u/Mikhail_Kornienko)\
**Replies:** 4\
**Last updated:** [November 5, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/coercion-to-child-class-between-classes/119231 "2007-11-05T13:08:29Z")

</div>

I guess this is a pretty basic thing, but I dug thru all the books I have and found nothing… Basically, I have a CMS system which has Post class as a parent to Page, NewsPage and EventsPage classes. I need to read al…

---

## [Gruff help](https://www.ruby-forum.com/t/gruff-help/118846)

<div class="topic-metadata">

**Author:** [@qwerty73](https://www.ruby-forum.com/u/qwerty73)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 1:07pm UTC](https://www.ruby-forum.com/t/gruff-help/118846 "2007-11-05T13:07:54Z")

</div>

Hi to all, i’m trying to use the gruff libraries. Then I’ve installed rmagick with: sudo gem install rmagick and it seems all good, because at the end i receive this message: … make install /usr/bin/ruby setup.rb …

---

## [How to protect partial application with password apache2.2.4+proxy + mogrel cluster?](https://www.ruby-forum.com/t/how-to-protect-partial-application-with-password-apache2-2-4-proxy-mogrel-cluster/119222)

<div class="topic-metadata">

**Author:** [@La\_Ji](https://www.ruby-forum.com/u/La_Ji)\
**Replies:** 1\
**Last updated:** [November 5, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/how-to-protect-partial-application-with-password-apache2-2-4-proxy-mogrel-cluster/119222 "2007-11-05T12:47:23Z")

</div>

I was trying to ask the following question to the thread http://groups.google.com/group/rubyonrails-deployment/browse\_thread/thread/8ddedcfd45146ee0?fwc=1 but I wasn’t allowed. so I have to create a new thread. How d…

---

## [How to display thumbnail image with the product](https://www.ruby-forum.com/t/how-to-display-thumbnail-image-with-the-product/119122)

<div class="topic-metadata">

**Author:** [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Replies:** 18\
**Last updated:** [November 5, 2007, 12:19pm UTC](https://www.ruby-forum.com/t/how-to-display-thumbnail-image-with-the-product/119122 "2007-11-05T12:19:38Z")

</div>

Hi all, I am making a shopping cart application. In this application I need to display the thumbnail image with the product name. I have already install image magick and am trying to use it to display the thumbnail i…

---

## [Explanation of method](https://www.ruby-forum.com/t/explanation-of-method/119225)

<div class="topic-metadata">

**Author:** [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 12:09pm UTC](https://www.ruby-forum.com/t/explanation-of-method/119225 "2007-11-05T12:09:54Z")

</div>

hey i have a method def admin\_login\_required username, passwd = get\_auth\_data self.current\_user ||= User.authenticate(username, passwd) || :false if username && passwd logged\_in? && authorized? ? true : access\_denie…

---

## [Selecting a database from the application itself?](https://www.ruby-forum.com/t/selecting-a-database-from-the-application-itself/118380)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 11:42am UTC](https://www.ruby-forum.com/t/selecting-a-database-from-the-application-itself/118380 "2007-11-05T11:42:26Z")

</div>

Hi everybody, I just started thinking about a project and am seeking some help regarding its design. The idea would be to create labels (i.e. address labels).I could let users type the text manually, but I dont think…

---

## [Collection\_select default value?](https://www.ruby-forum.com/t/collection-select-default-value/119187)

<div class="topic-metadata">

**Author:** [@vanik](https://www.ruby-forum.com/u/vanik)\
**Replies:** 1\
**Last updated:** [November 5, 2007, 10:55am UTC](https://www.ruby-forum.com/t/collection-select-default-value/119187 "2007-11-05T10:55:00Z")

</div>

I’m having some confusion with collection\_select(). I am using two of them on my form: \<%= collection\_select(:user, :id, @users, :id, :login) %\> \<%= collection\_select(:department, :id, @depts, :id, :name, {}, :mul…

---

## [Internationalization options](https://www.ruby-forum.com/t/internationalization-options/119071)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 1\
**Last updated:** [November 5, 2007, 10:21am UTC](https://www.ruby-forum.com/t/internationalization-options/119071 "2007-11-05T10:21:08Z")

</div>

Hi, I’m new to ruby and rails. I need support for for localized pages, pages with multilingual content, international date/time formats, and calendar and time zone calculations. Initially, I asked someone on the ICU …

---

## [Two models one form. A lot of headache](https://www.ruby-forum.com/t/two-models-one-form-a-lot-of-headache/119186)

<div class="topic-metadata">

**Author:** [@Thiago\_G](https://www.ruby-forum.com/u/Thiago_G)\
**Replies:** 5\
**Last updated:** [November 5, 2007, 9:41am UTC](https://www.ruby-forum.com/t/two-models-one-form-a-lot-of-headache/119186 "2007-11-05T09:41:48Z")

</div>

Hi everyone, I building a sign up form using two models. One to keep the regular user information and the second to keep login and password. I got everything working out except for some little details that I can’t fi…

---

## [Ranges in RESTful resources](https://www.ruby-forum.com/t/ranges-in-restful-resources/119177)

<div class="topic-metadata">

**Author:** [@Evgeni\_Dobrev](https://www.ruby-forum.com/u/Evgeni_Dobrev)\
**Replies:** 2\
**Last updated:** [November 5, 2007, 8:55am UTC](https://www.ruby-forum.com/t/ranges-in-restful-resources/119177 "2007-11-05T08:55:02Z")

</div>

Hi, I am writing an application with nested resources. I have a resource called Facilities which has\_many Reservations. map.resources :facilities do |facilities| facilities.resources :reservations end I have thus u…

---

## [How to get rails command to default to MySQL instead of SQLite?](https://www.ruby-forum.com/t/how-to-get-rails-command-to-default-to-mysql-instead-of-sqlite/119223)

<div class="topic-metadata">

**Author:** [@miravol](https://www.ruby-forum.com/u/miravol)\
**Replies:** 3\
**Last updated:** [November 5, 2007, 8:49am UTC](https://www.ruby-forum.com/t/how-to-get-rails-command-to-default-to-mysql-instead-of-sqlite/119223 "2007-11-05T08:49:47Z")

</div>

I’m running OS/X 10.5 Leopard. Although I have MySQL installed the rails command creates a database.yml file that defaults to SQLite. How do I get it to default to MySQL instead? TIA

---

## [Lazy loading code in ROR](https://www.ruby-forum.com/t/lazy-loading-code-in-ror/118838)

<div class="topic-metadata">

**Author:** [@meerkalim](https://www.ruby-forum.com/u/meerkalim)\
**Replies:** 6\
**Last updated:** [November 5, 2007, 8:48am UTC](https://www.ruby-forum.com/t/lazy-loading-code-in-ror/118838 "2007-11-05T08:48:36Z")

</div>

Hi, I need to implement the lazy loading in our project , and i search a lot for this code but i didny got it so can any one help me out regards meer

---

## [Newbie trying to teach himself relationships (dangerous)](https://www.ruby-forum.com/t/newbie-trying-to-teach-himself-relationships-dangerous/119090)

<div class="topic-metadata">

**Author:** [@Nevyn](https://www.ruby-forum.com/u/Nevyn)\
**Replies:** 6\
**Last updated:** [November 5, 2007, 8:45am UTC](https://www.ruby-forum.com/t/newbie-trying-to-teach-himself-relationships-dangerous/119090 "2007-11-05T08:45:05Z")

</div>

Hi Guys, I am trying to learn ruby on rails as well as computer programming in general. I am a little confused about relationships. I want to create a ‘has and belongs to many’ relationship by making my books taggabl…

---

## [Loading config items dynamically with YAML?](https://www.ruby-forum.com/t/loading-config-items-dynamically-with-yaml/119230)

<div class="topic-metadata">

**Author:** [@chirag](https://www.ruby-forum.com/u/chirag)\
**Replies:** 0\
**Last updated:** [November 5, 2007, 8:00am UTC](https://www.ruby-forum.com/t/loading-config-items-dynamically-with-yaml/119230 "2007-11-05T08:00:38Z")

</div>

I would like to store some config items (headings for UI tabs) and load them dynamically at runtime. I thought about storing them in YAML files. But I’m not sure how to load and parse the YAML efficeintly? The YAML fi…

---

## [Calling a method after deliver](https://www.ruby-forum.com/t/calling-a-method-after-deliver/119229)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 0\
**Last updated:** [November 5, 2007, 7:35am UTC](https://www.ruby-forum.com/t/calling-a-method-after-deliver/119229 "2007-11-05T07:35:30Z")

</div>

Hi, I am trying to call a method after message is delivered via MyMailer.deliver\_message. Is the below the same as this? MyMailer.deliver\_message create\_sent\_record? class MyMailer \< ActionMailer::Base def message( …

---

## [Prototype toogle() problem](https://www.ruby-forum.com/t/prototype-toogle-problem/119226)

<div class="topic-metadata">

**Author:** [@Ghee\_wooi\_O](https://www.ruby-forum.com/u/Ghee_wooi_O)\
**Replies:** 0\
**Last updated:** [November 5, 2007, 7:02am UTC](https://www.ruby-forum.com/t/prototype-toogle-problem/119226 "2007-11-05T07:02:10Z")

</div>

hi, i had a code like this def toggle\_edit\_photo id page.toggle “#{id}\_name”, “#{id}\_edit”, “#{id}\_delete” end the code generate like this : try { \[“23\_name”, “23\_edit”, “23\_delete”\].each(Element.toggle); } catc…

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

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