# Rails

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

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

---

## [What's the best way to protect images from the public?](https://www.ruby-forum.com/t/whats-the-best-way-to-protect-images-from-the-public/171486)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 9\
**Last updated:** [July 3, 2009, 5:23pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-protect-images-from-the-public/171486 "2009-07-03T17:23:12Z")

</div>

Hey all! Im building an app at the moment in which users can upload images of themselves. The problem is, because these images are stored in the public directory they are open to the public. How can I protect these …

---

## [Validation failture](https://www.ruby-forum.com/t/validation-failture/171421)

<div class="topic-metadata">

**Author:** [@chero](https://www.ruby-forum.com/u/chero)\
**Replies:** 3\
**Last updated:** [July 3, 2009, 4:44pm UTC](https://www.ruby-forum.com/t/validation-failture/171421 "2009-07-03T16:44:04Z")

</div>

Say controller x, action a has a form on it that submits to controller y, action b, and validation fails during the submit. I want to display the result of controller x, action a with the validation messages. In psue…

---

## [All apps on server giving a silent 500 error page](https://www.ruby-forum.com/t/all-apps-on-server-giving-a-silent-500-error-page/171504)

<div class="topic-metadata">

**Author:** [@BJ\_Neilsen](https://www.ruby-forum.com/u/BJ_Neilsen)\
**Replies:** 0\
**Last updated:** [July 3, 2009, 4:43pm UTC](https://www.ruby-forum.com/t/all-apps-on-server-giving-a-silent-500-error-page/171504 "2009-07-03T16:43:28Z")

</div>

Hi all, I am so completely stumped on this one. A week ago I upgraded to Passenger 2.2.4 and subsequently realized that my production rails app was no longer working properly, it was delivering the 500 error page. Af…

---

## [ActionWebService - omit backtrace in error response](https://www.ruby-forum.com/t/actionwebservice-omit-backtrace-in-error-response/171502)

<div class="topic-metadata">

**Author:** [@jmfreitas](https://www.ruby-forum.com/u/jmfreitas)\
**Replies:** 1\
**Last updated:** [July 3, 2009, 4:38pm UTC](https://www.ruby-forum.com/t/actionwebservice-omit-backtrace-in-error-response/171502 "2009-07-03T16:38:47Z")

</div>

I’m using ActionWebService to expose a WebService of my application, and I would like to control the error responses sent back to the client. At very least, I would like to prevent the XML to include the backtrace. …

---

## [How to route localhost:3000/redirect/www.google.com?](https://www.ruby-forum.com/t/how-to-route-localhost-3000-redirect-www-google-com/171497)

<div class="topic-metadata">

**Author:** [@arunmehta](https://www.ruby-forum.com/u/arunmehta)\
**Replies:** 1\
**Last updated:** [July 3, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/how-to-route-localhost-3000-redirect-www-google-com/171497 "2009-07-03T16:24:30Z")

</div>

I would like to filter all incoming pages via my local rails server, so I would like to access the web by typing a url into my browser along the lines of: http://localhost:3000/redirect/www.google.com I have a contro…

---

## [Problem with acts\_as\_versioned](https://www.ruby-forum.com/t/problem-with-acts-as-versioned/171492)

<div class="topic-metadata">

**Author:** [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Replies:** 8\
**Last updated:** [July 3, 2009, 3:44pm UTC](https://www.ruby-forum.com/t/problem-with-acts-as-versioned/171492 "2009-07-03T15:44:25Z")

</div>

Hi all, I get the following error when trying to use acts\_as\_versioned plugin: uninitialized constant ActiveRecord::Acts::Versioned::ClassMethods::Inflector How can I solve this? Thanks, Rafael R.

---

## [Is it safe to use Ruby 1.9 yet?](https://www.ruby-forum.com/t/is-it-safe-to-use-ruby-1-9-yet/171455)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 10\
**Last updated:** [July 3, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/is-it-safe-to-use-ruby-1-9-yet/171455 "2009-07-03T15:33:01Z")

</div>

I haven’t been following the RoR community for a while as my work caught up to me, but now things have slowed down a little and I’m looking at getting back to learning Rails for my web app idea (a customized CRM type …

---

## [Ajax based form - render action breaks form](https://www.ruby-forum.com/t/ajax-based-form-render-action-breaks-form/171432)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 2\
**Last updated:** [July 3, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/ajax-based-form-render-action-breaks-form/171432 "2009-07-03T14:46:31Z")

</div>

hi all, i’ve 4 select boxes in a form(\_form.rhtml), one dependent on the other. initially, when form is loaded, only 1st box is enabled. after selecting value in 1st select box, it inserts 2nd, on 2nd’s change, 3rd g…

---

## [HABTM - primary key problem](https://www.ruby-forum.com/t/habtm-primary-key-problem/171472)

<div class="topic-metadata">

**Author:** [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Replies:** 4\
**Last updated:** [July 3, 2009, 2:27pm UTC](https://www.ruby-forum.com/t/habtm-primary-key-problem/171472 "2009-07-03T14:27:49Z")

</div>

Hi everyone, I ran into a serious problem when I was trying to do something similar to twitter follow mechanism. The thing is like this: First, I have a self-referential table, named “users” create\_table :users do |t…

---

## [Compose keys](https://www.ruby-forum.com/t/compose-keys/171389)

<div class="topic-metadata">

**Author:** [@Augustus\_C](https://www.ruby-forum.com/u/Augustus_C)\
**Replies:** 1\
**Last updated:** [July 3, 2009, 12:17pm UTC](https://www.ruby-forum.com/t/compose-keys/171389 "2009-07-03T12:17:33Z")

</div>

Somebody can help me? I looking for good plugin to work with compose keys on rails. Any ideia? – Horus Augustus C. C. Lima Sagarana Tech Mobile +55(85)8842.4402 Desk +55(85)3304.6530 removed\_email\_address@domain.…

---

## [Search in scaffold](https://www.ruby-forum.com/t/search-in-scaffold/171476)

<div class="topic-metadata">

**Author:** [@beny18241](https://www.ruby-forum.com/u/beny18241)\
**Replies:** 2\
**Last updated:** [July 3, 2009, 11:14am UTC](https://www.ruby-forum.com/t/search-in-scaffold/171476 "2009-07-03T11:14:01Z")

</div>

Hi Anyone knows how to put search option in scaffold? Reagrds

---

## [Prevent attribute from being changed with "attr\_readonly"](https://www.ruby-forum.com/t/prevent-attribute-from-being-changed-with-attr-readonly/171463)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 1\
**Last updated:** [July 3, 2009, 9:53am UTC](https://www.ruby-forum.com/t/prevent-attribute-from-being-changed-with-attr-readonly/171463 "2009-07-03T09:53:57Z")

</div>

Is there a way to prevent an attribute from being changed from outside the class instance? So that after a record is created, the attribute can be read but cannot be changed from outside the class instance. At first g…

---

## [Calendar for the week(yep, even for hour)](https://www.ruby-forum.com/t/calendar-for-the-week-yep-even-for-hour/171479)

<div class="topic-metadata">

**Author:** [@sfedi](https://www.ruby-forum.com/u/sfedi)\
**Replies:** 0\
**Last updated:** [July 3, 2009, 9:50am UTC](https://www.ruby-forum.com/t/calendar-for-the-week-yep-even-for-hour/171479 "2009-07-03T09:50:05Z")

</div>

Hello guys ! I’m admin and I want to schedule some server tasks via web. Therefore I need good calendar which supports hours and days of week. For example I want to set task which will work every Sunday at 5:00 or Mo…

---

## [Load script in console](https://www.ruby-forum.com/t/load-script-in-console/171473)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 1\
**Last updated:** [July 3, 2009, 8:34am UTC](https://www.ruby-forum.com/t/load-script-in-console/171473 "2009-07-03T08:34:22Z")

</div>

I find myself retyping statements in the console all the time. Is there a way to put all these statements in the script and at the console, just run it? Thanks.

---

## [Modules and models](https://www.ruby-forum.com/t/modules-and-models/171471)

<div class="topic-metadata">

**Author:** [@slavix](https://www.ruby-forum.com/u/slavix)\
**Replies:** 0\
**Last updated:** [July 3, 2009, 4:19am UTC](https://www.ruby-forum.com/t/modules-and-models/171471 "2009-07-03T04:19:45Z")

</div>

Hi, I am trying to namespace my models in a Rails app. I put this in routes map.namespace(:property) do |property| property.root :controller =\> :venues, :active\_scaffold =\> true property.resources :location\_gr…

---

## [Simple hopefully, newbish question, but how come it's saying starting in Rails 2.2.2 when I'm using](https://www.ruby-forum.com/t/simple-hopefully-newbish-question-but-how-come-its-saying-starting-in-rails-2-2-2-when-im-using/171465)

<div class="topic-metadata">

**Author:** [@rick](https://www.ruby-forum.com/u/rick)\
**Replies:** 5\
**Last updated:** [July 3, 2009, 2:00am UTC](https://www.ruby-forum.com/t/simple-hopefully-newbish-question-but-how-come-its-saying-starting-in-rails-2-2-2-when-im-using/171465 "2009-07-03T02:00:10Z")

</div>

I’m trying to get this app I have (I actually started it over fresh) to start up with rails 2.3.2 rick- ~/projects/rails/hockey $ sudo gem install rails -v 2.3.2 Password: Successfully installed rails-2.3.2 1 gem i…

---

## [Video Chat and Rails](https://www.ruby-forum.com/t/video-chat-and-rails/171430)

<div class="topic-metadata">

**Author:** [@enzor](https://www.ruby-forum.com/u/enzor)\
**Replies:** 1\
**Last updated:** [July 3, 2009, 1:53am UTC](https://www.ruby-forum.com/t/video-chat-and-rails/171430 "2009-07-03T01:53:44Z")

</div>

Right now, i got to create a simple real time auction system for my company. The rtmp servers which can do this work (finely) right now are FMS and Red5. There is some plugin for rails and/or ruby which provide metho…

---

## [How to access nested params in controller](https://www.ruby-forum.com/t/how-to-access-nested-params-in-controller/171407)

<div class="topic-metadata">

**Author:** [@khagimoto](https://www.ruby-forum.com/u/khagimoto)\
**Replies:** 7\
**Last updated:** [July 3, 2009, 1:50am UTC](https://www.ruby-forum.com/t/how-to-access-nested-params-in-controller/171407 "2009-07-03T01:50:14Z")

</div>

Hello, I’m trying to check some value in the controller so that I can change the behavior accordingly. I have a form set up such that when submitted, the params looks like this: { “transport”=\>{ “from\_location”=\>“…

---

## [Actionmailer and i18n](https://www.ruby-forum.com/t/actionmailer-and-i18n/171469)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 0\
**Last updated:** [July 3, 2009, 1:36am UTC](https://www.ruby-forum.com/t/actionmailer-and-i18n/171469 "2009-07-03T01:36:48Z")

</div>

Hi, When sending mails often enough they are sent to another party than the current logged in user (like when commenting on a blog). It would be nice to be able to specify a local I18n for ActionMailer. There is a pl…

---

## [Can ActiveRecord use native database functions?](https://www.ruby-forum.com/t/can-activerecord-use-native-database-functions/171468)

<div class="topic-metadata">

**Author:** [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Replies:** 0\
**Last updated:** [July 3, 2009, 12:01am UTC](https://www.ruby-forum.com/t/can-activerecord-use-native-database-functions/171468 "2009-07-03T00:01:50Z")

</div>

Rails 2.3.2 I am using a legacy database (mysql) I cannot alter. I am converting a legacy app to rails. In it’s SQL, the legacy app uses the native mysql function ‘now()’ all over the place, I need to reproduce this…

---

## [Shared Model Methods](https://www.ruby-forum.com/t/shared-model-methods/171398)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 15\
**Last updated:** [July 2, 2009, 11:37pm UTC](https://www.ruby-forum.com/t/shared-model-methods/171398 "2009-07-02T23:37:53Z")

</div>

Hi all, I just have a question about shared model methods. I have a method that will be used for quite a few models in my application (once I’ve cleaned it up a bit). Where can I place shared model methods? I know …

---

## [Question about Capistrano file](https://www.ruby-forum.com/t/question-about-capistrano-file/171456)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/question-about-capistrano-file/171456 "2009-07-02T23:06:05Z")

</div>

In this link #133 Capistrano Tasks - RailsCasts It shows what would be call capistrano.txt that you have to modify. It shows Directory Structure myapp/releases myapp/current → releases/20081019001122 myapp/shared c…

---

## [Pop up form](https://www.ruby-forum.com/t/pop-up-form/171404)

<div class="topic-metadata">

**Author:** [@penelope](https://www.ruby-forum.com/u/penelope)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 10:51pm UTC](https://www.ruby-forum.com/t/pop-up-form/171404 "2009-07-02T22:51:40Z")

</div>

I need pop up the pre\_entry form, but I cannot use link\_to because I need submit the values to load the Pre-entry form. Anybody have an idea to help me? thanks view: … \<%= submit\_tag “Pre-Entry”%\> \<%= submit\_tag “…

---

## [How can I disable the memcache client in ActiveSupport](https://www.ruby-forum.com/t/how-can-i-disable-the-memcache-client-in-activesupport/171460)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 10:49pm UTC](https://www.ruby-forum.com/t/how-can-i-disable-the-memcache-client-in-activesupport/171460 "2009-07-02T22:49:36Z")

</div>

Since Rails 2.1, the memcache-client gem has been bundled with ActiveSupport. I have an app. which has a customized version of the memcache-client code, and I would like to disable the built-in memached-client. How c…

---

## [Why!? A strange instance variable in action and view](https://www.ruby-forum.com/t/why-a-strange-instance-variable-in-action-and-view/171440)

<div class="topic-metadata">

**Author:** [@dandan](https://www.ruby-forum.com/u/dandan)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/why-a-strange-instance-variable-in-action-and-view/171440 "2009-07-02T22:42:43Z")

</div>

I have a controller promos. When the edit action is called the following error is given - Called id for nil, which would mistakenly be 4 – if you really wanted the id of nil, use object\_id For simplicity the controll…

---

## [ActionController::InvalidAuthenticityToken in UserController](https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken-in-usercontroller/171464)

<div class="topic-metadata">

**Author:** [@nsputnik](https://www.ruby-forum.com/u/nsputnik)\
**Replies:** 0\
**Last updated:** [July 2, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken-in-usercontroller/171464 "2009-07-02T22:25:15Z")

</div>

Please help, i’m getting the following error: ActionController::InvalidAuthenticityToken in UserController#register ActionController::InvalidAuthenticityToken RAILS\_ROOT: /home/nick/Desktop/Learning\_Rails/New\_Rails A…

---

## [Has\_many through problem](https://www.ruby-forum.com/t/has-many-through-problem/171461)

<div class="topic-metadata">

**Author:** [@Lee\_DSoSSSSjgi](https://www.ruby-forum.com/u/Lee_DSoSSSSjgi)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 10:18pm UTC](https://www.ruby-forum.com/t/has-many-through-problem/171461 "2009-07-02T22:18:45Z")

</div>

Hi, I have pretty generic user/role models linked through an Authorization model using has\_many :through =\> … but I’m having difficulty getting it to work the way I expect it to. When I instantiate a new role I can…

---

## [Validates\_uniqueness\_of and attr\_readonly](https://www.ruby-forum.com/t/validates-uniqueness-of-and-attr-readonly/171459)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 0\
**Last updated:** [July 2, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-and-attr-readonly/171459 "2009-07-02T22:14:16Z")

</div>

I notice that I always want to prevent the unique key of a table from being changed. Does that mean I always have to have attr\_readonly right after validates\_uniqueness\_of ? Is there a single function that replaces …

---

## [Excellent Opening for ROR Professionals](https://www.ruby-forum.com/t/excellent-opening-for-ror-professionals/171385)

<div class="topic-metadata">

**Author:** [@bharti-deshpande458](https://www.ruby-forum.com/u/bharti-deshpande458)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/excellent-opening-for-ror-professionals/171385 "2009-07-02T21:42:32Z")

</div>

Hi All, We are Cipher Technologies. A leading software development company in Nagpur. We have an urgent opening for Team Lead Ruby on Rails professionals. Experience will be 3.5 Yrs to 5 Yrs. Job Location: Nagpur T…

---

## [Database Update Outside of Rails](https://www.ruby-forum.com/t/database-update-outside-of-rails/171457)

<div class="topic-metadata">

**Author:** [@rilindo\_foster](https://www.ruby-forum.com/u/rilindo_foster)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 9:14pm UTC](https://www.ruby-forum.com/t/database-update-outside-of-rails/171457 "2009-07-02T21:14:29Z")

</div>

Hi! Hopefully my subject is not too obtuse. :slight\_smile: I am looking to collect log data into a database for server analysis. I know for a fact that the data will be used by my non-technical peers, so Rails is perfe…

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

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