# Rails

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

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

---

## [Remove www from url](https://www.ruby-forum.com/t/remove-www-from-url/161156)

<div class="topic-metadata">

**Author:** [@perezda](https://www.ruby-forum.com/u/perezda)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 3:36am UTC](https://www.ruby-forum.com/t/remove-www-from-url/161156 "2009-02-24T03:36:58Z")

</div>

So i have a rails app running in 2.0.2 and I would like to know if anyone can point me in the right direction on how to remove the www from the url. so if someone goes to www.mydomain.com it will forward them to mydom…

---

## [Security risks of cookie-based session storage](https://www.ruby-forum.com/t/security-risks-of-cookie-based-session-storage/160998)

<div class="topic-metadata">

**Author:** [@eric99](https://www.ruby-forum.com/u/eric99)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 3:31am UTC](https://www.ruby-forum.com/t/security-risks-of-cookie-based-session-storage/160998 "2009-02-24T03:31:40Z")

</div>

Should I be concerned if I am using the default cookie-based session storage for a high security application? Nothing sensitive will be stored on the cookie, but it’s critical that one user cannot gain access to anot…

---

## [Background process](https://www.ruby-forum.com/t/background-process/161096)

<div class="topic-metadata">

**Author:** [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Replies:** 7\
**Last updated:** [February 23, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/background-process/161096 "2009-02-23T23:38:12Z")

</div>

Hi all I am working on a heavy engineering project. And the requirement is that I needto do a lot of process before I store the data to the db. Now the question is that I want to do the process that I am doing but I …

---

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

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 8\
**Last updated:** [February 23, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/date-filter/158162 "2009-02-23T23:26:28Z")

</div>

anyone know any examples of good code for a date range filter i can add to my app to return only selected articles within that range based on their created at date.

---

## [How to get cursor / lazy semantics from find(:all)](https://www.ruby-forum.com/t/how-to-get-cursor-lazy-semantics-from-find-all/161147)

<div class="topic-metadata">

**Author:** [@kschell](https://www.ruby-forum.com/u/kschell)\
**Replies:** 2\
**Last updated:** [February 23, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/how-to-get-cursor-lazy-semantics-from-find-all/161147 "2009-02-23T23:20:01Z")

</div>

I’m trying to figure out it there’s some alternative to find(:all) that can avoid instantiating every object at once, when I know that I’m just going to iterate over the collection and throw it away. E.g. def batch\_p…

---

## [Best way to model user or IP](https://www.ruby-forum.com/t/best-way-to-model-user-or-ip/161115)

<div class="topic-metadata">

**Author:** [@dcarneiro](https://www.ruby-forum.com/u/dcarneiro)\
**Replies:** 3\
**Last updated:** [February 23, 2009, 11:18pm UTC](https://www.ruby-forum.com/t/best-way-to-model-user-or-ip/161115 "2009-02-23T23:18:15Z")

</div>

I’m writing a wiki-based website from scratch and would like some suggestions on the best way to deal with this common situation. A page can be edited by a logged-in and registered user or by an anonymous visitor. If …

---

## [How to set up fixtures to use ActiveRecord callbacks?](https://www.ruby-forum.com/t/how-to-set-up-fixtures-to-use-activerecord-callbacks/161155)

<div class="topic-metadata">

**Author:** [@Michael\_JSISJacks](https://www.ruby-forum.com/u/Michael_JSISJacks)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/how-to-set-up-fixtures-to-use-activerecord-callbacks/161155 "2009-02-23T23:04:47Z")

</div>

Hi all, I have a rake task that is seeding my database. This is so I can drop and recreate the entire database and then add some company accounts very easily. My rake file (lib/tasks/database.rake) looks like this: n…

---

## [Bug? ruby tests do not write to mysql-database](https://www.ruby-forum.com/t/bug-ruby-tests-do-not-write-to-mysql-database/161133)

<div class="topic-metadata">

**Author:** [@schtieF](https://www.ruby-forum.com/u/schtieF)\
**Replies:** 6\
**Last updated:** [February 23, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/bug-ruby-tests-do-not-write-to-mysql-database/161133 "2009-02-23T22:32:27Z")

</div>

Hi, i have a very strange and serious problem. In my test i create an object with (ActiveRecord::Base).create (i also tried .new and .save!) everything seems to be fine, assert \*.errors.empty? is ok but there is ne e…

---

## [.specification or .gemspec?](https://www.ruby-forum.com/t/specification-or-gemspec/161153)

<div class="topic-metadata">

**Author:** [@serengetisunset](https://www.ruby-forum.com/u/serengetisunset)\
**Replies:** 0\
**Last updated:** [February 23, 2009, 10:21pm UTC](https://www.ruby-forum.com/t/specification-or-gemspec/161153 "2009-02-23T22:21:45Z")

</div>

Hi, I am currently working on Heroku (herokugarden.com) and pushing to the Heroku Git repo from my local computer. I am also installing gems on local. When I install gems locally, they generate .gemspec files in a sp…

---

## [Ruby on rails developers](https://www.ruby-forum.com/t/ruby-on-rails-developers/161144)

<div class="topic-metadata">

**Author:** [@dash](https://www.ruby-forum.com/u/dash)\
**Replies:** 0\
**Last updated:** [February 23, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-developers/161144 "2009-02-23T21:02:58Z")

</div>

hey…looking for cost effective some help to manage ruby on rails site… and do some development work… I’m in the bay area but will explore overseas options. any ideas?

---

## [\[ANN\] Release: tiny\_mce 3.2.1.1-1](https://www.ruby-forum.com/t/ann-release-tiny-mce-3-2-1-1-1/161074)

<div class="topic-metadata">

**Author:** [@Kieran\_P](https://www.ruby-forum.com/u/Kieran_P)\
**Replies:** 2\
**Last updated:** [February 23, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/ann-release-tiny-mce-3-2-1-1-1/161074 "2009-02-23T20:49:24Z")

</div>

Hey, Announcing the release of tiny\_mce plugin 3.2.1.1-1. Changelog: Rewrote test suite Added comments throughout the plugin for future developer to all users: feel free to fork this repo, make changes, and send a …

---

## [FusionCharts empty value](https://www.ruby-forum.com/t/fusioncharts-empty-value/161139)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 0\
**Last updated:** [February 23, 2009, 7:28pm UTC](https://www.ruby-forum.com/t/fusioncharts-empty-value/161139 "2009-02-23T19:28:12Z")

</div>

Hi I have this method. When i run it the @arr\_data returns no value, so the graph remains empty. When i hard-code the value in the array, like this @arr\_data \<\< \[‘test’, ‘1234’\] it works. What i am doing wrong?? def …

---

## [Clear a textarea when I click on "Submit"](https://www.ruby-forum.com/t/clear-a-textarea-when-i-click-on-submit/161138)

<div class="topic-metadata">

**Author:** [@loader](https://www.ruby-forum.com/u/loader)\
**Replies:** 0\
**Last updated:** [February 23, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/clear-a-textarea-when-i-click-on-submit/161138 "2009-02-23T19:27:19Z")

</div>

Hello everyone! My page reloads itself as soon as I click on “Submit”. My question is : how can I clear the content which is in my textarea? I’m using the method submit\_to\_remote for my submit button. Thank you!

---

## [Submit\_to\_remote onclick clear?](https://www.ruby-forum.com/t/submit-to-remote-onclick-clear/160811)

<div class="topic-metadata">

**Author:** [@loader](https://www.ruby-forum.com/u/loader)\
**Replies:** 2\
**Last updated:** [February 23, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/submit-to-remote-onclick-clear/160811 "2009-02-23T19:25:20Z")

</div>

Hello everyone! I would like to clear my textarea when the user click on the “Submit” button. Ths thing is I’m using a submit\_to\_remote button. I heard that’s impossible to add an option onclick to clear my textarea. …

---

## [Constant caching, modules and STI](https://www.ruby-forum.com/t/constant-caching-modules-and-sti/161113)

<div class="topic-metadata">

**Author:** [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Replies:** 3\
**Last updated:** [February 23, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/constant-caching-modules-and-sti/161113 "2009-02-23T19:17:09Z")

</div>

Hi there, I’ve been following one of the recipes in the Advanced Rails Recipes books, and have arrived for my own particular needs at this scenario: I want to cache some options data in constants at loadtime (as per t…

---

## [Activemerchant + activesupport install/dependency issues](https://www.ruby-forum.com/t/activemerchant-activesupport-install-dependency-issues/161087)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/activemerchant-activesupport-install-dependency-issues/161087 "2009-02-23T18:52:54Z")

</div>

Hi all: Saw the awesome railscasts episode on activemerchant and am going to give it a try, but keep running into this install problem that I can’t figure out: after installing activemerchant as a gem, my rake keep …

---

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

<div class="topic-metadata">

**Author:** [@loader](https://www.ruby-forum.com/u/loader)\
**Replies:** 3\
**Last updated:** [February 23, 2009, 6:20pm UTC](https://www.ruby-forum.com/t/how-can-i-know-if-a-file-has-been-attached/161062 "2009-02-23T18:20:43Z")

</div>

Hello everyone! I have a form where we can attach files to a post. But I want to do different things depending wether a file is attached or not. So my question is : it it possible to know if a file is attached? I wo…

---

## [Tree view similar to Grid view](https://www.ruby-forum.com/t/tree-view-similar-to-grid-view/161127)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 0\
**Last updated:** [February 23, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/tree-view-similar-to-grid-view/161127 "2009-02-23T17:39:01Z")

</div>

Hi, Is there a plugin similar to wice grid for tree representation? A tree control which could directly use the active record the way wice grid does it? Thanks, Sudhi

---

## [Degrading ajax calls - how?](https://www.ruby-forum.com/t/degrading-ajax-calls-how/161040)

<div class="topic-metadata">

**Author:** [@gte351s](https://www.ruby-forum.com/u/gte351s)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/degrading-ajax-calls-how/161040 "2009-02-23T17:28:20Z")

</div>

Hey - I have a few ajax calls in my app that I’m not really sure how to degrade to html. For the most part, these are functions that insert or remove elements to/from the dom. For example, I have my own edit-in-place …

---

## [Trying to do simple model I18n, not succeeding](https://www.ruby-forum.com/t/trying-to-do-simple-model-i18n-not-succeeding/161080)

<div class="topic-metadata">

**Author:** [@richp](https://www.ruby-forum.com/u/richp)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/trying-to-do-simple-model-i18n-not-succeeding/161080 "2009-02-23T16:56:42Z")

</div>

Basically, all my tables look like this: create\_table “countries”, :force =\> true do |t| t.string “name\_en” t.string “name\_ja” end If the locale is set to ‘en’, I want Country.name to return Country.name\_en. Is the…

---

## [Problem with presentation of error messages and multiple objects](https://www.ruby-forum.com/t/problem-with-presentation-of-error-messages-and-multiple-objects/226034)

<div class="topic-metadata">

**Author:** [@Stefan\_Frede](https://www.ruby-forum.com/u/Stefan_Frede)\
**Replies:** 3\
**Last updated:** [February 23, 2009, 4:43pm UTC](https://www.ruby-forum.com/t/problem-with-presentation-of-error-messages-and-multiple-objects/226034 "2009-02-23T16:43:08Z")

</div>

Hi! I have a problem with the presentation of error messages for multiple objects. The validation works fine and if errors occure they will all be presented, but only for one object at a time. When I submit my form t…

---

## [Action Caching in Rails?](https://www.ruby-forum.com/t/action-caching-in-rails/161067)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/action-caching-in-rails/161067 "2009-02-23T15:35:00Z")

</div>

Dear all, I have created a rails application which has menus, like companies, users, departments, banners etc. When i click on my menu(I have used link\_to\_remote) i have rendered the corresponding pages without changi…

---

## [Multiple image upload](https://www.ruby-forum.com/t/multiple-image-upload/160959)

<div class="topic-metadata">

**Author:** [@S\_Athreya](https://www.ruby-forum.com/u/S_Athreya)\
**Replies:** 4\
**Last updated:** [February 23, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/multiple-image-upload/160959 "2009-02-23T15:23:36Z")

</div>

Hello all. I want to have a detailed note on implementing multiple image uploading in rails. Thanks in advance. Regards Athreya

---

## [Textarea and line breaks](https://www.ruby-forum.com/t/textarea-and-line-breaks/161104)

<div class="topic-metadata">

**Author:** [@shahroon\_ali](https://www.ruby-forum.com/u/shahroon_ali)\
**Replies:** 8\
**Last updated:** [February 23, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/textarea-and-line-breaks/161104 "2009-02-23T14:55:20Z")

</div>

Hi everyone! Guys I am facing very irritating problem of line breaks in text area, i used “gsub” method to replace \\r\\n to , but i didn’t got the result as was i expecting. Could anybody give me any suggestions to…

---

## [Pass a varible from view to controller](https://www.ruby-forum.com/t/pass-a-varible-from-view-to-controller/161094)

<div class="topic-metadata">

**Author:** [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Replies:** 4\
**Last updated:** [February 23, 2009, 1:27pm UTC](https://www.ruby-forum.com/t/pass-a-varible-from-view-to-controller/161094 "2009-02-23T13:27:15Z")

</div>

please can anyone suggest me a code to pass a variable whichis in the view to controller

---

## [(ultra)sphinx reindexing eats up a lot of memory](https://www.ruby-forum.com/t/ultra-sphinx-reindexing-eats-up-a-lot-of-memory/149354)

<div class="topic-metadata">

**Author:** [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Replies:** 10\
**Last updated:** [February 23, 2009, 1:13pm UTC](https://www.ruby-forum.com/t/ultra-sphinx-reindexing-eats-up-a-lot-of-memory/149354 "2009-02-23T13:13:40Z")

</div>

Hello, On my 512MB slice (Slicehost) running 3 thins and a Postgres database, I had set up a delta indexing scheme that executes â€œrake ultrasphinx index:deltaâ€ task every minute via cron. The server was unstable …

---

## [Active Scaffold](https://www.ruby-forum.com/t/active-scaffold/161095)

<div class="topic-metadata">

**Author:** [@priyadharsini](https://www.ruby-forum.com/u/priyadharsini)\
**Replies:** 0\
**Last updated:** [February 23, 2009, 11:36am UTC](https://www.ruby-forum.com/t/active-scaffold/161095 "2009-02-23T11:36:36Z")

</div>

Hi all, I’m using activescaffold in my application. I have installed that plugin. When i click the link for active scaffold UI, i’ getting the following error. Please help me to recover this problem. undefined local …

---

## [Problems installing acts\_as\_list plugin](https://www.ruby-forum.com/t/problems-installing-acts-as-list-plugin/161091)

<div class="topic-metadata">

**Author:** [@liberte](https://www.ruby-forum.com/u/liberte)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 11:17am UTC](https://www.ruby-forum.com/t/problems-installing-acts-as-list-plugin/161091 "2009-02-23T11:17:30Z")

</div>

Hi There, i’m using Ruby 1.8.6 on Rails 2.2.2 on a Mac OSX 10.5.4 and i’m trying to use acts\_as\_list in a project. While testing with rake test:units i got an “\[…\] method\_missing': undefined method acts\_as\_list’ \[…\]” …

---

## [To\_json problem (Rails2.2.2)](https://www.ruby-forum.com/t/to-json-problem-rails2-2-2/161079)

<div class="topic-metadata">

**Author:** [@SSSB9SfFSSB](https://www.ruby-forum.com/u/SSSB9SfFSSB)\
**Replies:** 2\
**Last updated:** [February 23, 2009, 10:23am UTC](https://www.ruby-forum.com/t/to-json-problem-rails2-2-2/161079 "2009-02-23T10:23:28Z")

</div>

Hi all, i got a record from my project server side database, like this : @user = User.find 1 then i cover @user to json format: @user.to\_json the result : “created\_at”: “2009-01-28T12:29:32Z” what’s the T…

---

## [Sorting by subsidiary class](https://www.ruby-forum.com/t/sorting-by-subsidiary-class/161033)

<div class="topic-metadata">

**Author:** [@DanC](https://www.ruby-forum.com/u/DanC)\
**Replies:** 2\
**Last updated:** [February 23, 2009, 9:45am UTC](https://www.ruby-forum.com/t/sorting-by-subsidiary-class/161033 "2009-02-23T09:45:21Z")

</div>

Hi all, My app contains categories, service and discounts. A category has\_many :services A service belongs\_to :category and has\_one discount A discount belongs\_to :service On each category show page I list all of th…

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

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