# Rails

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

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

---

## [Allow\_blank in older version of Rails](https://www.ruby-forum.com/t/allow-blank-in-older-version-of-rails/132375)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 9\
**Last updated:** [March 22, 2008, 9:37pm UTC](https://www.ruby-forum.com/t/allow-blank-in-older-version-of-rails/132375 "2008-03-22T21:37:18Z")

</div>

Hi, Our hosting company is using RoR 1.2.3. This version does not seem to support the “allow\_blank =\> true” validation rule. I have two questions … Is it possible to combine other validation rules to simulate “a…

---

## [Requiring files that subclass AR models](https://www.ruby-forum.com/t/requiring-files-that-subclass-ar-models/132627)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 2\
**Last updated:** [March 22, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/requiring-files-that-subclass-ar-models/132627 "2008-03-22T21:22:43Z")

</div>

What was the intended way to include files that extend AR models? For example, I have a class called UserAction \< ActiveRecord::Base end I would like to include test.rb file in environment.rb that subclasses UserAct…

---

## [Failure cases for assignment of binary string to AR model](https://www.ruby-forum.com/t/failure-cases-for-assignment-of-binary-string-to-ar-model/132659)

<div class="topic-metadata">

**Author:** [@Matt\_Olson](https://www.ruby-forum.com/u/Matt_Olson)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/failure-cases-for-assignment-of-binary-string-to-ar-model/132659 "2008-03-22T20:48:35Z")

</div>

I’ve run into a strange bug that I need some help with. I have a model with a binary column. I’m using Postgres 8.2.4 on the backend. For the majority of cases, I’m able to store and retrieve binary content using this…

---

## [Naming Error: "uninitialized constant ActionRecord"](https://www.ruby-forum.com/t/naming-error-uninitialized-constant-actionrecord/132660)

<div class="topic-metadata">

**Author:** [@ocelotspot](https://www.ruby-forum.com/u/ocelotspot)\
**Replies:** 2\
**Last updated:** [March 22, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/naming-error-uninitialized-constant-actionrecord/132660 "2008-03-22T20:48:03Z")

</div>

I’m using Rails 2.0.2 with Ruby 1.8.6 on Mac OSX Leopard. I’m trying to follow the instructions in “Ruby for Rails” by David A. Black but I’m getting an error when I attempt to display one of the views. I know the boo…

---

## [How can I compare datetimes?](https://www.ruby-forum.com/t/how-can-i-compare-datetimes/132583)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 8:39pm UTC](https://www.ruby-forum.com/t/how-can-i-compare-datetimes/132583 "2008-03-22T20:39:56Z")

</div>

I want to generate pdfs from my database, from tickets. This pdfs are meant to be generated and saved every Friday at an specific hour. How can I do that?

---

## [Not able to run gem install sqlite3-ruby (help needed)](https://www.ruby-forum.com/t/not-able-to-run-gem-install-sqlite3-ruby-help-needed/132661)

<div class="topic-metadata">

**Author:** [@vijay](https://www.ruby-forum.com/u/vijay)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/not-able-to-run-gem-install-sqlite3-ruby-help-needed/132661 "2008-03-22T20:31:49Z")

</div>

when i run gem install sqlite3-ruby i get the following error C:\>gem install sqlite3-ruby Select which gem to install for your platform (i386-mswin32) sqlite3-ruby 1.2.1 (mswin32) sqlite3-ruby 1.2.1 (ruby) sqlite3-ru…

---

## [How can I schedule an action?](https://www.ruby-forum.com/t/how-can-i-schedule-an-action/132618)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 4\
**Last updated:** [March 22, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/how-can-i-schedule-an-action/132618 "2008-03-22T18:43:31Z")

</div>

I have a background code with backgroundfu: Simple, non-monitored worker. class ReportWorker def add() Report.generate\_rep() end end I want this code only to run on Fridays and only to run one time every Friday. H…

---

## [Define classes for use in views](https://www.ruby-forum.com/t/define-classes-for-use-in-views/132634)

<div class="topic-metadata">

**Author:** [@apramanik](https://www.ruby-forum.com/u/apramanik)\
**Replies:** 6\
**Last updated:** [March 22, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/define-classes-for-use-in-views/132634 "2008-03-22T17:30:36Z")

</div>

Hi all, I want to define some simple classes that can be created and passed around in views. I’m currently using hashes, but I want to use a class so I can assign default values. Is this possible? Where would I define …

---

## [Memcached vs. activerecord](https://www.ruby-forum.com/t/memcached-vs-activerecord/132620)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 3\
**Last updated:** [March 22, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/memcached-vs-activerecord/132620 "2008-03-22T16:01:41Z")

</div>

I know I’m inviting the full wrath of a lot of purists but I thought I’d ask anyway. Is there a way to store a model (activerecord based one) straight into memcached and skip the database all together? Basically I’d …

---

## [How to use Coookies](https://www.ruby-forum.com/t/how-to-use-coookies/132650)

<div class="topic-metadata">

**Author:** [@FunFun](https://www.ruby-forum.com/u/FunFun)\
**Replies:** 0\
**Last updated:** [March 22, 2008, 3:40pm UTC](https://www.ruby-forum.com/t/how-to-use-coookies/132650 "2008-03-22T15:40:36Z")

</div>

When i used authenticate by session in view i used this code \<% if @user.id != session\[:id\]%\> \<%= link\_to ‘ïÔÐÒÁ×ÉÔØ óÏÏÂÝÅÎÉÅ’, :controller =\> ‘users’, :action =\> ‘messages’, :id =\> @user, :anchor =\> ‘send\_messa…

---

## [Why does 2.0 scaffold no longer specify a model?](https://www.ruby-forum.com/t/why-does-2-0-scaffold-no-longer-specify-a-model/132648)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/why-does-2-0-scaffold-no-longer-specify-a-model/132648 "2008-03-22T15:29:44Z")

</div>

I am curious why the new scaffold generator doesn’t include a parameter for the model. As my friend Google and I have looked around, we’ve found all sorts of pages claiming that 2.0 breaks all the old tutorials becau…

---

## [Anybody get RSpec working with Netbeans?](https://www.ruby-forum.com/t/anybody-get-rspec-working-with-netbeans/131534)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 5\
**Last updated:** [March 22, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/anybody-get-rspec-working-with-netbeans/131534 "2008-03-22T15:17:56Z")

</div>

Hi, Has anyone got RSpec working with NetBeans? I am running Leopard and I don’t manage my gems with Netbeans. Do I have to manage the gems inside NetBeans in order to get it working? Ron P.S. Sorry if this is a b…

---

## [Sign In robot protection](https://www.ruby-forum.com/t/sign-in-robot-protection/132641)

<div class="topic-metadata">

**Author:** [@FunFun](https://www.ruby-forum.com/u/FunFun)\
**Replies:** 2\
**Last updated:** [March 22, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/sign-in-robot-protection/132641 "2008-03-22T14:45:24Z")

</div>

Sign In robot protection mean when you must write letter from image I am looking for a articles about this subject. Need assistance. I’m sorry for my english

---

## [Preventing Javascript but allowing HTML?](https://www.ruby-forum.com/t/preventing-javascript-but-allowing-html/132622)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 2:22pm UTC](https://www.ruby-forum.com/t/preventing-javascript-but-allowing-html/132622 "2008-03-22T14:22:51Z")

</div>

Is there a way I can take away Javascript from a user input but let them use HTML? Or rather, is there a built in function that just takes away and leaves all the other tags in tact or would I have to make one myself…

---

## [How can I check if a file has been created?](https://www.ruby-forum.com/t/how-can-i-check-if-a-file-has-been-created/132645)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/how-can-i-check-if-a-file-has-been-created/132645 "2008-03-22T14:08:31Z")

</div>

I want to check if a pdf file has been created. How can I do that?

---

## [Two Rails versions on the same computer?](https://www.ruby-forum.com/t/two-rails-versions-on-the-same-computer/132621)

<div class="topic-metadata">

**Author:** [@Barry\_B](https://www.ruby-forum.com/u/Barry_B)\
**Replies:** 5\
**Last updated:** [March 22, 2008, 12:47pm UTC](https://www.ruby-forum.com/t/two-rails-versions-on-the-same-computer/132621 "2008-03-22T12:47:19Z")

</div>

Can I install two different Rails versions on the same computer (without using a virtual machine)? I want to switch back and forth easily between Rails 1.2.3 and Rails 2.0.2. I assume that if I try to gem-install a se…

---

## [Contact Grabber](https://www.ruby-forum.com/t/contact-grabber/132353)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 2\
**Last updated:** [March 22, 2008, 11:43am UTC](https://www.ruby-forum.com/t/contact-grabber/132353 "2008-03-22T11:43:40Z")

</div>

Can anyone give me the working example of contact grabbers in rails.

---

## [Has\_and\_belongs\_to\_many DRY?](https://www.ruby-forum.com/t/has-and-belongs-to-many-dry/132636)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 10:51am UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-dry/132636 "2008-03-22T10:51:42Z")

</div>

Hi, I have many “has\_and\_belongs\_to\_many” that looks nearly the same, I wonder if I can do anything so I DRY myself? maybe write a plugin? What do you think? The lines look like this. has\_and\_belongs\_to\_many :snippe…

---

## [Add text string to a database field when a button is pressed](https://www.ruby-forum.com/t/add-text-string-to-a-database-field-when-a-button-is-pressed/132576)

<div class="topic-metadata">

**Author:** [@technomancy](https://www.ruby-forum.com/u/technomancy)\
**Replies:** 3\
**Last updated:** [March 22, 2008, 10:48am UTC](https://www.ruby-forum.com/t/add-text-string-to-a-database-field-when-a-button-is-pressed/132576 "2008-03-22T10:48:54Z")

</div>

Hello I am new to ruby and rails (using rails 2). Can some body please help with the following - I have a form with a database text field and a series of buttons when a button is pressed i need a specific string with …

---

## [Urgent: How to install curb?](https://www.ruby-forum.com/t/urgent-how-to-install-curb/132638)

<div class="topic-metadata">

**Author:** [@mickeyckm](https://www.ruby-forum.com/u/mickeyckm)\
**Replies:** 0\
**Last updated:** [March 22, 2008, 10:34am UTC](https://www.ruby-forum.com/t/urgent-how-to-install-curb/132638 "2008-03-22T10:34:37Z")

</div>

Hi Can anyone guide me on how to install Curb on Windows? I can’t seems to get it right. How do I install the curllib and set it up with curb. Your help is very much appreciated. It’s urgent for my project. Hope to h…

---

## [Change session variable and reload page](https://www.ruby-forum.com/t/change-session-variable-and-reload-page/132607)

<div class="topic-metadata">

**Author:** [@Abel](https://www.ruby-forum.com/u/Abel)\
**Replies:** 2\
**Last updated:** [March 22, 2008, 10:34am UTC](https://www.ruby-forum.com/t/change-session-variable-and-reload-page/132607 "2008-03-22T10:34:01Z")

</div>

This is my first post and I’m sure the question is noobish but I swear I’ve googled intensively and couldn’t find a smart solution to my problem: I’m developing a webapp in wich you will be able to set the language o…

---

## [Sqilte3 test-case issue](https://www.ruby-forum.com/t/sqilte3-test-case-issue/127448)

<div class="topic-metadata">

**Author:** [@myst\_tt](https://www.ruby-forum.com/u/myst_tt)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 9:25am UTC](https://www.ruby-forum.com/t/sqilte3-test-case-issue/127448 "2008-03-22T09:25:57Z")

</div>

Hi, there: My environment: rails 2.02, sqlite3, ruby 1.8.6 I am stucked at my first test-case running. Everything about database works fine in development environment. however, I ran “rake db:test:prepare” and then…

---

## [Take information from one controller and have it post on another](https://www.ruby-forum.com/t/take-information-from-one-controller-and-have-it-post-on-another/132616)

<div class="topic-metadata">

**Author:** [@Lifespent](https://www.ruby-forum.com/u/Lifespent)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 9:19am UTC](https://www.ruby-forum.com/t/take-information-from-one-controller-and-have-it-post-on-another/132616 "2008-03-22T09:19:31Z")

</div>

I am trying to have \<%= link\_to event.title, :action =\> ‘show’, :id =\> event %\> show up on my application.html.erb to show the title of events that are coming up. When I view /events I can see the output but when I mo…

---

## [List of changes from 1.2 vs 2.0.x?](https://www.ruby-forum.com/t/list-of-changes-from-1-2-vs-2-0-x/132630)

<div class="topic-metadata">

**Author:** [@ReK2](https://www.ruby-forum.com/u/ReK2)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 9:18am UTC](https://www.ruby-forum.com/t/list-of-changes-from-1-2-vs-2-0-x/132630 "2008-03-22T09:18:41Z")

</div>

Hi I bought a book and is all based on 1.2 is there a site were in detail will tell me something like: old method ----------- \> new method? so far I just found sites talking about the new things etc but none are n…

---

## [Checking plugin](https://www.ruby-forum.com/t/checking-plugin/132625)

<div class="topic-metadata">

**Author:** [@ben\_wiseley](https://www.ruby-forum.com/u/ben_wiseley)\
**Replies:** 1\
**Last updated:** [March 22, 2008, 9:05am UTC](https://www.ruby-forum.com/t/checking-plugin/132625 "2008-03-22T09:05:48Z")

</div>

Using Rails 2.0.2 and Engines 2.0.0-RC1 I’m getting some strange results. I followed the read and put this in environment.rb require File.join(File.dirname(FILE), ‘boot’) require File.join(File.dirname(FILE), ‘…/ve…

---

## [Custom URLs in Rails](https://www.ruby-forum.com/t/custom-urls-in-rails/132550)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [March 22, 2008, 8:45am UTC](https://www.ruby-forum.com/t/custom-urls-in-rails/132550 "2008-03-22T08:45:13Z")

</div>

like for example virb.com/yourURLHere, how is this accomplished… I’ve been searching for a bit but I haven’t found a solution. Thanks

---

## [Routes.rb error - messes up view - rails 2.0](https://www.ruby-forum.com/t/routes-rb-error-messes-up-view-rails-2-0/125879)

<div class="topic-metadata">

**Author:** [@harpoon45](https://www.ruby-forum.com/u/harpoon45)\
**Replies:** 2\
**Last updated:** [March 22, 2008, 6:33am UTC](https://www.ruby-forum.com/t/routes-rb-error-messes-up-view-rails-2-0/125879 "2008-03-22T06:33:12Z")

</div>

I have a simple RoR project where I have a table (Story) with stories and links. I added a 3rd param in another table (permalink) and linked it. Now I want to access the records from Story using the permalink In the …

---

## [Installation Problem](https://www.ruby-forum.com/t/installation-problem/54351)

<div class="topic-metadata">

**Author:** [@guest](https://www.ruby-forum.com/u/guest)\
**Replies:** 7\
**Last updated:** [March 22, 2008, 4:48am UTC](https://www.ruby-forum.com/t/installation-problem/54351 "2008-03-22T04:48:21Z")

</div>

I need to install rails on my system for a class project. I have ruby 1.8.2-14 installed and am entering at the command prompt \>gem install rails --remote According to Curt H. installation, I should get a series of q…

---

## [Query help](https://www.ruby-forum.com/t/query-help/132611)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 7\
**Last updated:** [March 22, 2008, 3:16am UTC](https://www.ruby-forum.com/t/query-help/132611 "2008-03-22T03:16:34Z")

</div>

Him I’m building a kind of auction application except instead of buying and selling items, users can swap them with each other. I am struggling with the syntax for the queries. I have tables for items, auctions, bids…

---

## [Partial templates question](https://www.ruby-forum.com/t/partial-templates-question/132592)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 3\
**Last updated:** [March 22, 2008, 1:40am UTC](https://www.ruby-forum.com/t/partial-templates-question/132592 "2008-03-22T01:40:48Z")

</div>

hi, i have a question about partial templates. there is a table - Topics, it has one field - Title. there is a text\_field form with button, and a partial template under the form. they are in the same template. the par…

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

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