# Rails

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

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

---

## [A global login form that works from ANY page](https://www.ruby-forum.com/t/a-global-login-form-that-works-from-any-page/120462)

<div class="topic-metadata">

**Author:** [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/a-global-login-form-that-works-from-any-page/120462 "2007-11-17T22:20:23Z")

</div>

Hello, I seem to be having a very hard time creating a login form that would sit in the sidebar or header of a website which can be used to login from ANY page. The problem is that the login form needs to be somehow …

---

## [\[ANN\] Substruct 0.95 RELEASED - E-commerce, CMS engine, etc](https://www.ruby-forum.com/t/ann-substruct-0-95-released-e-commerce-cms-engine-etc/120520)

<div class="topic-metadata">

**Author:** [@subimage](https://www.ruby-forum.com/u/subimage)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 10:15pm UTC](https://www.ruby-forum.com/t/ann-substruct-0-95-released-e-commerce-cms-engine-etc/120520 "2007-11-17T22:15:42Z")

</div>

I’ve just finished tagging a new release of Substruct, the open-source Ruby on Rails e-commerce and cms engine. For the particulars, visit: http://sublog.subimage.com/articles/2007/11/17/substruct-0-95 There are ton…

---

## [Need to give unique names to indexes in sqlite3](https://www.ruby-forum.com/t/need-to-give-unique-names-to-indexes-in-sqlite3/120518)

<div class="topic-metadata">

**Author:** [@jfrankov](https://www.ruby-forum.com/u/jfrankov)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/need-to-give-unique-names-to-indexes-in-sqlite3/120518 "2007-11-17T21:58:10Z")

</div>

I’m trying to use sqlite3 as my testing engine for cruisecontrol (I’m using Geoffrey Grossenbach’s memory-test-fix plugin for this). When CC tries to build the schema in sqlite3, this occurs: \[snip\] – add\_index(“even…

---

## [Help with associations](https://www.ruby-forum.com/t/help-with-associations/120475)

<div class="topic-metadata">

**Author:** [@Hoolio](https://www.ruby-forum.com/u/Hoolio)\
**Replies:** 4\
**Last updated:** [November 17, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/help-with-associations/120475 "2007-11-17T20:13:25Z")

</div>

I’m new to RoR and databases in general. Here is my problem. I have “Lists” and “Items”. Instead of using a join table and a habtm relationship, I created a third model so I can hold additional data in it. It’s cal…

---

## [Using helpers in controllers](https://www.ruby-forum.com/t/using-helpers-in-controllers/120409)

<div class="topic-metadata">

**Author:** [@jordelver](https://www.ruby-forum.com/u/jordelver)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/using-helpers-in-controllers/120409 "2007-11-17T19:29:26Z")

</div>

Hi, What’s the recommended method of accessing helper methods from controllers? For example, if I wanted to use the pluralize method from ActionView::Helpers::TextHelper in one of my controllers for flash messages, …

---

## [REST: nested resources and attributes as resources](https://www.ruby-forum.com/t/rest-nested-resources-and-attributes-as-resources/120306)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 13\
**Last updated:** [November 17, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/rest-nested-resources-and-attributes-as-resources/120306 "2007-11-17T19:13:39Z")

</div>

Hi you all, After reading the manual from b-simple\[1\], I have two doubts: 1: I have a Project, which may has cero or more Iterations, so I have map.resources :projects do |projects| projects.resources :iterations e…

---

## [Bug: Calling visual\_effect within helper](https://www.ruby-forum.com/t/bug-calling-visual-effect-within-helper/120511)

<div class="topic-metadata">

**Author:** [@cujigar](https://www.ruby-forum.com/u/cujigar)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 6:58pm UTC](https://www.ruby-forum.com/t/bug-calling-visual-effect-within-helper/120511 "2007-11-17T18:58:09Z")

</div>

This post is slightly long, please bear up with me. The problem is little twisted. I am quoting from the docs:- http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethod…

---

## [Prototype Helper Method Name Clash](https://www.ruby-forum.com/t/prototype-helper-method-name-clash/115567)

<div class="topic-metadata">

**Author:** [@jrm](https://www.ruby-forum.com/u/jrm)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 6:32pm UTC](https://www.ruby-forum.com/t/prototype-helper-method-name-clash/115567 "2007-11-17T18:32:47Z")

</div>

Hi, I am using Open Flash Charts (http://teethgrinder.co.uk/open-flash- chart/) in a rails project. Once the flash movie is loaded the dom element of the movie supports a javascript function called “reload” to allow …

---

## [Respond\_to with MIME type wildcards?](https://www.ruby-forum.com/t/respond-to-with-mime-type-wildcards/120509)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 6:25pm UTC](https://www.ruby-forum.com/t/respond-to-with-mime-type-wildcards/120509 "2007-11-17T18:25:05Z")

</div>

I’d like to respond to requests for all kinds of image MIME types from a single respond\_to. In particular, I don’t want to register MIME types for each image format, I’d rather define only one with a wildcard, like th…

---

## [Strange error with script/console](https://www.ruby-forum.com/t/strange-error-with-script-console/120504)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/strange-error-with-script-console/120504 "2007-11-17T17:44:07Z")

</div>

Hello, I get this: $ ./script/console Loading development environment. /usr/local/lib/ruby/1.8/irb/completion.rb:10:in \`require’: no such file to load – readline (LoadError) … found a LOT of solutions via google, …

---

## [Layout not being applied](https://www.ruby-forum.com/t/layout-not-being-applied/120503)

<div class="topic-metadata">

**Author:** [@mattclarkson](https://www.ruby-forum.com/u/mattclarkson)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/layout-not-being-applied/120503 "2007-11-17T17:40:31Z")

</div>

I have a To-Do list app with this controller class TodosController \< ApplicationController layout “todos” “todos.rhtml” is the standard one generated by scaffold, but what is rendered is inside the layout/site.rhtml …

---

## [Instant Ruby Error](https://www.ruby-forum.com/t/instant-ruby-error/120500)

<div class="topic-metadata">

**Author:** [@rikiki](https://www.ruby-forum.com/u/rikiki)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/instant-ruby-error/120500 "2007-11-17T17:14:50Z")

</div>

I’m a newbie on this so I set up everything in the tutorial and Apache n MySQL started but when I tried to run the cookbook some error happened, the 1st few lines is: Mysql::Error in RecipeController#list Access deni…

---

## [Dynamic fields in forms](https://www.ruby-forum.com/t/dynamic-fields-in-forms/120501)

<div class="topic-metadata">

**Author:** [@alexmic](https://www.ruby-forum.com/u/alexmic)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/dynamic-fields-in-forms/120501 "2007-11-17T17:09:56Z")

</div>

Hi all. I am developing a rails app, more or less a car database. The interresting part of the model is this : Country (has\_many) \<-\> (belongs\_to) Car maker (has\_many) \<-\> (belongs\_to) model etc. But some categories …

---

## [Model relationship problem](https://www.ruby-forum.com/t/model-relationship-problem/120484)

<div class="topic-metadata">

**Author:** [@Piotr\_N](https://www.ruby-forum.com/u/Piotr_N)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 4:43pm UTC](https://www.ruby-forum.com/t/model-relationship-problem/120484 "2007-11-17T16:43:35Z")

</div>

Hi, how do i do a relation for my users table ? The problem is following: im building community site, where are users. every user can have a friend which is user too. so i created migration which adds to my users ta…

---

## [ActionMailer 501: sender address must contain a domain](https://www.ruby-forum.com/t/actionmailer-501-sender-address-must-contain-a-domain/120485)

<div class="topic-metadata">

**Author:** [@serkan](https://www.ruby-forum.com/u/serkan)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/actionmailer-501-sender-address-must-contain-a-domain/120485 "2007-11-17T15:35:58Z")

</div>

Hi there guys! Im copying an email example from “Agile web development with rails”, but i keep getting a “501: sender address must contain a domain” error. Heres my code in my enviroment.rb. Real values replaced with …

---

## [Route Information](https://www.ruby-forum.com/t/route-information/120427)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [November 17, 2007, 3:22pm UTC](https://www.ruby-forum.com/t/route-information/120427 "2007-11-17T15:22:52Z")

</div>

Is there a method to return a hash of the route configuration based on a path? For example: magic\_method(’/my\_controller/my\_action/my\_id’) =\> {:controller =\> ‘my\_controller’, :action =\> ‘my\_action’, :id =\> ‘my\_id’} …

---

## [Beginning a statistics application](https://www.ruby-forum.com/t/beginning-a-statistics-application/101242)

<div class="topic-metadata">

**Author:** [@chrisfinne](https://www.ruby-forum.com/u/chrisfinne)\
**Replies:** 8\
**Last updated:** [November 17, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/beginning-a-statistics-application/101242 "2007-11-17T15:15:41Z")

</div>

Hi all, I need to write an application that gets data from a database and plots it on a graph. I am familiar with java and know that I could do it with jfreechart - however I am excited by RoR and would like to write…

---

## [Ruby Newbie,Help on String.gsub()](https://www.ruby-forum.com/t/ruby-newbie-help-on-string-gsub/120488)

<div class="topic-metadata">

**Author:** [@jagan](https://www.ruby-forum.com/u/jagan)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/ruby-newbie-help-on-string-gsub/120488 "2007-11-17T15:11:33Z")

</div>

Hello All, May be my question is too easy ,but here is my problem. I have a certain string which contains “” forward slash charachter .I want to replace in my whole string the char “” with “/” . I tried a lot but…

---

## [\[OT\] Android programming](https://www.ruby-forum.com/t/ot-android-programming/120489)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 3:02pm UTC](https://www.ruby-forum.com/t/ot-android-programming/120489 "2007-11-17T15:02:10Z")

</div>

Have you seen the kind of calls you do for this hello world program in Android? A first hand look at building an Android application A first hand look at building an Android application - YouTube Look at those getCo…

---

## [How to host Ruby on Rails app on shared hosting?](https://www.ruby-forum.com/t/how-to-host-ruby-on-rails-app-on-shared-hosting/120471)

<div class="topic-metadata">

**Author:** [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Replies:** 4\
**Last updated:** [November 17, 2007, 12:48pm UTC](https://www.ruby-forum.com/t/how-to-host-ruby-on-rails-app-on-shared-hosting/120471 "2007-11-17T12:48:44Z")

</div>

Hi, Can anyone explain me how do we deploy ruby on rails on shared hosting? I have freeze the rails gems version in app/vendor. Any help would be greatly appreciated. Thanks, Ruchita.

---

## [Adding a class to a generated input field](https://www.ruby-forum.com/t/adding-a-class-to-a-generated-input-field/120472)

<div class="topic-metadata">

**Author:** [@steveoco](https://www.ruby-forum.com/u/steveoco)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 12:36pm UTC](https://www.ruby-forum.com/t/adding-a-class-to-a-generated-input-field/120472 "2007-11-17T12:36:27Z")

</div>

Whne creating a field using for example: \<%= text\_field\_tag :name, params\[:name\] %\> You get: I would like to add a class to that input so that it looks like this: How do I add a class to a generated input? (I want…

---

## [Nested resources: controllers and form input names](https://www.ruby-forum.com/t/nested-resources-controllers-and-form-input-names/120480)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 12:14pm UTC](https://www.ruby-forum.com/t/nested-resources-controllers-and-form-input-names/120480 "2007-11-17T12:14:09Z")

</div>

Let’s say I have a model class like this class Parent \< ActiveRecord::Base has\_many :things has\_one :special\_thing, :classname =\> ‘Thing’, … end and I want the associations to be handled by UserThingsController and …

---

## [Problem with open\_id\_authentication\_plugin and PostgreSQL 8.2](https://www.ruby-forum.com/t/problem-with-open-id-authentication-plugin-and-postgresql-8-2/120479)

<div class="topic-metadata">

**Author:** [@Nicola\_Piccinini](https://www.ruby-forum.com/u/Nicola_Piccinini)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/problem-with-open-id-authentication-plugin-and-postgresql-8-2/120479 "2007-11-17T12:07:41Z")

</div>

I’m using open\_id\_authentication\_plugin ( http://svn.rubyonrails.org/rails/plugins/open\_id\_authentication @ 7263 ) and it works perfectly with MySQL. If I switch to PostgreSQL 8.2 (on debian lenny) with a database w…

---

## [Accessing ancester method is fine but asking for child templ](https://www.ruby-forum.com/t/accessing-ancester-method-is-fine-but-asking-for-child-templ/120470)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 8:37am UTC](https://www.ruby-forum.com/t/accessing-ancester-method-is-fine-but-asking-for-child-templ/120470 "2007-11-17T08:37:46Z")

</div>

Hello, I have a strange situation where I'm making a dummy class that inherits from a parent class. it calls the parent method fine but is asking for the child class to provide a view template. I’m creating the du…

---

## [Going live--which mongrel version?](https://www.ruby-forum.com/t/going-live-which-mongrel-version/120423)

<div class="topic-metadata">

**Author:** [@student](https://www.ruby-forum.com/u/student)\
**Replies:** 1\
**Last updated:** [November 17, 2007, 8:28am UTC](https://www.ruby-forum.com/t/going-live-which-mongrel-version/120423 "2007-11-17T08:28:52Z")

</div>

It looks like mongrel has diversified since the book came out. There are now both java & ruby versions of mogrel available. I expect that I want ruby. Is this correct?

---

## [Acts\_as\_conference Orlando, registration is open!](https://www.ruby-forum.com/t/acts-as-conference-orlando-registration-is-open/120464)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 6:02am UTC](https://www.ruby-forum.com/t/acts-as-conference-orlando-registration-is-open/120464 "2007-11-17T06:02:37Z")

</div>

We are happy to announce our charity session, all of our speakers, and the opening of registration for acts\_as\_conference (http:// actsasconference.com). February is HOT for conferences here in Orlando so once you reg…

---

## [Best way to close unclosed tags in user input?](https://www.ruby-forum.com/t/best-way-to-close-unclosed-tags-in-user-input/120449)

<div class="topic-metadata">

**Author:** [@skaufman](https://www.ruby-forum.com/u/skaufman)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 4:09am UTC](https://www.ruby-forum.com/t/best-way-to-close-unclosed-tags-in-user-input/120449 "2007-11-17T04:09:21Z")

</div>

This seems like such a common situation that I can’t believe I haven’t found an easy recipe. What is the best way to close an unclosed tag in user-submitted input? It doesn’t appear that HPricot has a built-in method …

---

## [Letters with accent marks](https://www.ruby-forum.com/t/letters-with-accent-marks/120455)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 3:16am UTC](https://www.ruby-forum.com/t/letters-with-accent-marks/120455 "2007-11-17T03:16:40Z")

</div>

Any ideas? I have a textBox that users will be entering data into and most likely they will not bother to write the accent marks over the correct letters. When performing the search I need a way to look at the words i…

---

## [Pagination](https://www.ruby-forum.com/t/pagination/120453)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [November 17, 2007, 2:44am UTC](https://www.ruby-forum.com/t/pagination/120453 "2007-11-17T02:44:58Z")

</div>

I know the pagination helper is on one of the top ten donts in ruby and its not working for me anyways. I found a plugin called will\_paginate but it keeps timing out before it completely downloads, i dont know if the…

---

## [Rake errors](https://www.ruby-forum.com/t/rake-errors/120457)

<div class="topic-metadata">

**Author:** [@magic\_hat](https://www.ruby-forum.com/u/magic_hat)\
**Replies:** 0\
**Last updated:** [November 17, 2007, 2:17am UTC](https://www.ruby-forum.com/t/rake-errors/120457 "2007-11-17T02:17:56Z")

</div>

Folks, I have a rake task that runs via cron and calls a controller action. I was getting the ‘config/boot.rb:28:Warning: require\_gem is obsolete’ warning, so I ran rake update:rails. Now I’m getting a whole bunch of …

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

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