# Rails

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

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

---

## [Using roles vs namespaces for admin](https://www.ruby-forum.com/t/using-roles-vs-namespaces-for-admin/130614)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 7\
**Last updated:** [April 8, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/using-roles-vs-namespaces-for-admin/130614 "2008-04-08T16:25:50Z")

</div>

Hi, As I’ve understood in Rails 2.0 it is easy to separate application functionality for different roles. Like for admins: map.namespace(:admin) do |admin| admin.resources :products, :collection =\> { :inventory =\> :…

---

## [Validation on "date"](https://www.ruby-forum.com/t/validation-on-date/134147)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/validation-on-date/134147 "2008-04-08T16:15:03Z")

</div>

hi all, im having a date part in one of my view page.i used tag for it.i set the format as mm/dd/yyyy.i want to show a validation message when user entered the date as 30/02/any year or 31/02/any year.im waiti…

---

## [404 page not found error](https://www.ruby-forum.com/t/404-page-not-found-error/134137)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 3\
**Last updated:** [April 8, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/404-page-not-found-error/134137 "2008-04-08T15:29:35Z")

</div>

Hi Everyone, I want to redirect the user to login page, when he is trying to use access unavailable page. Usually it throws me a exception error and 404 page. But here when user got 404 error he will be redirected to…

---

## [Cool hi](https://www.ruby-forum.com/t/cool-hi/134160)

<div class="topic-metadata">

**Author:** [@girl\_for\_all](https://www.ruby-forum.com/u/girl_for_all)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/cool-hi/134160 "2008-04-08T14:14:40Z")

</div>

http://www.shr33.com

---

## [Case insensitivity in assert](https://www.ruby-forum.com/t/case-insensitivity-in-assert/134129)

<div class="topic-metadata">

**Author:** [@complete](https://www.ruby-forum.com/u/complete)\
**Replies:** 4\
**Last updated:** [April 8, 2008, 12:06pm UTC](https://www.ruby-forum.com/t/case-insensitivity-in-assert/134129 "2008-04-08T12:06:27Z")

</div>

I’m only a few days old in this whiz-bang rails world, so bear with me. I’m in the middle of running functional tests, I’ve got some assert statements that check for the presence of a various tags on the page… One of …

---

## [String escape sequences in Test environment](https://www.ruby-forum.com/t/string-escape-sequences-in-test-environment/134153)

<div class="topic-metadata">

**Author:** [@Myron\_M](https://www.ruby-forum.com/u/Myron_M)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 11:56am UTC](https://www.ruby-forum.com/t/string-escape-sequences-in-test-environment/134153 "2008-04-08T11:56:30Z")

</div>

I’m attempting to use the assert valid markup plugin (http:// redgreenblu.com/svn/projects/assert\_valid\_markup/) but I’m having a really strange issue with the way my strings are handled in the test environment. I’ve…

---

## [How to handle exception in format.xml](https://www.ruby-forum.com/t/how-to-handle-exception-in-format-xml/133906)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 3\
**Last updated:** [April 8, 2008, 11:50am UTC](https://www.ruby-forum.com/t/how-to-handle-exception-in-format-xml/133906 "2008-04-08T11:50:36Z")

</div>

I am developing an API for my application. Here is the standard show method. def show @city = City.find(params\[:id\], :include =\> :state) respond\_to do |format| format.html format.xml end end For a browser based…

---

## [Preserving POST request body across authentication](https://www.ruby-forum.com/t/preserving-post-request-body-across-authentication/133997)

<div class="topic-metadata">

**Author:** [@JamesKay](https://www.ruby-forum.com/u/JamesKay)\
**Replies:** 8\
**Last updated:** [April 8, 2008, 11:42am UTC](https://www.ruby-forum.com/t/preserving-post-request-body-across-authentication/133997 "2008-04-08T11:42:44Z")

</div>

Hello, I don’t think this is something which has already been answered. Using, for example Restful authentication, sessions can time-out resulting in an authentication screen being shown. The original URI is normally…

---

## [TransactionError](https://www.ruby-forum.com/t/transactionerror/133892)

<div class="topic-metadata">

**Author:** [@Tobi\_R](https://www.ruby-forum.com/u/Tobi_R)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 11:39am UTC](https://www.ruby-forum.com/t/transactionerror/133892 "2008-04-08T11:39:48Z")

</div>

Hi Today I got an alert mail from my watcher script, telling me that there was no Mongrel running, and that it started one (so the site was down for a few seconds.) This is the first time I got this error (AFAICS), …

---

## [Undefined method \`find\_plugins' in Rails 2.0.2](https://www.ruby-forum.com/t/undefined-method-find-plugins-in-rails-2-0-2/132244)

<div class="topic-metadata">

**Author:** [@kyle](https://www.ruby-forum.com/u/kyle)\
**Replies:** 10\
**Last updated:** [April 8, 2008, 11:07am UTC](https://www.ruby-forum.com/t/undefined-method-find-plugins-in-rails-2-0-2/132244 "2008-04-08T11:07:26Z")

</div>

Hello Rails community! I just installed Rails 2.0.2. Before this, I had version 1.2.6. I have several projects that have installed plugins created by Pluginaweek. I’m not sure if my problem is Pluginaweek’s fault, or …

---

## [Design question: working with data from external source](https://www.ruby-forum.com/t/design-question-working-with-data-from-external-source/134146)

<div class="topic-metadata">

**Author:** [@artello](https://www.ruby-forum.com/u/artello)\
**Replies:** 4\
**Last updated:** [April 8, 2008, 10:57am UTC](https://www.ruby-forum.com/t/design-question-working-with-data-from-external-source/134146 "2008-04-08T10:57:23Z")

</div>

Hello, Could someone give an idea to Rails newbie? I’ve a need to do a SOAP query against remote server in my RoR application. As result of SOAP query array of strings (or hash)will be returned. But the question: ho…

---

## [Route :requirements not working?](https://www.ruby-forum.com/t/route-requirements-not-working/133095)

<div class="topic-metadata">

**Author:** [@atd](https://www.ruby-forum.com/u/atd)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 10:35am UTC](https://www.ruby-forum.com/t/route-requirements-not-working/133095 "2008-04-08T10:35:33Z")

</div>

I have the following route: map.open\_id\_complete ‘session’, { :open\_id\_complete =\> true, :requirements =\> { :method =\> :get }, :controller =\> “sessions”, :action =\> “create” } map.resource :session but when doing …

---

## [Here's some badly designed code](https://www.ruby-forum.com/t/heres-some-badly-designed-code/134034)

<div class="topic-metadata">

**Author:** [@kyrre](https://www.ruby-forum.com/u/kyrre)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 10:22am UTC](https://www.ruby-forum.com/t/heres-some-badly-designed-code/134034 "2008-04-08T10:22:29Z")

</div>

hello! i am kyrre and i’m a rails newbie. i’m trying to combine altered beast with chuckslist to create some sort of online community here in norway where i can make friends and maybe even hook up with some lovely lad…

---

## [Integrating C# component](https://www.ruby-forum.com/t/integrating-c-component/134143)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 9:54am UTC](https://www.ruby-forum.com/t/integrating-c-component/134143 "2008-04-08T09:54:51Z")

</div>

Is there a way to call c# component in Rails application? The requirement here is I need to call the crystal reports from rails application. It seams it is easy to call the crystal report viewer from .NET. If Iam rig…

---

## [JavaScriptGenerator in separate .js file, not a view](https://www.ruby-forum.com/t/javascriptgenerator-in-separate-js-file-not-a-view/134120)

<div class="topic-metadata">

**Author:** [@pahagon](https://www.ruby-forum.com/u/pahagon)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 9:28am UTC](https://www.ruby-forum.com/t/javascriptgenerator-in-separate-js-file-not-a-view/134120 "2008-04-08T09:28:08Z")

</div>

Is it possible to get some code with JavaScriptGenerator to be rendered in a separate .js file, not just put in a view with Is this possible? I haven’t found any info on this topic, my guess is that this is not poss…

---

## [Mail problem Please help](https://www.ruby-forum.com/t/mail-problem-please-help/132683)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 8:51am UTC](https://www.ruby-forum.com/t/mail-problem-please-help/132683 "2008-04-08T08:51:34Z")

</div>

Hi, I am trying to use ar\_mailer to send mail. But when i start ar\_sendmail i get the following error: Unhandled exception uninitialized constant ActionMailer::ARMailer(NameError): c:/ruby/lib/ruby/gems/1.8/gems/act…

---

## [Some help with deleting from the objects with dependencies](https://www.ruby-forum.com/t/some-help-with-deleting-from-the-objects-with-dependencies/133784)

<div class="topic-metadata">

**Author:** [@tonypm](https://www.ruby-forum.com/u/tonypm)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 8:49am UTC](https://www.ruby-forum.com/t/some-help-with-deleting-from-the-objects-with-dependencies/133784 "2008-04-08T08:49:26Z")

</div>

Would welcome some advice on this: I have customers, orders and batches. Customer has many Orders Batch has many Orders Now I want to do a batch delete, that will delete all orders in the batch and when the orders a…

---

## [Activerecord Mailing (ar\_mailer)](https://www.ruby-forum.com/t/activerecord-mailing-ar-mailer/115625)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 8:46am UTC](https://www.ruby-forum.com/t/activerecord-mailing-ar-mailer/115625 "2008-04-08T08:46:09Z")

</div>

I am trying to run ar\_mailer for mass mailings, but I canÂ´t get my server started after adding the sentence require ‘action\_mailer/ar\_mailer’ in environment.rb I am using Windows XP, Ruby 1.8.6, and Rails 1.2.3/Edge…

---

## [Planet Facebook.rb News - Get Your Ruby Blog Stories About Facebook & Friends Included](https://www.ruby-forum.com/t/planet-facebook-rb-news-get-your-ruby-blog-stories-about-facebook-friends-included/134142)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 8:23am UTC](https://www.ruby-forum.com/t/planet-facebook-rb-news-get-your-ruby-blog-stories-about-facebook-friends-included/134142 "2008-04-08T08:23:03Z")

</div>

Hello, The Planet Facebook.rb publishes Ruby stories about Facebook and friends for easy reading or subscription in a single “river of news”. Latest stories include: o Beboist - Updates and Attention o Facebook, Fac…

---

## [Foreign\_key to foreign\_key mapping](https://www.ruby-forum.com/t/foreign-key-to-foreign-key-mapping/134136)

<div class="topic-metadata">

**Author:** [@rashantha](https://www.ruby-forum.com/u/rashantha)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 8:03am UTC](https://www.ruby-forum.com/t/foreign-key-to-foreign-key-mapping/134136 "2008-04-08T08:03:07Z")

</div>

tables are created on for examples to show foreign\_key to foreign\_key one table id ss\_id name second table id false\_id name belongs\_to :falseinformation, :class\_name =\> “One”, :foreign\_key =\> “false\_id” now th…

---

## [Image broken](https://www.ruby-forum.com/t/image-broken/134127)

<div class="topic-metadata">

**Author:** [@Kyung\_won\_C](https://www.ruby-forum.com/u/Kyung_won_C)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 4:52am UTC](https://www.ruby-forum.com/t/image-broken/134127 "2008-04-08T04:52:53Z")

</div>

os: windows XP ruby: 1.8.6 gem: 1.1.0 rails: 2.0.2 mongrel: 1.1.4 I’m testing attachment\_fu plugin with file system store It’s work… but… some images(3 ~ 5) is broken at browser(IE 7) when number of images is mor…

---

## [Used send\_data() for downloading xml file, How to ask location 4 the download](https://www.ruby-forum.com/t/used-send-data-for-downloading-xml-file-how-to-ask-location-4-the-download/133751)

<div class="topic-metadata">

**Author:** [@Rakhi](https://www.ruby-forum.com/u/Rakhi)\
**Replies:** 5\
**Last updated:** [April 8, 2008, 3:32am UTC](https://www.ruby-forum.com/t/used-send-data-for-downloading-xml-file-how-to-ask-location-4-the-download/133751 "2008-04-08T03:32:22Z")

</div>

hello, i m tryin to save a xml file using send\_data( out\_data, :type =\> “text/xml”, filename =\> “sample.xml” ) where “out\_data” is the string instance that contains the generated XML, “text/xml” is the mime type to …

---

## [Ruby setup on mac](https://www.ruby-forum.com/t/ruby-setup-on-mac/133888)

<div class="topic-metadata">

**Author:** [@jmurtha](https://www.ruby-forum.com/u/jmurtha)\
**Replies:** 4\
**Last updated:** [April 8, 2008, 3:30am UTC](https://www.ruby-forum.com/t/ruby-setup-on-mac/133888 "2008-04-08T03:30:02Z")

</div>

I followed the setup instructions on hivelogic website for installing ruby on mac leopard. The trouble I am having now is that the default db is sqlite rather than mysql. I don’t know how to change my ruby config from…

---

## [Frozen rails 2.0.2 on icdsft](https://www.ruby-forum.com/t/frozen-rails-2-0-2-on-icdsft/134122)

<div class="topic-metadata">

**Author:** [@OKR](https://www.ruby-forum.com/u/OKR)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 3:18am UTC](https://www.ruby-forum.com/t/frozen-rails-2-0-2-on-icdsft/134122 "2008-04-08T03:18:21Z")

</div>

I’m trying to set up a new project on an icdsoft account but they’re still at rails 1.2.3. They unfortunately also don’t support ssh (saying it’s a security risk). I used their example php script to setup a 1.2.3 ap…

---

## [Is there a way to define "sub models" in Rails?](https://www.ruby-forum.com/t/is-there-a-way-to-define-sub-models-in-rails/134015)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 4\
**Last updated:** [April 8, 2008, 3:07am UTC](https://www.ruby-forum.com/t/is-there-a-way-to-define-sub-models-in-rails/134015 "2008-04-08T03:07:49Z")

</div>

Hi there ! Consider the following 2 initial models: ======================================== project: has\_many :tasks task: belongs\_to :project My question: Is there a way in Rails to define some sort of a “sub mode…

---

## [Nub question: \<db/create.sql?](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640)

<div class="topic-metadata">

**Author:** [@isea](https://www.ruby-forum.com/u/isea)\
**Replies:** 4\
**Last updated:** [April 8, 2008, 2:15am UTC](https://www.ruby-forum.com/t/nub-question-db-create-sql/115640 "2008-04-08T02:15:13Z")

</div>

Hello all: I am trying to get started with ROR coming from a classic ASP background. I am going step by step through “Agile Web D. with Rails” isbn 0-9766940-0-x. On page 55 I am trying backup my DDL with the fallowi…

---

## [Best javascript calendar](https://www.ruby-forum.com/t/best-javascript-calendar/134112)

<div class="topic-metadata">

**Author:** [@hangon](https://www.ruby-forum.com/u/hangon)\
**Replies:** 1\
**Last updated:** [April 7, 2008, 11:49pm UTC](https://www.ruby-forum.com/t/best-javascript-calendar/134112 "2008-04-07T23:49:34Z")

</div>

hi, whats the best javascript calendar? thanks

---

## [How to password protect CRUD pages](https://www.ruby-forum.com/t/how-to-password-protect-crud-pages/133907)

<div class="topic-metadata">

**Author:** [@bmcelhany](https://www.ruby-forum.com/u/bmcelhany)\
**Replies:** 2\
**Last updated:** [April 7, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/how-to-password-protect-crud-pages/133907 "2008-04-07T23:39:38Z")

</div>

Hi all, I’m in the process of working through my first rails app and had a general security question. For simplicity’s sake, let’s say I’ve got an Article object with all of the scaffolding-generated files (article.r…

---

## [The associations model save error](https://www.ruby-forum.com/t/the-associations-model-save-error/134077)

<div class="topic-metadata">

**Author:** [@Vincent.Z](https://www.ruby-forum.com/u/Vincent.Z)\
**Replies:** 1\
**Last updated:** [April 7, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/the-associations-model-save-error/134077 "2008-04-07T23:18:31Z")

</div>

i have the A and B model which has associations as follows: A has\_one B B belongs\_to A so,when i use the form\_for tag to input date to model A,i get error as follows: B expected, got HashWithIndifferentAccess code:…

---

## [Associations errors](https://www.ruby-forum.com/t/associations-errors/134108)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 5\
**Last updated:** [April 7, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/associations-errors/134108 "2008-04-07T23:00:49Z")

</div>

undefined method \`each’ for 0:Fixnum at line @school = School.find\_by\_title(params\[:school\_id\].gsub(’-’, " ")) for team in @school.teams … end @school does exist cause i tried with .find(:first) and it gave the sa…

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

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