# Rails

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

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

---

## [Error when running my unit test](https://www.ruby-forum.com/t/error-when-running-my-unit-test/143294)

<div class="topic-metadata">

**Author:** [@joernborup](https://www.ruby-forum.com/u/joernborup)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 1:56am UTC](https://www.ruby-forum.com/t/error-when-running-my-unit-test/143294 "2008-07-17T01:56:15Z")

</div>

Hi Rails team Learning ROR, and is doing the chapter with test… feel like skipping this, but… (using NetBeans IDE 6.1) I have created this story\_test.rb, and when I run the 'rake test:units (selected from the GUI), …

---

## [Select box for multiple models](https://www.ruby-forum.com/t/select-box-for-multiple-models/143290)

<div class="topic-metadata">

**Author:** [@mitkok](https://www.ruby-forum.com/u/mitkok)\
**Replies:** 8\
**Last updated:** [July 17, 2008, 1:39am UTC](https://www.ruby-forum.com/t/select-box-for-multiple-models/143290 "2008-07-17T01:39:04Z")

</div>

Hi, guys. I’m new to Rails and right now I’m trying to write simple test system. The thing is that I don’t know how get data from multiple tables and put the into one select box. Here is my db scheme and what I want t…

---

## [New transactional enterprise e-commerce web site](https://www.ruby-forum.com/t/new-transactional-enterprise-e-commerce-web-site/143291)

<div class="topic-metadata">

**Author:** [@Swordfish](https://www.ruby-forum.com/u/Swordfish)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 1:15am UTC](https://www.ruby-forum.com/t/new-transactional-enterprise-e-commerce-web-site/143291 "2008-07-17T01:15:18Z")

</div>

We are close to releasing a high-volume, multi-lingual, e-commerce site in Ruby on Rails that has previously been written in an alternative Java framework (e.g. servlets and JSP). This is a real-time 24/7 betting and …

---

## [Can't seem to install Rails](https://www.ruby-forum.com/t/cant-seem-to-install-rails/140324)

<div class="topic-metadata">

**Author:** [@daBigNY](https://www.ruby-forum.com/u/daBigNY)\
**Replies:** 25\
**Last updated:** [July 17, 2008, 12:53am UTC](https://www.ruby-forum.com/t/cant-seem-to-install-rails/140324 "2008-07-17T00:53:22Z")

</div>

Hi I was using Instant Rails but it wasn’t working for me so I decided to install Ruby the old fashion way. Everything was going fine until I tried to install Rails. I just keep getting this error “ERROR: could not …

---

## [Sharing ruby code in view layout files](https://www.ruby-forum.com/t/sharing-ruby-code-in-view-layout-files/143281)

<div class="topic-metadata">

**Author:** [@amrita](https://www.ruby-forum.com/u/amrita)\
**Replies:** 3\
**Last updated:** [July 17, 2008, 12:25am UTC](https://www.ruby-forum.com/t/sharing-ruby-code-in-view-layout-files/143281 "2008-07-17T00:25:16Z")

</div>

Hi, I have a block of code that is used by the layout file (html.erb) of every view. What is the best way to include this piece of code in all layout files? Can I actually include a Ruby file in an html.erb file, ana…

---

## [AJAX error messages](https://www.ruby-forum.com/t/ajax-error-messages/143266)

<div class="topic-metadata">

**Author:** [@lancashire](https://www.ruby-forum.com/u/lancashire)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/ajax-error-messages/143266 "2008-07-16T23:25:27Z")

</div>

Hi, a Rails newbie here. I have an AJAX form which, upon submission, updates another part of the page using AJAX (with an .rjs). I would like to catch illegal submissions and display their corresponding error messages…

---

## [Scriptaculous Problem](https://www.ruby-forum.com/t/scriptaculous-problem/143278)

<div class="topic-metadata">

**Author:** [@Joe\_K](https://www.ruby-forum.com/u/Joe_K)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/scriptaculous-problem/143278 "2008-07-16T23:19:01Z")

</div>

Hi All, I am trying to have a div do the slide up effect, then replace an image inside a nested div, then do the slide down effect. Should be straightforward enough, but it looks like the replace\_html action is tryin…

---

## [Simple Captcha for Rails](https://www.ruby-forum.com/t/simple-captcha-for-rails/85990)

<div class="topic-metadata">

**Author:** [@sur](https://www.ruby-forum.com/u/sur)\
**Replies:** 8\
**Last updated:** [July 16, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/simple-captcha-for-rails/85990 "2008-07-16T23:00:48Z")

</div>

check out the simple captcha plugin for rails… http://expressica.com/2007/02/06/simple-captcha-released-the-captcha-for-rails-applications/ it is really simple to implement, just need one line of code in view and one …

---

## [Saving associated models...is there any order to it?](https://www.ruby-forum.com/t/saving-associated-models-is-there-any-order-to-it/143232)

<div class="topic-metadata">

**Author:** [@Ryan\_Frith](https://www.ruby-forum.com/u/Ryan_Frith)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/saving-associated-models-is-there-any-order-to-it/143232 "2008-07-16T22:52:40Z")

</div>

Hi, If I have 2 models defined as such: class ClassA \< ActiveRecord::Base before\_create “class\_b.foo” has\_one :class\_b def foobar puts “foobar” end end ClassB \< ActiveRecord::Base after\_create :bar belongs\_to …

---

## [Get value from a collection\_select](https://www.ruby-forum.com/t/get-value-from-a-collection-select/143276)

<div class="topic-metadata">

**Author:** [@monsterag](https://www.ruby-forum.com/u/monsterag)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/get-value-from-a-collection-select/143276 "2008-07-16T22:23:23Z")

</div>

Hello, how can i get the values of a form that has been filled out but was not sent to the database. i have a collection\_select formfield and i need the selected item to fill an DIV with content specific to the selec…

---

## [Authentication plugins](https://www.ruby-forum.com/t/authentication-plugins/143268)

<div class="topic-metadata">

**Author:** [@CSSSSdric\_H](https://www.ruby-forum.com/u/CSSSSdric_H)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/authentication-plugins/143268 "2008-07-16T22:23:22Z")

</div>

Hi, I’m starting a new project with Rails and I’ve read many things about authentication. Could anyone confirms that the plugin restful authentication ( http://agilewebdevelopment.com/plugins/restful\_authentication )…

---

## [Passenger returns .haml source code](https://www.ruby-forum.com/t/passenger-returns-haml-source-code/143274)

<div class="topic-metadata">

**Author:** [@mawi](https://www.ruby-forum.com/u/mawi)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/passenger-returns-haml-source-code/143274 "2008-07-16T22:13:39Z")

</div>

Hi, I ran into a strange problem when upgrading a app to Rails 2.1, Passenger 2.0.2 and HAML 2.0.1. On the production machine, haml views are not interpreted anymore, but rather the haml source is sent to the browser…

---

## [Calculate Form Field Values with Ajax](https://www.ruby-forum.com/t/calculate-form-field-values-with-ajax/143273)

<div class="topic-metadata">

**Author:** [@adrian](https://www.ruby-forum.com/u/adrian)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/calculate-form-field-values-with-ajax/143273 "2008-07-16T22:01:06Z")

</div>

Hello everybody, I need some help hope can find it here. I have 3 text boxes: value exchange\_range value/exchange\_rate Well I want the 3rd text box to be calculated based on the first 2, with AJAX or maybe Javascrip…

---

## [Time Formating in rails?](https://www.ruby-forum.com/t/time-formating-in-rails/196744)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/time-formating-in-rails/196744 "2008-07-16T22:00:31Z")

</div>

Hello every one I trying to create a drop down menu of time in hours is there a simple way of formatting it to show only the time in hours Thanks for any help Gabriel

---

## [Time Formating in rails?](https://www.ruby-forum.com/t/time-formating-in-rails/143271)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 9:52pm UTC](https://www.ruby-forum.com/t/time-formating-in-rails/143271 "2008-07-16T21:52:16Z")

</div>

Hello every one I trying to create a drop down menu of time in hours is there a simple way of formatting it to show only the time in hours Thanks for any help Gabriel

---

## [Multiple Sets of Documentation?](https://www.ruby-forum.com/t/multiple-sets-of-documentation/143255)

<div class="topic-metadata">

**Author:** [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/multiple-sets-of-documentation/143255 "2008-07-16T20:56:03Z")

</div>

What the heck is going on with all the documentation projects? As far as I can tell, api.rubyonrails.com is the most complete, but very hard to navigate. I just found railsbrain.com, which seems to be a different f…

---

## [Live Search](https://www.ruby-forum.com/t/live-search/143256)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/live-search/143256 "2008-07-16T20:26:46Z")

</div>

if params\['search\_text'\].strip.length \> 0 terms = params\['search\_text'\].split.collect do |word| "^#{word.downcase}" end b=\[\]; terms.to\_s.each\_byte { |byte| (b.push(byte.chr) if !b.includ…

---

## [About sqlite install](https://www.ruby-forum.com/t/about-sqlite-install/140995)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/about-sqlite-install/140995 "2008-07-16T20:24:29Z")

</div>

Hell: I have the rails 2.1 installed and made an app to run it locally.But when inputting the url,the browser show the following errors: Could not find the file: sqlite3.dll This error occurred while loading the foll…

---

## [Conditional javascript](https://www.ruby-forum.com/t/conditional-javascript/143080)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 16\
**Last updated:** [July 16, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/conditional-javascript/143080 "2008-07-16T20:21:50Z")

</div>

onclick="if(this.style.background=’#F9CF00’)this.style.background=’#ffffff’ else this.style.background=’#F9CF00’; How do I implement a conditional if else statement in the onclick? The is white by default, when a us…

---

## [Thickbox, link and close popup](https://www.ruby-forum.com/t/thickbox-link-and-close-popup/143250)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/thickbox-link-and-close-popup/143250 "2008-07-16T19:14:43Z")

</div>

Hello All, just wanted to know if it was possible to specify a parent location in the link\_to tag. Actually I have a link on a thickbox popup and would like to close the popup and redirect to the appropriate page on …

---

## [Simple activerecord relationship question](https://www.ruby-forum.com/t/simple-activerecord-relationship-question/143244)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [July 16, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/simple-activerecord-relationship-question/143244 "2008-07-16T18:52:26Z")

</div>

Hey guys, I have a really simple question about activerecord Lets say I have a Post model which has a has\_many relationship with a comments model. (a post is a blog post with many comments) So, when I execute this @p…

---

## [Functional Test - assert\_raise exception gives headache!](https://www.ruby-forum.com/t/functional-test-assert-raise-exception-gives-headache/143242)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 6:47pm UTC](https://www.ruby-forum.com/t/functional-test-assert-raise-exception-gives-headache/143242 "2008-07-16T18:47:10Z")

</div>

in one of my functional test, I check the followoing : def test\_user\_should\_not\_show\_documents login\_as (:quentin) assert\_raise (Exceptions::SecurityTransgression) { get :show, :id =\> 2, :franchise\_id =\> 3 } end In…

---

## [Contract Ruby on Rails in NYC\`](https://www.ruby-forum.com/t/contract-ruby-on-rails-in-nyc/143245)

<div class="topic-metadata">

**Author:** [@Peter\_Kaza](https://www.ruby-forum.com/u/Peter_Kaza)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/contract-ruby-on-rails-in-nyc/143245 "2008-07-16T18:33:41Z")

</div>

My client is one of the largest media companies in world. They have an exciting opportunity for a RoR Developer – Contract. Multiple Contract Positions Available!!! Midtown location - Fortune 100 firm. Long Term Cont…

---

## [Newbie need help on sqlite3](https://www.ruby-forum.com/t/newbie-need-help-on-sqlite3/143246)

<div class="topic-metadata">

**Author:** [@robertj](https://www.ruby-forum.com/u/robertj)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/newbie-need-help-on-sqlite3/143246 "2008-07-16T18:33:41Z")

</div>

Do anyone have a good link to guide about downloading the sqlite3? I have just newly installed ruby, and i started the server to view the localhost. and it was ok until I open the link application environment where e…

---

## [How to know if a column is present within a certain table](https://www.ruby-forum.com/t/how-to-know-if-a-column-is-present-within-a-certain-table/143235)

<div class="topic-metadata">

**Author:** [@paco.onrails](https://www.ruby-forum.com/u/paco.onrails)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/how-to-know-if-a-column-is-present-within-a-certain-table/143235 "2008-07-16T17:56:13Z")

</div>

Hello there, what I need is a method to find out if a column is present within a table giving me back a boolean value. Something like: Mytable.columnpresent(‘my\_column’) Thank you very much for your help. Best!! Pac…

---

## [Problem with Session ID](https://www.ruby-forum.com/t/problem-with-session-id/143239)

<div class="topic-metadata">

**Author:** [@LAB](https://www.ruby-forum.com/u/LAB)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/problem-with-session-id/143239 "2008-07-16T17:53:16Z")

</div>

I am using the acts\_as\_authenticated plugin. When a user is activated, self.current\_user = @user, (I hesitate to say “logged\_in”, because that is a different action in the account controller), and are able to click a…

---

## [Models and creating a scaffold under another controller](https://www.ruby-forum.com/t/models-and-creating-a-scaffold-under-another-controller/143228)

<div class="topic-metadata">

**Author:** [@Nicolas\_K](https://www.ruby-forum.com/u/Nicolas_K)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/models-and-creating-a-scaffold-under-another-controller/143228 "2008-07-16T17:46:49Z")

</div>

Hi, I’m trying to create a controller and model called Articles (yet another blogging system :slight\_smile: ) and put it under a controller called admin. I used the following command to do it: script/generate scaffol…

---

## [Pasar un valor de Javascript a Ruby](https://www.ruby-forum.com/t/pasar-un-valor-de-javascript-a-ruby/143048)

<div class="topic-metadata">

**Author:** [@lexor](https://www.ruby-forum.com/u/lexor)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/pasar-un-valor-de-javascript-a-ruby/143048 "2008-07-16T17:32:41Z")

</div>

Hola Tengo una tabla en la cual tengo la funcion onClick para cambiar el color de la fila cuando se haga click (evidente no??). El hecho es que quiero guardar el valor de la linea para luego en Ruby detectar cual es …

---

## [Constructor in model](https://www.ruby-forum.com/t/constructor-in-model/143221)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/constructor-in-model/143221 "2008-07-16T17:24:53Z")

</div>

Hi all, I have an activation model that when constructed should set the key (column in the activations table) to test. class Activation \< ActiveRecord::Base belongs\_to :user def initialize this.key = “test” end e…

---

## [A copy of AuthenticatedSystem has been removed from the module tree but is still active!](https://www.ruby-forum.com/t/a-copy-of-authenticatedsystem-has-been-removed-from-the-module-tree-but-is-still-active/143230)

<div class="topic-metadata">

**Author:** [@jordelver](https://www.ruby-forum.com/u/jordelver)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/a-copy-of-authenticatedsystem-has-been-removed-from-the-module-tree-but-is-still-active/143230 "2008-07-16T16:35:58Z")

</div>

Hmm, this is a weird one. I just started up script/server today to get this error when browsing around. “A copy of AuthenticatedSystem has been removed from the module tree but is still active!” Any ideas? I’ve googl…

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

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