# Rails

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

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

---

## [Date validation how to chech ArgumentError](https://www.ruby-forum.com/t/date-validation-how-to-chech-argumenterror/169792)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [June 9, 2009, 8:41am UTC](https://www.ruby-forum.com/t/date-validation-how-to-chech-argumenterror/169792 "2009-06-09T08:41:33Z")

</div>

I wrote in my user model : def validate errors.add(:born\_on, “is invalid”) if Proc.new { |user| DateTime.parse(user.born\_on) } end it’s wrong I know, running in the console raises an ArgumentError Loading develop…

---

## [Rendering a View Creates Session](https://www.ruby-forum.com/t/rendering-a-view-creates-session/169806)

<div class="topic-metadata">

**Author:** [@randall](https://www.ruby-forum.com/u/randall)\
**Replies:** 1\
**Last updated:** [June 9, 2009, 7:02am UTC](https://www.ruby-forum.com/t/rendering-a-view-creates-session/169806 "2009-06-09T07:02:31Z")

</div>

I have a controller action that I am disabling via: “session :off” I am noticing that a session is created when this action’s view is rendered. Specifically, a session is created when this line in my view code is exe…

---

## [NameError what is it?](https://www.ruby-forum.com/t/nameerror-what-is-it/169811)

<div class="topic-metadata">

**Author:** [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Replies:** 3\
**Last updated:** [June 9, 2009, 6:14am UTC](https://www.ruby-forum.com/t/nameerror-what-is-it/169811 "2009-06-09T06:14:37Z")

</div>

I have the following code in app/controllers/processjobs\_controller.rb class ProcessJobsController \<ApplicationController def index @ProcessJobs = ProcessJobs.find(:all) end end This is my route file … ActionCon…

---

## [Sale, pop and product](https://www.ruby-forum.com/t/sale-pop-and-product/168975)

<div class="topic-metadata">

**Author:** [@steux](https://www.ruby-forum.com/u/steux)\
**Replies:** 4\
**Last updated:** [June 9, 2009, 5:56am UTC](https://www.ruby-forum.com/t/sale-pop-and-product/168975 "2009-06-09T05:56:46Z")

</div>

Hi, I couldn’t find a better word for pop, but let’s go: There are 3 models: sale, pop and product sale: -total:integer pop: -quantity:integer -discount:float product: -name:string -price:float A sale can have…

---

## [Dynamically connecting a model to databases in a running appâ€¦?](https://www.ruby-forum.com/t/dynamically-connecting-a-model-to-databases-in-a-running-appa/169793)

<div class="topic-metadata">

**Author:** [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Replies:** 2\
**Last updated:** [June 9, 2009, 1:06am UTC](https://www.ruby-forum.com/t/dynamically-connecting-a-model-to-databases-in-a-running-appa/169793 "2009-06-09T01:06:54Z")

</div>

Hi All, I’ve read many of the existing questions/threads on this subject, but keep in mind that none of them have directly addressed my issue – or they have yet to be answered. Also keep in mind that this is NOT a si…

---

## [How can i get attribute values from xml using libxml](https://www.ruby-forum.com/t/how-can-i-get-attribute-values-from-xml-using-libxml/169777)

<div class="topic-metadata">

**Author:** [@lecielbleu](https://www.ruby-forum.com/u/lecielbleu)\
**Replies:** 4\
**Last updated:** [June 9, 2009, 12:23am UTC](https://www.ruby-forum.com/t/how-can-i-get-attribute-values-from-xml-using-libxml/169777 "2009-06-09T00:23:39Z")

</div>

Hi , i have xml document like this \<?xml version="1.0" encoding="ISO-8859-9"?\> … then i have to use Category attribute but reader class couldnt recognize attributes when i use these codes below for testing; while r…

---

## [Why do restful\_authentication generated rspec tests fail?](https://www.ruby-forum.com/t/why-do-restful-authentication-generated-rspec-tests-fail/169717)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 5\
**Last updated:** [June 8, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/why-do-restful-authentication-generated-rspec-tests-fail/169717 "2009-06-08T23:12:02Z")

</div>

Been searching online for an answer to this without success - also been digging through the documentation but I’m still very new to rails. I started a brand new app (rails 2.3.2), then the first thing I did was insta…

---

## [Distributed models](https://www.ruby-forum.com/t/distributed-models/169801)

<div class="topic-metadata">

**Author:** [@slava](https://www.ruby-forum.com/u/slava)\
**Replies:** 0\
**Last updated:** [June 8, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/distributed-models/169801 "2009-06-08T23:06:54Z")

</div>

Hello, I am designing a web application that has several tiers including a Flex client, Rails server and SAP back-end. The application is an extension of functionality offered by SAP system. SOAP services are used …

---

## [How to get value from view?](https://www.ruby-forum.com/t/how-to-get-value-from-view/169753)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 2\
**Last updated:** [June 8, 2009, 10:51pm UTC](https://www.ruby-forum.com/t/how-to-get-value-from-view/169753 "2009-06-08T22:51:05Z")

</div>

Hello all, I have following problem, I have a view called “new\_sub\_type.html.haml” and controller “SubscriptionTypes”. In this view i’m showing a dropdown list of subscription types. When user submit form, I show an…

---

## [SSL before or after submit?](https://www.ruby-forum.com/t/ssl-before-or-after-submit/169769)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 4\
**Last updated:** [June 8, 2009, 9:08pm UTC](https://www.ruby-forum.com/t/ssl-before-or-after-submit/169769 "2009-06-08T21:08:34Z")

</div>

A general question regarding SSL and login. Does it matter if a login form is not passed through SSL when sent to the user browser but the post action is? Will the password be sent through SSL in this case?

---

## [How to edit a pluggin? (acts\_as\_taggable\_on)](https://www.ruby-forum.com/t/how-to-edit-a-pluggin-acts-as-taggable-on/168666)

<div class="topic-metadata">

**Author:** [@aupayo](https://www.ruby-forum.com/u/aupayo)\
**Replies:** 4\
**Last updated:** [June 8, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/how-to-edit-a-pluggin-acts-as-taggable-on/168666 "2009-06-08T20:08:14Z")

</div>

Hello, I’m trying to modificate the acts\_as\_taggable\_on pluggin, so when you search various tags (Eg: User.tagged\_with(“fish, cat”, :on =\> :animals), it looks for users with BOTH tags, not just one of them. I have ed…

---

## [Running jQuery and prototype scripts together](https://www.ruby-forum.com/t/running-jquery-and-prototype-scripts-together/168780)

<div class="topic-metadata">

**Author:** [@lyntaff](https://www.ruby-forum.com/u/lyntaff)\
**Replies:** 3\
**Last updated:** [June 8, 2009, 8:03pm UTC](https://www.ruby-forum.com/t/running-jquery-and-prototype-scripts-together/168780 "2009-06-08T20:03:52Z")

</div>

Hi I have a rails appplication that uses jquery and prototype for different features. When adding the jquery library it seems all features in the application that uses prototype stop working. Should this happen? and…

---

## [Problem with set-cookie?](https://www.ruby-forum.com/t/problem-with-set-cookie/169752)

<div class="topic-metadata">

**Author:** [@joya](https://www.ruby-forum.com/u/joya)\
**Replies:** 2\
**Last updated:** [June 8, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/problem-with-set-cookie/169752 "2009-06-08T19:17:59Z")

</div>

Hello everyone, I’m a beginner in Ruby on Rails and I have a little problem when I update my application RoR in my server. Can you help me please? My problem is: When I code my application in my computer: It’s ok. W…

---

## [Use of Models - The Very Basics](https://www.ruby-forum.com/t/use-of-models-the-very-basics/169723)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 5\
**Last updated:** [June 8, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/use-of-models-the-very-basics/169723 "2009-06-08T18:47:39Z")

</div>

Embarrassingly, I must admit that I have never understood models. I am hoping that with this post I can clear up a basic question that will allow me to get a toe-hold into understanding models. The basic question is…

---

## [How do i model this in Rails? (put down java equivalent design)](https://www.ruby-forum.com/t/how-do-i-model-this-in-rails-put-down-java-equivalent-design/169691)

<div class="topic-metadata">

**Author:** [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Replies:** 3\
**Last updated:** [June 8, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/how-do-i-model-this-in-rails-put-down-java-equivalent-design/169691 "2009-06-08T18:42:57Z")

</div>

Hello guys, Need help!! Finding it hard to model the ‘model’ :stuck\_out\_tongue: within the given rails associations. In java terms, my requirements are… There are 3 entities - module, chapter and activity. Chapter e…

---

## [Iconv::InvalidEncoding (""ISO-8859-1"", "UTF-8")](https://www.ruby-forum.com/t/iconv-invalidencoding-iso-8859-1-utf-8/169712)

<div class="topic-metadata">

**Author:** [@ariel](https://www.ruby-forum.com/u/ariel)\
**Replies:** 1\
**Last updated:** [June 8, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/iconv-invalidencoding-iso-8859-1-utf-8/169712 "2009-06-08T18:25:54Z")

</div>

Hi, I’m having the error: Iconv::InvalidEncoding: invalid encoding ("“ISO-8859-1"”, “UTF-8”) when trying to post via Mechanize. It used to work just fine, but the error appeared after (I think) upgrading to Rails 2.3…

---

## [To deploy or not to deploy on App Engine](https://www.ruby-forum.com/t/to-deploy-or-not-to-deploy-on-app-engine/169773)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 2\
**Last updated:** [June 8, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/to-deploy-or-not-to-deploy-on-app-engine/169773 "2009-06-08T18:25:17Z")

</div>

I am nearing the end on a project i have been working on and am trying to figure out where to host it. I am very tempted to host it on google’s app engine. you get a ton of space, band width, and processor all for fre…

---

## [cPanel Ruby Gems](https://www.ruby-forum.com/t/cpanel-ruby-gems/157838)

<div class="topic-metadata">

**Author:** [@rpierry](https://www.ruby-forum.com/u/rpierry)\
**Replies:** 11\
**Last updated:** [June 8, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/cpanel-ruby-gems/157838 "2009-06-08T17:31:33Z")

</div>

Hi, I am trying to install will\_paginate along with other plugins/gems. However it seems I have version 1.1.1 of Ruby Gems. I try updating it by ‘gem install rubygems-update’ but I get an error, \[\*\*\*@cluster1 \*\*\*\]$ g…

---

## [Rails Code Indentation](https://www.ruby-forum.com/t/rails-code-indentation/169573)

<div class="topic-metadata">

**Author:** [@san2821](https://www.ruby-forum.com/u/san2821)\
**Replies:** 15\
**Last updated:** [June 8, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/rails-code-indentation/169573 "2009-06-08T16:26:40Z")

</div>

Hi All, Rails code must be readable, formatted and well indented. I wanted to do indent code in my previous projects. Is there any built in rails plugin/gem that can help me to indent my existing code. Any ideas wil…

---

## [{ActionController\] Default route naming](https://www.ruby-forum.com/t/actioncontroller-default-route-naming/169587)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [June 8, 2009, 3:49pm UTC](https://www.ruby-forum.com/t/actioncontroller-default-route-naming/169587 "2009-06-08T15:49:14Z")

</div>

I have discovered that if a named resources entry does not have a plural form then ActionController::Routing uses route\_name\_index instead. However, I cannot seem to find any place in the API where this is mentioned. …

---

## [Printing out Cucumber step definitions](https://www.ruby-forum.com/t/printing-out-cucumber-step-definitions/169779)

<div class="topic-metadata">

**Author:** [@Demetrius\_Nunes](https://www.ruby-forum.com/u/Demetrius_Nunes)\
**Replies:** 0\
**Last updated:** [June 8, 2009, 3:36pm UTC](https://www.ruby-forum.com/t/printing-out-cucumber-step-definitions/169779 "2009-06-08T15:36:05Z")

</div>

Hi there, After a few years of almost complete silence, I’m back at blogging about Ruby and Rails-related stuff again. For a first post, I’m showing a rake task you can use if you want to print out Cucumber step def…

---

## [ActiveRecord Classes](https://www.ruby-forum.com/t/activerecord-classes/169722)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 17\
**Last updated:** [June 8, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/activerecord-classes/169722 "2009-06-08T15:27:14Z")

</div>

I’m having a little trouble with understanding how to work out the schematic for some of my classes using ActiveRecord when a file is in my lib directory: Brief example: Here’s the outline of the files in use: …app …

---

## [Getting an exception in actionpack: "invalid byte sequence in US-ASCII" with ruby 1.9](https://www.ruby-forum.com/t/getting-an-exception-in-actionpack-invalid-byte-sequence-in-us-ascii-with-ruby-1-9/169090)

<div class="topic-metadata">

**Author:** [@Travis\_Reeder](https://www.ruby-forum.com/u/Travis_Reeder)\
**Replies:** 1\
**Last updated:** [June 8, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/getting-an-exception-in-actionpack-invalid-byte-sequence-in-us-ascii-with-ruby-1-9/169090 "2009-06-08T15:17:13Z")

</div>

After upgrading to Ruby 1.9 and Passenger, we started getting this while uploading a binary data file through a form. I’m not sure if it’s ruby 1.9 or passenger, but either way, any help would be greatly appreciated. …

---

## [Send a array of objects from a view](https://www.ruby-forum.com/t/send-a-array-of-objects-from-a-view/169633)

<div class="topic-metadata">

**Author:** [@jsierra](https://www.ruby-forum.com/u/jsierra)\
**Replies:** 2\
**Last updated:** [June 8, 2009, 3:06pm UTC](https://www.ruby-forum.com/t/send-a-array-of-objects-from-a-view/169633 "2009-06-08T15:06:37Z")

</div>

Hi everyone. I´m working on application that has a “has\_and\_belongs\_to\_many” betwen two models: “expedientes” and “documentos”. When I´m on the console, I need to pass a Expedientes Array to documentos, otherwise I g…

---

## [How to add these headers to a xml response](https://www.ruby-forum.com/t/how-to-add-these-headers-to-a-xml-response/169760)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 2\
**Last updated:** [June 8, 2009, 2:35pm UTC](https://www.ruby-forum.com/t/how-to-add-these-headers-to-a-xml-response/169760 "2009-06-08T14:35:36Z")

</div>

Hi, I need to create something like this: \<?xml version="1.0" encoding="UTF-8"?\> aQlfVHX+qPM 2009-09-19T08:14:55Z The response should contain the next headers: Content-Type=application/vnd.3gpp+xml Authenticati…

---

## [ActionMailer HTML emails appear as HTML code in email client](https://www.ruby-forum.com/t/actionmailer-html-emails-appear-as-html-code-in-email-client/169770)

<div class="topic-metadata">

**Author:** [@creativetags](https://www.ruby-forum.com/u/creativetags)\
**Replies:** 1\
**Last updated:** [June 8, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/actionmailer-html-emails-appear-as-html-code-in-email-client/169770 "2009-06-08T14:30:43Z")

</div>

Hi I’m trying to send multipart emails with something like this: Taken from ActionMailer::Base \[code=\] class ApplicationMailer \< ActionMailer::Base def signup\_notification(recipient) recipients recipient.email\_…

---

## [Will\_paginate links have broken urls](https://www.ruby-forum.com/t/will-paginate-links-have-broken-urls/169755)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [June 8, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/will-paginate-links-have-broken-urls/169755 "2009-06-08T14:11:19Z")

</div>

hey folks I have a page that used to have a url in this sort of form /resources/browse/property\_ids\[\]=72&property\_ids\[\]=722 I changed the format to be nicer - using the name of the properties and seperating with a + …

---

## [Need help 'observe\_field' to work in Safari or Konqueror](https://www.ruby-forum.com/t/need-help-observe-field-to-work-in-safari-or-konqueror/169728)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 4\
**Last updated:** [June 8, 2009, 1:48pm UTC](https://www.ruby-forum.com/t/need-help-observe-field-to-work-in-safari-or-konqueror/169728 "2009-06-08T13:48:51Z")

</div>

Hi, I have a form with two drop down menus. Depending on what the user selects in the first, the second should be populated accordingly. Here is the code I am using to do this. View (test.html.erb): \<% form\_for :ap…

---

## [Remove special characters from sentence](https://www.ruby-forum.com/t/remove-special-characters-from-sentence/169740)

<div class="topic-metadata">

**Author:** [@san2821](https://www.ruby-forum.com/u/san2821)\
**Replies:** 2\
**Last updated:** [June 8, 2009, 11:24am UTC](https://www.ruby-forum.com/t/remove-special-characters-from-sentence/169740 "2009-06-08T11:24:25Z")

</div>

Hi All, What is regular expression to remove special chars from a sentence and replace spaces with hypen ?? Thanks, Sandip R~ Ruby on Rails Developer

---

## [Passenger on Ruby EE](https://www.ruby-forum.com/t/passenger-on-ruby-ee/169748)

<div class="topic-metadata">

**Author:** [@Nuwan\_Chaturanga](https://www.ruby-forum.com/u/Nuwan_Chaturanga)\
**Replies:** 0\
**Last updated:** [June 8, 2009, 9:57am UTC](https://www.ruby-forum.com/t/passenger-on-ruby-ee/169748 "2009-06-08T09:57:27Z")

</div>

I Installed Passenger with Ruby EE. Now I have 2 ruby locations. /opt/rubyee/bin /usr/lib/ruby do I still want to keep both these locations. Can I get rid of the old ruby libs (i.e /usr/lib/ruby ). thanks in advance…

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

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