# Rails

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

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

---

## [Rubyonrails security issues?](https://www.ruby-forum.com/t/rubyonrails-security-issues/117068)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 8\
**Last updated:** [October 14, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/rubyonrails-security-issues/117068 "2007-10-14T17:04:43Z")

</div>

Hello there, While working on a project, I notice something very weird :S If I type this in the URL http://localhost:3000/my/friends/index/5 it changed all the URL :S:S:S:S http://localhost:3000/my/friends/index/5?g…

---

## [Environment variables](https://www.ruby-forum.com/t/environment-variables/117062)

<div class="topic-metadata">

**Author:** [@Leo\_Tolstoy](https://www.ruby-forum.com/u/Leo_Tolstoy)\
**Replies:** 3\
**Last updated:** [October 14, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/environment-variables/117062 "2007-10-14T17:01:47Z")

</div>

Can anyone help me to find out the syntax to access the environment variable that has the site domain? Maybe HTTP\_HOST? i have tried to find documentation on how to access such a variable, but with no luck. Can someon…

---

## [Salted Hash vs Login Sugar vs acts\_as\_authenticated](https://www.ruby-forum.com/t/salted-hash-vs-login-sugar-vs-acts-as-authenticated/117196)

<div class="topic-metadata">

**Author:** [@fredistic](https://www.ruby-forum.com/u/fredistic)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/salted-hash-vs-login-sugar-vs-acts-as-authenticated/117196 "2007-10-14T16:53:01Z")

</div>

So which of these login systems are currently supported and work with rails 1.2.4 and 1.2.5 ? And which will work with rails 2.0? Anybody actually check the security of any of these? Fred

---

## [Protecting fields from being changed](https://www.ruby-forum.com/t/protecting-fields-from-being-changed/117169)

<div class="topic-metadata">

**Author:** [@Luzzy](https://www.ruby-forum.com/u/Luzzy)\
**Replies:** 6\
**Last updated:** [October 14, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/protecting-fields-from-being-changed/117169 "2007-10-14T16:29:01Z")

</div>

Hi all, I am familiar with attr\_accessible. But lately I have realised that it doesnt do exactly what I want it to do. Once a user is created on the system, I want to prevent the person from changing their username. …

---

## [Naming join models for has\_many :through](https://www.ruby-forum.com/t/naming-join-models-for-has-many-through/117189)

<div class="topic-metadata">

**Author:** [@mikeoligny](https://www.ruby-forum.com/u/mikeoligny)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/naming-join-models-for-has-many-through/117189 "2007-10-14T15:51:36Z")

</div>

Hi, I’m having trouble naming my join models. The tables in question are: stores (list of company branches / stocking locations) items (inventory items) items\_stores (item xyz is stocked by store\_id 7, their re-order …

---

## [Get webpage body by HTTPS](https://www.ruby-forum.com/t/get-webpage-body-by-https/117176)

<div class="topic-metadata">

**Author:** [@esox\_ch](https://www.ruby-forum.com/u/esox_ch)\
**Replies:** 1\
**Last updated:** [October 14, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/get-webpage-body-by-https/117176 "2007-10-14T15:00:41Z")

</div>

Hello, I need to get the HTML content of a website which can be accessed by HTTPS. I tried to use require ‘net/http’ uri=“https://website.com” url = URI.parse(uri) req = Net::HTTP::Get.new(url.path) https = Net::…

---

## [Conflict with Mail Queue and Engines?](https://www.ruby-forum.com/t/conflict-with-mail-queue-and-engines/79304)

<div class="topic-metadata">

**Author:** [@subimage](https://www.ruby-forum.com/u/subimage)\
**Replies:** 6\
**Last updated:** [October 14, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/conflict-with-mail-queue-and-engines/79304 "2007-10-14T12:11:10Z")

</div>

I’m trying to use the Mail Queue plugin from: ruby script/plugin install svn://rubyforge.org/var/svn/mail-queue When I try to deliver an email I’m getting the following stack trace. Looks like it’s conflicting with en…

---

## [Why Active vs Action?](https://www.ruby-forum.com/t/why-active-vs-action/117174)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 10:23am UTC](https://www.ruby-forum.com/t/why-active-vs-action/117174 "2007-10-14T10:23:06Z")

</div>

Just wondering what the relevance is of Active vs Action prefixes to the Rails libraries? I get Active Record likely comes from Fowler’s Enterprise Patterns book, but what semantic difference does an Active lib vs an …

---

## [ActiveRecord and Form Data Coupling: A Bad Design](https://www.ruby-forum.com/t/activerecord-and-form-data-coupling-a-bad-design/117170)

<div class="topic-metadata">

**Author:** [@ProfKheel](https://www.ruby-forum.com/u/ProfKheel)\
**Replies:** 3\
**Last updated:** [October 14, 2007, 10:18am UTC](https://www.ruby-forum.com/t/activerecord-and-form-data-coupling-a-bad-design/117170 "2007-10-14T10:18:26Z")

</div>

I have to say that after being a Rails user for some time I have grown to really dislike how ActiveRecord (AR) classes - models - are being pushed as the defacto method for getting form data into the DB. The two conc…

---

## [\[ANN\] Ruby/Informix 0.6.1 released](https://www.ruby-forum.com/t/ann-ruby-informix-0-6-1-released/117162)

<div class="topic-metadata">

**Author:** [@Gerardo\_S](https://www.ruby-forum.com/u/Gerardo_S)\
**Replies:** 5\
**Last updated:** [October 14, 2007, 7:54am UTC](https://www.ruby-forum.com/t/ann-ruby-informix-0-6-1-released/117162 "2007-10-14T07:54:40Z")

</div>

This is a maintenance release to fix a bug triggered while working with Ruby on Rails and Informix. Web site: http://ruby-informix.rubyforge.org Changelog: 0.6.1 13/10/2007 Bugs fixed: \* Database#columns was retur…

---

## [Fixtures not reloading for every test](https://www.ruby-forum.com/t/fixtures-not-reloading-for-every-test/117143)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 1\
**Last updated:** [October 14, 2007, 7:53am UTC](https://www.ruby-forum.com/t/fixtures-not-reloading-for-every-test/117143 "2007-10-14T07:53:38Z")

</div>

For some reason my fixtures are not reloading their data after each test method. I’ve read that this is supposed to be the case so that I can work with clean data for every test, but it isn’t happening. I have checked…

---

## [Fixtures not re-loading per test method](https://www.ruby-forum.com/t/fixtures-not-re-loading-per-test-method/117149)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 2\
**Last updated:** [October 14, 2007, 7:52am UTC](https://www.ruby-forum.com/t/fixtures-not-re-loading-per-test-method/117149 "2007-10-14T07:52:54Z")

</div>

For some reason my fixtures are not reloading their data after each test method. I’ve read that this is supposed to be the case so that I can work with clean data for every test, but it isn’t happening. I have checked…

---

## [Form field --display :decimal 0.0 as 0.00, or blank?](https://www.ruby-forum.com/t/form-field-display-decimal-0-0-as-0-00-or-blank/117144)

<div class="topic-metadata">

**Author:** [@tharrison](https://www.ruby-forum.com/u/tharrison)\
**Replies:** 3\
**Last updated:** [October 14, 2007, 5:17am UTC](https://www.ruby-forum.com/t/form-field-display-decimal-0-0-as-0-00-or-blank/117144 "2007-10-14T05:17:32Z")

</div>

Howdy – I have a price field in my db, :decimal, :null =\> false, :default =\> 0 When I open a new form field to create a new record, this value is displayed as “0.0”. This is not so pretty for a field in which a pri…

---

## [Overriding reflected AR attributes](https://www.ruby-forum.com/t/overriding-reflected-ar-attributes/117150)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [October 14, 2007, 5:12am UTC](https://www.ruby-forum.com/t/overriding-reflected-ar-attributes/117150 "2007-10-14T05:12:52Z")

</div>

OK, so I get ActiveRecord determines model attributes through reflection of the table schema. Handy for many cases, but not mine. I need to override that and provide my own mapping of attribute names (for use in all a…

---

## ["Can't convert string to number" - error](https://www.ruby-forum.com/t/cant-convert-string-to-number-error/117166)

<div class="topic-metadata">

**Author:** [@Vikrant\_C](https://www.ruby-forum.com/u/Vikrant_C)\
**Replies:** 2\
**Last updated:** [October 14, 2007, 5:08am UTC](https://www.ruby-forum.com/t/cant-convert-string-to-number-error/117166 "2007-10-14T05:08:11Z")

</div>

Hi, I have a Model for my\_table table which serialises a column named serialised\_column serialised\_column contains an array object, which contains hash objects something like serialised\_column = \[{‘name’ =\> ‘this’},…

---

## [Validations.rb:81 error](https://www.ruby-forum.com/t/validations-rb-81-error/117134)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 4\
**Last updated:** [October 14, 2007, 4:57am UTC](https://www.ruby-forum.com/t/validations-rb-81-error/117134 "2007-10-14T04:57:40Z")

</div>

In my Mongrel logs, I am getting this: …active\_record/validations.rb:81: warning: Object#type is deprecated; use Object#class That piece of code is: def add\_on\_blank(attributes, msg = @@default\_error\_messages\[:blank\]…

---

## [Foreign keys in YAML fixtures](https://www.ruby-forum.com/t/foreign-keys-in-yaml-fixtures/116797)

<div class="topic-metadata">

**Author:** [@elemental](https://www.ruby-forum.com/u/elemental)\
**Replies:** 3\
**Last updated:** [October 14, 2007, 2:46am UTC](https://www.ruby-forum.com/t/foreign-keys-in-yaml-fixtures/116797 "2007-10-14T02:46:42Z")

</div>

Hi all, I’m trying to set up my test fixtures, and I’ve recently added foreign keys to my database. Each “channel” is owned by a user, so I need to include a valid user id with each fixture. I’m not sure how to set …

---

## [Endless Redirects with Ssl\_Requirement](https://www.ruby-forum.com/t/endless-redirects-with-ssl-requirement/117113)

<div class="topic-metadata">

**Author:** [@knb](https://www.ruby-forum.com/u/knb)\
**Replies:** 3\
**Last updated:** [October 14, 2007, 1:33am UTC](https://www.ruby-forum.com/t/endless-redirects-with-ssl-requirement/117113 "2007-10-14T01:33:39Z")

</div>

I’m running an application on mongrel with apache 2.2.3. SSL works fine when I enter an https manually. But when I use the plugin, I get an endless redirect. Got the same error when I tried running the following simpl…

---

## [Development Environment Problem](https://www.ruby-forum.com/t/development-environment-problem/117147)

<div class="topic-metadata">

**Author:** [@MrLipid](https://www.ruby-forum.com/u/MrLipid)\
**Replies:** 4\
**Last updated:** [October 14, 2007, 1:30am UTC](https://www.ruby-forum.com/t/development-environment-problem/117147 "2007-10-14T01:30:43Z")

</div>

Here’s the message I get when I try to start a development environment?: Loading development environment. D:/INSTAN~1/ruby/lib/ruby/1.8/yaml.rb:133:in ‘load’:ArgumentError: syntax error on line 18, col 2: ’ host: loc…

---

## [Aliasing field names in validators](https://www.ruby-forum.com/t/aliasing-field-names-in-validators/117142)

<div class="topic-metadata">

**Author:** [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Replies:** 2\
**Last updated:** [October 13, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/aliasing-field-names-in-validators/117142 "2007-10-13T21:23:25Z")

</div>

suppose i have a model: class Foo belongs\_to :some\_customized\_bar validates\_presence\_of :some\_customized\_bar\_id end if i use ‘error\_messages\_for :foo’ in a view, i’ll get errors like: “Some customized bar can’t be …

---

## [Strange Rails Behaviour with MySQL (delete cascade)](https://www.ruby-forum.com/t/strange-rails-behaviour-with-mysql-delete-cascade/117112)

<div class="topic-metadata">

**Author:** [@havatar](https://www.ruby-forum.com/u/havatar)\
**Replies:** 5\
**Last updated:** [October 13, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/strange-rails-behaviour-with-mysql-delete-cascade/117112 "2007-10-13T19:43:45Z")

</div>

hi, i have a problem that involve mysql. i habe two tables: groups,ranks ranks have a foraign key from groups with delete on cascade. In my ranks migration i use this execute ‘ALTER TABLE ranks ADD FOREIGN KEY (group…

---

## [Not sure if I'm doing post :update correctly in test](https://www.ruby-forum.com/t/not-sure-if-im-doing-post-update-correctly-in-test/117107)

<div class="topic-metadata">

**Author:** [@onemind](https://www.ruby-forum.com/u/onemind)\
**Replies:** 2\
**Last updated:** [October 13, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/not-sure-if-im-doing-post-update-correctly-in-test/117107 "2007-10-13T19:23:59Z")

</div>

Hello Rubyists, I have this functional test which is failing, and I’m not sure why. def test\_update #Grab the post we want to update get :edit, :id =\> @first\_id assert\_response :success assert\_template ‘edit’ #Pos…

---

## [Capistrano 2 error with DB server](https://www.ruby-forum.com/t/capistrano-2-error-with-db-server/117078)

<div class="topic-metadata">

**Author:** [@whitewolfaustria](https://www.ruby-forum.com/u/whitewolfaustria)\
**Replies:** 1\
**Last updated:** [October 13, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/capistrano-2-error-with-db-server/117078 "2007-10-13T19:10:30Z")

</div>

Hi all I am trying to set up capistrano and it is failing when it tries to call an svn command on the db server, where svn is not installed. Here is the error message. ================================================…

---

## [Restful Resource routes with parameters and page caching](https://www.ruby-forum.com/t/restful-resource-routes-with-parameters-and-page-caching/117137)

<div class="topic-metadata">

**Author:** [@lukeredpath](https://www.ruby-forum.com/u/lukeredpath)\
**Replies:** 3\
**Last updated:** [October 13, 2007, 7:04pm UTC](https://www.ruby-forum.com/t/restful-resource-routes-with-parameters-and-page-caching/117137 "2007-10-13T19:04:39Z")

</div>

I’m trying to set up a restful route where an Album resource has a singletone Artwork resource. Sounds simple enough: map.resources :albums do |album| album.resource :artwork, :controller =\> ‘artwork’, :format =\> ‘jp…

---

## [ActionMailer Attach Original Message](https://www.ruby-forum.com/t/actionmailer-attach-original-message/117108)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 1\
**Last updated:** [October 13, 2007, 5:28pm UTC](https://www.ruby-forum.com/t/actionmailer-attach-original-message/117108 "2007-10-13T17:28:08Z")

</div>

I have a mailer setup to receive messages for processing data. If the message sent is not correct then I send back an email telling the user of their problem. I want to attach the original message and I have it sort o…

---

## [Depreciation help needed!](https://www.ruby-forum.com/t/depreciation-help-needed/117100)

<div class="topic-metadata">

**Author:** [@fxp](https://www.ruby-forum.com/u/fxp)\
**Replies:** 11\
**Last updated:** [October 13, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/depreciation-help-needed/117100 "2007-10-13T17:08:17Z")

</div>

I’m pretty new to RoR and need some help making my applications 2.0 compliant. I have several applications that I wrote under 1.1.3, but I don’t have the test folders for them, and “rake test” doesn’t seem to work. I’…

---

## [Abstract\_class... what exactly does it do](https://www.ruby-forum.com/t/abstract-class-what-exactly-does-it-do/117077)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [October 13, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/abstract-class-what-exactly-does-it-do/117077 "2007-10-13T14:51:28Z")

</div>

Hi, Does anyone know much about abstract\_class? Does it actually prevent instances of the class from being created? Does it disable certain methods? I already know what it’s for, but I want to know what setting self.…

---

## [Saving a related object](https://www.ruby-forum.com/t/saving-a-related-object/117083)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 1\
**Last updated:** [October 13, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/saving-a-related-object/117083 "2007-10-13T14:13:58Z")

</div>

Hello, I have two models. A and B. A belongs\_to B (and B has\_one A). I have one form for creating both an A and a B, so I do: a = A.new(params\[:a\]) a.b = B.new(params\[:b\]) if a.save… and it works as intended, both…

---

## [Upgrading from Rails 1.2.3 to 1.2.5](https://www.ruby-forum.com/t/upgrading-from-rails-1-2-3-to-1-2-5/117128)

<div class="topic-metadata">

**Author:** [@CCH](https://www.ruby-forum.com/u/CCH)\
**Replies:** 2\
**Last updated:** [October 13, 2007, 12:39pm UTC](https://www.ruby-forum.com/t/upgrading-from-rails-1-2-3-to-1-2-5/117128 "2007-10-13T12:39:21Z")

</div>

Being adventurous having my first Rails appplication in production since August 2007, I read about the impending Rails 2.0 release. As I understand it, there was to be a 1.2.4 release and it was supposed to be mostly …

---

## [Related content with Tags or textual descriptions](https://www.ruby-forum.com/t/related-content-with-tags-or-textual-descriptions/117126)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 0\
**Last updated:** [October 13, 2007, 11:28am UTC](https://www.ruby-forum.com/t/related-content-with-tags-or-textual-descriptions/117126 "2007-10-13T11:28:35Z")

</div>

I have 10,000+ contents on my website, all of which are tagged with acts\_as\_taggable. Each content also has its own textual description. When viewing a content, how can I bring up other related content – sorted by sim…

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

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