# Rails

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

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

---

## [Display category name in url](https://www.ruby-forum.com/t/display-category-name-in-url/170588)

<div class="topic-metadata">

**Author:** [@lecielbleu](https://www.ruby-forum.com/u/lecielbleu)\
**Replies:** 3\
**Last updated:** [June 19, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/display-category-name-in-url/170588 "2009-06-19T20:29:06Z")

</div>

Hi , do we have to use controller name in url , can we change this? For example i have a controller named =\> category when user click to link “Computer Components” can rails write http://domain/computer-components ins…

---

## [Activerecord-sqlserver-adapter-2.2.19 bug: text col limits](https://www.ruby-forum.com/t/activerecord-sqlserver-adapter-2-2-19-bug-text-col-limits/170627)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [June 19, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/activerecord-sqlserver-adapter-2-2-19-bug-text-col-limits/170627 "2009-06-19T19:47:32Z")

</div>

All, Rails 2.1.0 AR SQL Server Adapter 2.2.19 I use the AR session store in my application. When I upgraded to the latest version of the SQL Server Adapter, my app. stopped working because supposedly my session dat…

---

## [New version of the ibm\_db gem is now available](https://www.ruby-forum.com/t/new-version-of-the-ibm-db-gem-is-now-available/170623)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 0\
**Last updated:** [June 19, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/new-version-of-the-ibm-db-gem-is-now-available/170623 "2009-06-19T19:30:39Z")

</div>

Hi All, New Version ( 1.1.0 ) of the ibm\_db gem is now available along with the latest DB2, version V9.7, available for the community. This release of the gem provides support for the Activerecord’s Query Cache Mecha…

---

## [Errors.add(" ") not shows error message](https://www.ruby-forum.com/t/errors-add-not-shows-error-message/170573)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [June 19, 2009, 7:28pm UTC](https://www.ruby-forum.com/t/errors-add-not-shows-error-message/170573 "2009-06-19T19:28:17Z")

</div>

Hi ALL… I want to show error message when entered authority is invalid. I implemented below in my controller if params\[:user\_info\]\[:login\].empty? @user = UserInfo.find\_by\_login(‘admin’) @company.authority\_id = @user…

---

## [Initialize won't work?](https://www.ruby-forum.com/t/initialize-wont-work/170617)

<div class="topic-metadata">

**Author:** [@himdel](https://www.ruby-forum.com/u/himdel)\
**Replies:** 2\
**Last updated:** [June 19, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/initialize-wont-work/170617 "2009-06-19T18:58:06Z")

</div>

I’ve got a simple model class ExtraType \< ActiveRecord::Base has\_many :match\_balls attr\_accessor :extra\_total def initialize self.extra\_total=0 end end When I try ex=ExtraType.new, I get INTERNAL ERROR!!! You …

---

## [Making a Keyword Search](https://www.ruby-forum.com/t/making-a-keyword-search/170584)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/making-a-keyword-search/170584 "2009-06-19T18:52:17Z")

</div>

Hello I created a search engine on my site but it only works when you type the full name of the string. My string name are on average 9 characters long. I would like to be able to search one word of the string and the…

---

## [ActiveRecord - Joined subclasses possible?](https://www.ruby-forum.com/t/activerecord-joined-subclasses-possible/170613)

<div class="topic-metadata">

**Author:** [@TheDeeno](https://www.ruby-forum.com/u/TheDeeno)\
**Replies:** 0\
**Last updated:** [June 19, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/activerecord-joined-subclasses-possible/170613 "2009-06-19T18:21:21Z")

</div>

Hi all, I’m thinking about making the switch to RoR for one of my projects. I’m trying to figure out if ActiveRecord can handle one of my inheritance hierarchies before I do. I have a more detailed question up on stac…

---

## [What's wrong ... syntax error ... unexpected identifer](https://www.ruby-forum.com/t/whats-wrong-syntax-error-unexpected-identifer/170610)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/whats-wrong-syntax-error-unexpected-identifer/170610 "2009-06-19T18:18:58Z")

</div>

got this error \[rails 2.3.2, Ruby 1.8.7\] syntax error, unexpected tIDENTIFIER, expecting kEND … if n.send(order\_attribute) \> self.send(order\_attribute) idoesn’t like the ‘\>’ … what’s wrong ? here is my action… def…

---

## [Make gem from project](https://www.ruby-forum.com/t/make-gem-from-project/170606)

<div class="topic-metadata">

**Author:** [@blueomega](https://www.ruby-forum.com/u/blueomega)\
**Replies:** 0\
**Last updated:** [June 19, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/make-gem-from-project/170606 "2009-06-19T16:46:26Z")

</div>

I have a complete project, and i want to deploy it as a gem, ou something similar, whats the best gem generator I use a database mysql, is it possible, by using a single command to install the gem, the database is cr…

---

## [Deployment Question](https://www.ruby-forum.com/t/deployment-question/169534)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 39\
**Last updated:** [June 19, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/deployment-question/169534 "2009-06-19T15:35:05Z")

</div>

Passenger is not available for windows. However, it seems for a simple deployment configuration, under windows, I can just simply put the virtual hosts section into http.conf, e.g.: \<VirtualHost \*\> ServerName mysite …

---

## [Config.action\_controller.session\_store = :active\_record\_store](https://www.ruby-forum.com/t/config-action-controller-session-store-active-record-store/170598)

<div class="topic-metadata">

**Author:** [@Mandar](https://www.ruby-forum.com/u/Mandar)\
**Replies:** 1\
**Last updated:** [June 19, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/config-action-controller-session-store-active-record-store/170598 "2009-06-19T15:11:36Z")

</div>

Hi All, I am new to Rails and learning rails reading ebook ‘Agile web development using rails’. I am doing samples given in this book chapter by chapter. but I stuck when I come to Sessions chapter, they have given t…

---

## [How to write cycle helper for this code](https://www.ruby-forum.com/t/how-to-write-cycle-helper-for-this-code/170574)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 1\
**Last updated:** [June 19, 2009, 1:59pm UTC](https://www.ruby-forum.com/t/how-to-write-cycle-helper-for-this-code/170574 "2009-06-19T13:59:39Z")

</div>

Headline tortor sit amet tellus interdum Headline tortor sit amet tellus interdum Headline tortor sit amet tellus interdum Headline sit amet tellus…

---

## [A different page displays on the weekend--how?](https://www.ruby-forum.com/t/a-different-page-displays-on-the-weekend-how/170479)

<div class="topic-metadata">

**Author:** [@dansinker](https://www.ruby-forum.com/u/dansinker)\
**Replies:** 13\
**Last updated:** [June 19, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/a-different-page-displays-on-the-weekend-how/170479 "2009-06-19T13:50:06Z")

</div>

I’m developing an app that I want to have switch from its normal weekday view to a weekend-only view (essentially a look at the previous week). While I understand the concept of what I need to do: if the day = saturd…

---

## [Validates\_numericality\_of and numbers with comma](https://www.ruby-forum.com/t/validates-numericality-of-and-numbers-with-comma/117200)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 8\
**Last updated:** [June 19, 2009, 1:23pm UTC](https://www.ruby-forum.com/t/validates-numericality-of-and-numbers-with-comma/117200 "2009-06-19T13:23:36Z")

</div>

Hi, i’ve a little problem, i’m using this validates to check if an input is a number, it works with the dot, like 123.45, but actually i need that it works also with numbers with comma, like 123,45. Is there any simpl…

---

## [Case Insensitive in Rails + Urgently Need](https://www.ruby-forum.com/t/case-insensitive-in-rails-urgently-need/170583)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 10\
**Last updated:** [June 19, 2009, 1:07pm UTC](https://www.ruby-forum.com/t/case-insensitive-in-rails-urgently-need/170583 "2009-06-19T13:07:40Z")

</div>

Champs … Coming here for the first time … :slight\_smile: Actually i am searching for a string in an array using an exists like this … Area.exists?(:name = whatEverName) But the crisis is that how can i call this cas…

---

## [Edit masks for form fields](https://www.ruby-forum.com/t/edit-masks-for-form-fields/165040)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 1\
**Last updated:** [June 19, 2009, 1:07pm UTC](https://www.ruby-forum.com/t/edit-masks-for-form-fields/165040 "2009-06-19T13:07:28Z")

</div>

I have several fields in forms that have either dollar values, e.g., book value, and integer values, e.g., age of the building. I would like to put some edit masks on them. What is the easiest way of doing that in Ra…

---

## [Validation order when mixing callbacks and validates\_format](https://www.ruby-forum.com/t/validation-order-when-mixing-callbacks-and-validates-format/124670)

<div class="topic-metadata">

**Author:** [@kodama](https://www.ruby-forum.com/u/kodama)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 1:06pm UTC](https://www.ruby-forum.com/t/validation-order-when-mixing-callbacks-and-validates-format/124670 "2009-06-19T13:06:08Z")

</div>

I posted this question the other day, but it was pretty late so I think I wrote a bunch of gibberish. So let me try it now that I’ve been properly doused with caffeine. :slight\_smile: The Problem: I’m using the “befor…

---

## [Checking URL with open-uri](https://www.ruby-forum.com/t/checking-url-with-open-uri/142533)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 11:20am UTC](https://www.ruby-forum.com/t/checking-url-with-open-uri/142533 "2009-06-19T11:20:27Z")

</div>

Hi, I allow posting videos to youtube in my app. But before I let them save into the DB I want to, at least, know that the users put a link to youtube and that the link is working. How can I do those verifications wi…

---

## [Search query: How to find results across columns](https://www.ruby-forum.com/t/search-query-how-to-find-results-across-columns/170581)

<div class="topic-metadata">

**Author:** [@evandrake](https://www.ruby-forum.com/u/evandrake)\
**Replies:** 2\
**Last updated:** [June 19, 2009, 11:17am UTC](https://www.ruby-forum.com/t/search-query-how-to-find-results-across-columns/170581 "2009-06-19T11:17:48Z")

</div>

I have created a search box that queries a restaurant database. The restaurant model is set to search for “name LIKE ?”. However, I cannot figure out how to add other conditions so that it can also display “address …

---

## [Serverside AjaxRequest or AjaxUpdater detections](https://www.ruby-forum.com/t/serverside-ajaxrequest-or-ajaxupdater-detections/170457)

<div class="topic-metadata">

**Author:** [@xinit](https://www.ruby-forum.com/u/xinit)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 11:06am UTC](https://www.ruby-forum.com/t/serverside-ajaxrequest-or-ajaxupdater-detections/170457 "2009-06-19T11:06:34Z")

</div>

Hi all, This question might be a long shot, but I’m going to ask it anyway. In my application, I’ve created a before\_filter that does some magic. It looks like this: if request.xhr? then render :update do |page| pa…

---

## [Installing ruby 1.9.1 with ruby 1.8.6 on same Linux machine](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 10:56am UTC](https://www.ruby-forum.com/t/installing-ruby-1-9-1-with-ruby-1-8-6-on-same-linux-machine/170416 "2009-06-19T10:56:35Z")

</div>

Hi I would like to install ruby1.9.1 with rails 2.3.2. I am currently using rails 2.2.2 and (also rails 2.3.2 is there in the system) with ruby 1.8.6 (2008-08-11 patchlevel 287) \[i386-linux\] Could anybody please sugg…

---

## [Textmate carret previous location](https://www.ruby-forum.com/t/textmate-carret-previous-location/170580)

<div class="topic-metadata">

**Author:** [@learnbydoing](https://www.ruby-forum.com/u/learnbydoing)\
**Replies:** 0\
**Last updated:** [June 19, 2009, 10:31am UTC](https://www.ruby-forum.com/t/textmate-carret-previous-location/170580 "2009-06-19T10:31:31Z")

</div>

How can I move the carret to the previous location in Textmate? In MS Word, I can hit Shift-F5 and the cursor will move to the previous location. Thanks.

---

## [Wget and open-uri](https://www.ruby-forum.com/t/wget-and-open-uri/170579)

<div class="topic-metadata">

**Author:** [@flyingchen](https://www.ruby-forum.com/u/flyingchen)\
**Replies:** 0\
**Last updated:** [June 19, 2009, 10:30am UTC](https://www.ruby-forum.com/t/wget-and-open-uri/170579 "2009-06-19T10:30:32Z")

</div>

I have a question about open-uri in site of my kanshipin.net. And my configuration info listed below: os:Solar System ruby:1.9.1p0 ror:2.3.2 when i tried to visit the url of http://api.bd.joy.cn/rest?parameters…, …

---

## [File upload?](https://www.ruby-forum.com/t/file-upload/170548)

<div class="topic-metadata">

**Author:** [@Ronny\_F](https://www.ruby-forum.com/u/Ronny_F)\
**Replies:** 6\
**Last updated:** [June 19, 2009, 9:12am UTC](https://www.ruby-forum.com/t/file-upload/170548 "2009-06-19T09:12:24Z")

</div>

Hi, does someone has an tutorial for file-upload that works with rails 2.3.2 and that DON’T stores data in a database? I want to: upload a text-file do something with the file put a link for download on the page Reg…

---

## [""no such file to load -- test\_helper"](https://www.ruby-forum.com/t/no-such-file-to-load-test-helper/170558)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [June 19, 2009, 9:00am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-test-helper/170558 "2009-06-19T09:00:03Z")

</div>

I have seen a lot of discussions about the issue where if you run a unit test from the command line you get the error: “no such file to load – test\_helper” I have been using the workaround of changing: require ‘test\_…

---

## [How to persist file upload fields after a validation error](https://www.ruby-forum.com/t/how-to-persist-file-upload-fields-after-a-validation-error/170556)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 2\
**Last updated:** [June 19, 2009, 8:25am UTC](https://www.ruby-forum.com/t/how-to-persist-file-upload-fields-after-a-validation-error/170556 "2009-06-19T08:25:32Z")

</div>

Hi all, Is there an easy way to not lose the file field input from the user after a validation error? It pisses people off to have to choose their files again just because some other field didn’t pass a validation. …

---

## [NoMethodError in Store#add\_to\_cart](https://www.ruby-forum.com/t/nomethoderror-in-store-add-to-cart/170504)

<div class="topic-metadata">

**Author:** [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Replies:** 2\
**Last updated:** [June 19, 2009, 6:40am UTC](https://www.ruby-forum.com/t/nomethoderror-in-store-add-to-cart/170504 "2009-06-19T06:40:07Z")

</div>

Dear all, I’m going, by the book, through the book “Agile Web D. with Rails, 2nd edition”. I get stuck in section 8.2 I am running into following error: NoMethodError in Store#add\_to\_cart Showing app/views/store/add\_…

---

## [Session Reset when clicking back button of the browser](https://www.ruby-forum.com/t/session-reset-when-clicking-back-button-of-the-browser/170571)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [June 19, 2009, 5:51am UTC](https://www.ruby-forum.com/t/session-reset-when-clicking-back-button-of-the-browser/170571 "2009-06-19T05:51:34Z")

</div>

hi friends… here is my query… kindly give ur views pls… after logging into the application,i redirect to company list page.now when user clicks the browser back button it should show the login page.that is i want to…

---

## [Seems Complex validation --- pls help](https://www.ruby-forum.com/t/seems-complex-validation-pls-help/170496)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [June 19, 2009, 5:32am UTC](https://www.ruby-forum.com/t/seems-complex-validation-pls-help/170496 "2009-06-19T05:32:35Z")

</div>

Hi… i have a auto complete field for my authority\_id field.authority\_id field is not mandatory.if the user not fills it will take the default authority id as value. but i want to validate if the user enters invalid a…

---

## [Date.new.to\_time.to\_i](https://www.ruby-forum.com/t/date-new-to-time-to-i/170564)

<div class="topic-metadata">

**Author:** [@magic6435](https://www.ruby-forum.com/u/magic6435)\
**Replies:** 3\
**Last updated:** [June 19, 2009, 2:43am UTC](https://www.ruby-forum.com/t/date-new-to-time-to-i/170564 "2009-06-19T02:43:15Z")

</div>

What’s going on here!? Date.new.to\_time.to\_i NoMethodError: undefined method \`to\_i’ for Mon, 01 Jan -4712 00:00:00 -0800:DateTime from (irb):25 Date.today.to\_time.to\_i =\> 1245308400 RUBY\_VERSION =\> “1.8.7…

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

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