# Rails

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

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

---

## [Basic Authentication](https://www.ruby-forum.com/t/basic-authentication/105445)

<div class="topic-metadata">

**Author:** [@david\_salisbury](https://www.ruby-forum.com/u/david_salisbury)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/basic-authentication/105445 "2007-06-01T15:10:09Z")

</div>

I’m trying to blend an old ( and I mean old :slight\_smile: legacy system with a new rails side. The old system used basic authentication, and in attempting to create a seamless integration between the two, rails will …

---

## [New Rails/Flex blog](https://www.ruby-forum.com/t/new-rails-flex-blog/105343)

<div class="topic-metadata">

**Author:** [@surplustronics](https://www.ruby-forum.com/u/surplustronics)\
**Replies:** 5\
**Last updated:** [June 1, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/new-rails-flex-blog/105343 "2007-06-01T15:09:01Z")

</div>

Hi Guys n Gals… I’ve finally got round to putting up a blog, my way of giving back to the community. I’m going to cover stuff to with Flex and Rails, and some tidbits on syncing a huge legacy Filemaker (?!) database …

---

## [Join Relationship Model question](https://www.ruby-forum.com/t/join-relationship-model-question/105613)

<div class="topic-metadata">

**Author:** [@visaolive](https://www.ruby-forum.com/u/visaolive)\
**Replies:** 2\
**Last updated:** [June 1, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/join-relationship-model-question/105613 "2007-06-01T14:45:59Z")

</div>

Hi! I’m modeling my application and i have a question about relationships: I have 3 classes (tables): User (users), Company (companies) and Rol (rols) The relationship between the 3 classes is another table that has: …

---

## [Number input field (stuck with whitespaces)](https://www.ruby-forum.com/t/number-input-field-stuck-with-whitespaces/105676)

<div class="topic-metadata">

**Author:** [@Dusan](https://www.ruby-forum.com/u/Dusan)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 2:23pm UTC](https://www.ruby-forum.com/t/number-input-field-stuck-with-whitespaces/105676 "2007-06-01T14:23:56Z")

</div>

All, I am RoR newbee, so maybe this is stupid question, but I can’t figure it out. I have a form from which I want to get some numbers. But if user has typed a number with whitespaces in it, I am getting only the fir…

---

## [Is it possible to check on extension and delete a file?](https://www.ruby-forum.com/t/is-it-possible-to-check-on-extension-and-delete-a-file/83628)

<div class="topic-metadata">

**Author:** [@arkie](https://www.ruby-forum.com/u/arkie)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 2:22pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-check-on-extension-and-delete-a-file/83628 "2007-06-01T14:22:57Z")

</div>

Hi, I have been struggling to write a ruby script that can detect if a file with a certain extension exists and to delete that file. I have this: require ‘find’ total\_size = 0 Find.find(ENV\[“HOME”\]) do |path| if F…

---

## [How to use my model with conditions](https://www.ruby-forum.com/t/how-to-use-my-model-with-conditions/105592)

<div class="topic-metadata">

**Author:** [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Replies:** 6\
**Last updated:** [June 1, 2007, 2:15pm UTC](https://www.ruby-forum.com/t/how-to-use-my-model-with-conditions/105592 "2007-06-01T14:15:55Z")

</div>

Hello, I am trying to do a custom select for one of my models and I can’t seem to get it to work. The thing is, I have a controller named Client and a controller named M, with this controller, I want to list all the n…

---

## [What are some rails app signs to step up your hosting plan?](https://www.ruby-forum.com/t/what-are-some-rails-app-signs-to-step-up-your-hosting-plan/105692)

<div class="topic-metadata">

**Author:** [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Replies:** 0\
**Last updated:** [June 1, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/what-are-some-rails-app-signs-to-step-up-your-hosting-plan/105692 "2007-06-01T13:34:49Z")

</div>

my rail applications are currently on lighttpd, how do i know when i should step it up to a mongrel cluster? also noob question here: in the debug window, for every action executed you see 37 requests per second or so…

---

## [ActiveResource/ActiveRecord arg name difference](https://www.ruby-forum.com/t/activeresource-activerecord-arg-name-difference/105687)

<div class="topic-metadata">

**Author:** [@el-oy](https://www.ruby-forum.com/u/el-oy)\
**Replies:** 0\
**Last updated:** [June 1, 2007, 11:59am UTC](https://www.ruby-forum.com/t/activeresource-activerecord-arg-name-difference/105687 "2007-06-01T11:59:31Z")

</div>

Hello, I’m currently working on some code to support ActiveResource in RubyCocoa with Cocoa Bindings. I have already written (most) of the glue for ActiveRecord, so obviously I want to keep my code DRY and reuse most…

---

## [Menu best practices](https://www.ruby-forum.com/t/menu-best-practices/105545)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 2\
**Last updated:** [June 1, 2007, 11:48am UTC](https://www.ruby-forum.com/t/menu-best-practices/105545 "2007-06-01T11:48:38Z")

</div>

Hi all, What are your best practices with menu’s in Ruby on Rails? I have now created a helper that sees if a link is the same as the current page an adds a class “active” to it. The only problem is: a link to “users…

---

## [Preventing XSS attacks in rails](https://www.ruby-forum.com/t/preventing-xss-attacks-in-rails/105656)

<div class="topic-metadata">

**Author:** [@hyped](https://www.ruby-forum.com/u/hyped)\
**Replies:** 2\
**Last updated:** [June 1, 2007, 10:42am UTC](https://www.ruby-forum.com/t/preventing-xss-attacks-in-rails/105656 "2007-06-01T10:42:25Z")

</div>

I have a script that uses the NET::HTTP class to scrape information off of a website. I take that html and insert it into a database. How do I escape all tags before inserting into database? Anything similar to PHP’s …

---

## [Best way to convert a legacy database that's full of data?](https://www.ruby-forum.com/t/best-way-to-convert-a-legacy-database-thats-full-of-data/105497)

<div class="topic-metadata">

**Author:** [@maurice-gladwell](https://www.ruby-forum.com/u/maurice-gladwell)\
**Replies:** 8\
**Last updated:** [June 1, 2007, 10:35am UTC](https://www.ruby-forum.com/t/best-way-to-convert-a-legacy-database-thats-full-of-data/105497 "2007-06-01T10:35:24Z")

</div>

I need to convert a legacy database - the usual non-Railish schema with several million rows - to a Rails-compatible schema. Are there any tools / tutorials / books / blog-posts that would help me with that? I need t…

---

## [Scheduling certain tasks in ruby](https://www.ruby-forum.com/t/scheduling-certain-tasks-in-ruby/105654)

<div class="topic-metadata">

**Author:** [@hyped](https://www.ruby-forum.com/u/hyped)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 10:20am UTC](https://www.ruby-forum.com/t/scheduling-certain-tasks-in-ruby/105654 "2007-06-01T10:20:11Z")

</div>

I want to be able to execute a certain task at a specified time. For example, a user types in a reminder and a certain date/time. I want to be able to send an email containing that reminder at exactly that date and ti…

---

## [Date](https://www.ruby-forum.com/t/date/105489)

<div class="topic-metadata">

**Author:** [@madhan](https://www.ruby-forum.com/u/madhan)\
**Replies:** 2\
**Last updated:** [June 1, 2007, 9:13am UTC](https://www.ruby-forum.com/t/date/105489 "2007-06-01T09:13:17Z")

</div>

hi all, i have used date\_select in my rhtml… when i read the parameters in the controller, it returns as an arrry like xxx(1i)=\>2007, xxx(2i)=\>2, xxx(3i)=\>7 i want to find out the day of that particular date if t…

---

## [Rspec ideology](https://www.ruby-forum.com/t/rspec-ideology/105590)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 1, 2007, 8:53am UTC](https://www.ruby-forum.com/t/rspec-ideology/105590 "2007-06-01T08:53:00Z")

</div>

Hi all. Could anybody help me with Rspec? I think that Rspec is used such a way: 1.I decide MyModel must have method my\_method which return array of 2 model objects. 2.I write spec where I use stub instead of my\_met…

---

## [STI and change the type](https://www.ruby-forum.com/t/sti-and-change-the-type/105417)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 8\
**Last updated:** [June 1, 2007, 8:07am UTC](https://www.ruby-forum.com/t/sti-and-change-the-type/105417 "2007-06-01T08:07:57Z")

</div>

Hey, I’m trying to use STI in my models, while writing a little cms. A have a model called Page and some subclasses like ContentPage, Sysfolder etc. Some classes share similar attributes, so I use STI and one table f…

---

## [Ldap](https://www.ruby-forum.com/t/ldap/105664)

<div class="topic-metadata">

**Author:** [@Carolin](https://www.ruby-forum.com/u/Carolin)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 7:24am UTC](https://www.ruby-forum.com/t/ldap/105664 "2007-06-01T07:24:53Z")

</div>

Hi all., Am New to Rails., Can Anyone help me how to set up a LDAP server for Rails application., Just i want to authenticate a username and password via LDAP server., I dont have Clear idea about how to download an…

---

## [Lighttpd won't start up. I'm new to ruby, please bare with m](https://www.ruby-forum.com/t/lighttpd-wont-start-up-im-new-to-ruby-please-bare-with-m/105659)

<div class="topic-metadata">

**Author:** [@mjw](https://www.ruby-forum.com/u/mjw)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 7:13am UTC](https://www.ruby-forum.com/t/lighttpd-wont-start-up-im-new-to-ruby-please-bare-with-m/105659 "2007-06-01T07:13:13Z")

</div>

I am running Ruby on an iMac (intel based). Here is the error message I am getting. I have a feeling this is “easy” to fix, but I cannot find anything on it using goggle. I created a rails project named ‘railslist’ at…

---

## [Fragment Caching - happening twice](https://www.ruby-forum.com/t/fragment-caching-happening-twice/105666)

<div class="topic-metadata">

**Author:** [@raghus](https://www.ruby-forum.com/u/raghus)\
**Replies:** 0\
**Last updated:** [June 1, 2007, 6:01am UTC](https://www.ruby-forum.com/t/fragment-caching-happening-twice/105666 "2007-06-01T06:01:48Z")

</div>

I am using fragment caching - the cache gets stored under RAILS\_ROOT/ tmp/cache/www.mysite.com but if I go to http://mysite.com (no www) then a second cache gets stored at RAILS\_ROOT/tmp/cache/mysite.com - from this p…

---

## [Couple questions, mainly around RESTful resourcing](https://www.ruby-forum.com/t/couple-questions-mainly-around-restful-resourcing/105586)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 3\
**Last updated:** [June 1, 2007, 5:56am UTC](https://www.ruby-forum.com/t/couple-questions-mainly-around-restful-resourcing/105586 "2007-06-01T05:56:48Z")

</div>

Let’s say we have users, posts, and comments. I figured that in order to show a list of posts from a user, I’d have to nest it. All good, I figured it out without too much trouble, but then after a while I started to…

---

## [Rails Newbie : Basic Question](https://www.ruby-forum.com/t/rails-newbie-basic-question/105662)

<div class="topic-metadata">

**Author:** [@riverdog](https://www.ruby-forum.com/u/riverdog)\
**Replies:** 10\
**Last updated:** [June 1, 2007, 5:51am UTC](https://www.ruby-forum.com/t/rails-newbie-basic-question/105662 "2007-06-01T05:51:47Z")

</div>

I’ve been reading and reading about rails and I’m eager to get started but I’ve got a question that no literature seems to address. Every rails book tells you how easy it is to start a sample rails app by starting up…

---

## ["undefined method \`each'" error is derailing me](https://www.ruby-forum.com/t/undefined-method-each-error-is-derailing-me/105463)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 16\
**Last updated:** [June 1, 2007, 5:47am UTC](https://www.ruby-forum.com/t/undefined-method-each-error-is-derailing-me/105463 "2007-06-01T05:47:47Z")

</div>

I was SO close to successfully updating my HABTM relationship! Here’s my schema: create\_table “people”, :force =\> true do |t| t.column “family\_name”, :string t.column “given\_name”, :string t.column …

---

## [Market Your Business On Search Engines](https://www.ruby-forum.com/t/market-your-business-on-search-engines/105663)

<div class="topic-metadata">

**Author:** [@DannyBoy\_Advertisin](https://www.ruby-forum.com/u/DannyBoy_Advertisin)\
**Replies:** 0\
**Last updated:** [June 1, 2007, 5:18am UTC](https://www.ruby-forum.com/t/market-your-business-on-search-engines/105663 "2007-06-01T05:18:45Z")

</div>

Utilize the Internet’s search engines to promote your specific business website. Yahoo, Google, MSN, Business, Ask, and many more! If you have a website for your business, take it to the next level! Market locally, r…

---

## [Where to put pagination\_by\_sql code?](https://www.ruby-forum.com/t/where-to-put-pagination-by-sql-code/105658)

<div class="topic-metadata">

**Author:** [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Replies:** 0\
**Last updated:** [June 1, 2007, 3:50am UTC](https://www.ruby-forum.com/t/where-to-put-pagination-by-sql-code/105658 "2007-06-01T03:50:38Z")

</div>

I am trying to use the pagination\_by\_sql explained here : http://thebogles.com/blog/2006/06/paginate\_by\_sql-for-rails-a-more-general-approach/ Now I don’t know where to put the following code sso that all the models c…

---

## ["x" and "y" values in a form\_tag](https://www.ruby-forum.com/t/x-and-y-values-in-a-form-tag/98958)

<div class="topic-metadata">

**Author:** [@pozza](https://www.ruby-forum.com/u/pozza)\
**Replies:** 7\
**Last updated:** [June 1, 2007, 1:52am UTC](https://www.ruby-forum.com/t/x-and-y-values-in-a-form-tag/98958 "2007-06-01T01:52:30Z")

</div>

Hi, I have some strange output in my log file, where I am sending information via a form to the database, eg: \<-- snip --\> Processing StoreController#add\_var\_product (for 127.0.0.1 at 2006-01-30 12:30:19) \[POST\] P…

---

## [Rails doesn't scale because RI/transactions in app not db!](https://www.ruby-forum.com/t/rails-doesnt-scale-because-ri-transactions-in-app-not-db/105437)

<div class="topic-metadata">

**Author:** [@damnpenguins](https://www.ruby-forum.com/u/damnpenguins)\
**Replies:** 22\
**Last updated:** [June 1, 2007, 1:39am UTC](https://www.ruby-forum.com/t/rails-doesnt-scale-because-ri-transactions-in-app-not-db/105437 "2007-06-01T01:39:29Z")

</div>

Not that I have your attention! :stuck\_out\_tongue: I’ve been having a discussion with a respected colleague here: http://phpbuilder.com/board/showthread.php?t=10340411 (Rails vs. PHP) He’s basically saying that Rails …

---

## [Getting help/possible commands for rake? e.g. options for](https://www.ruby-forum.com/t/getting-help-possible-commands-for-rake-e-g-options-for/105638)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [June 1, 2007, 1:38am UTC](https://www.ruby-forum.com/t/getting-help-possible-commands-for-rake-e-g-options-for/105638 "2007-06-01T01:38:28Z")

</div>

Hi, What’s the syntax for getting help/list of commands available for rake (within a RoRs application). For example: what commands are possible (e.g. db:migrate)? how to get an overview / list of options for a comma…

---

## [Prototype 1.5.1 in rails 1.2.3](https://www.ruby-forum.com/t/prototype-1-5-1-in-rails-1-2-3/105640)

<div class="topic-metadata">

**Author:** [@kempa](https://www.ruby-forum.com/u/kempa)\
**Replies:** 1\
**Last updated:** [June 1, 2007, 12:51am UTC](https://www.ruby-forum.com/t/prototype-1-5-1-in-rails-1-2-3/105640 "2007-06-01T00:51:23Z")

</div>

I need to use prototype 1.5.1. replacing prototype.js seems to work fine. should I expect any surprises, or is the interface static enough to make it safe? thanks Khaled

---

## [RFP submission (where? here?)](https://www.ruby-forum.com/t/rfp-submission-where-here/105646)

<div class="topic-metadata">

**Author:** [@CSGJC-rbaker](https://www.ruby-forum.com/u/CSGJC-rbaker)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/rfp-submission-where-here/105646 "2007-05-31T23:55:18Z")

</div>

Hello: My nonprofit organization has released an RFP for several RoR projects we need developed over the summer. We would be happy to receive proposals from those on this list. Please see the details of the RFP her…

---

## [RFP submission (where? here?)](https://www.ruby-forum.com/t/rfp-submission-where-here/105645)

<div class="topic-metadata">

**Author:** [@CSGJC-rbaker](https://www.ruby-forum.com/u/CSGJC-rbaker)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/rfp-submission-where-here/105645 "2007-05-31T23:53:18Z")

</div>

Hello: My nonprofit organization has released an RFP for several RoR projects we need developed over the summer. We would be happy to receive proposals from those on this list. Please see the details of the RFP her…

---

## [Problem with params and a string](https://www.ruby-forum.com/t/problem-with-params-and-a-string/105635)

<div class="topic-metadata">

**Author:** [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/problem-with-params-and-a-string/105635 "2007-05-31T23:35:36Z")

</div>

def index cond = params\[:letter\] + “%” @clients = Client.find :all, :conditions =\> \[“firstname like ?” , cond\], :order =\> “firstname ASC” end This is my code and it gives me an error everytime saying this: You have…

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

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