# Rails

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

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

---

## [Restful routes, deciding nesting/session](https://www.ruby-forum.com/t/restful-routes-deciding-nesting-session/110164)

<div class="topic-metadata">

**Author:** [@joenova](https://www.ruby-forum.com/u/joenova)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/restful-routes-deciding-nesting-session/110164 "2007-07-23T21:42:18Z")

</div>

I am running edge and am torn on whether to use the nesting of 1.) / users/1/books or 2.) /books (and assume current\_user). Also, #1 allows for /books (without a current user) where #2 does not. #1 avoids the current…

---

## [Escaping Data to Prevent XSS When It Gets Stored](https://www.ruby-forum.com/t/escaping-data-to-prevent-xss-when-it-gets-stored/110162)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 9:37pm UTC](https://www.ruby-forum.com/t/escaping-data-to-prevent-xss-when-it-gets-stored/110162 "2007-07-23T21:37:57Z")

</div>

It seems to me that escaping data about to appear in a view in an rhtml template using h / html\_escape is further downstream than you really want to be escaping certain data. Wouldn’t it make more sense to escape dat…

---

## [Dynamically determine environment?](https://www.ruby-forum.com/t/dynamically-determine-environment/110143)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 3\
**Last updated:** [July 23, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/dynamically-determine-environment/110143 "2007-07-23T21:30:31Z")

</div>

Does anyone know what the syntax is to determine the current environment (prod, dev, etc.) in code?

---

## [Themes - overriding layouts](https://www.ruby-forum.com/t/themes-overriding-layouts/110159)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/themes-overriding-layouts/110159 "2007-07-23T21:23:33Z")

</div>

i am currently working with the them plugin, and am having some problems getting multiple layouts to work correctly… i have two different layouts in the theme/layout directory, but only one of them seems to be working…

---

## [Mirko Homepage](https://www.ruby-forum.com/t/mirko-homepage/110156)

<div class="topic-metadata">

**Author:** [@Mirko48](https://www.ruby-forum.com/u/Mirko48)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 9:22pm UTC](https://www.ruby-forum.com/t/mirko-homepage/110156 "2007-07-23T21:22:01Z")

</div>

http://mirko-homepage.de.tl

---

## [How do you determine the MIME type for a file?](https://www.ruby-forum.com/t/how-do-you-determine-the-mime-type-for-a-file/110148)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 1\
**Last updated:** [July 23, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/how-do-you-determine-the-mime-type-for-a-file/110148 "2007-07-23T21:20:56Z")

</div>

What’s the best way to determine the mime type of a file given it’s path?

---

## [DEPRECATED\_INSTANCE\_VARIABLES error deploying frozen edge ap](https://www.ruby-forum.com/t/deprecated-instance-variables-error-deploying-frozen-edge-ap/110157)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/deprecated-instance-variables-error-deploying-frozen-edge-ap/110157 "2007-07-23T21:16:42Z")

</div>

My frozen edge app won’t run in production (ruby 1.8.5, typical apache -\> mongrel\_cluster) In mongrel.log, I get an error reporting an unitialized constant ‘ActionController::Base::DEPRECATED\_INSTANCE\_VARIABLES’ so R…

---

## [Class\_cache has got me stumped](https://www.ruby-forum.com/t/class-cache-has-got-me-stumped/110158)

<div class="topic-metadata">

**Author:** [@Nicholas\_Barthelemy](https://www.ruby-forum.com/u/Nicholas_Barthelemy)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/class-cache-has-got-me-stumped/110158 "2007-07-23T21:13:32Z")

</div>

I was working on a project this weekend and came across an issue that hung me up for hours. The application will have an area to manage contacts, so I have a Person model, which has\_many email\_addresses, among other t…

---

## [Sending email](https://www.ruby-forum.com/t/sending-email/110121)

<div class="topic-metadata">

**Author:** [@nagesh](https://www.ruby-forum.com/u/nagesh)\
**Replies:** 1\
**Last updated:** [July 23, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/sending-email/110121 "2007-07-23T19:18:57Z")

</div>

i had generated the controller as: class EmailerController \< ApplicationController def sendmail email = @params\[“email”\] recipient = email\[recipient\] subject = email\[subject\] message = email\[message\] Emailer.deliv…

---

## [Capture in rails to get javascript variable value](https://www.ruby-forum.com/t/capture-in-rails-to-get-javascript-variable-value/110138)

<div class="topic-metadata">

**Author:** [@avenasatira](https://www.ruby-forum.com/u/avenasatira)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 7:15pm UTC](https://www.ruby-forum.com/t/capture-in-rails-to-get-javascript-variable-value/110138 "2007-07-23T19:15:27Z")

</div>

\<% @JSvar = capture do %\>JSvar\<% end %\> \<%= @JSvar %\> how do i get capture to capture the actual variable value?

---

## [Rails web site](https://www.ruby-forum.com/t/rails-web-site/110139)

<div class="topic-metadata">

**Author:** [@Slant](https://www.ruby-forum.com/u/Slant)\
**Replies:** 1\
**Last updated:** [July 23, 2007, 7:11pm UTC](https://www.ruby-forum.com/t/rails-web-site/110139 "2007-07-23T19:11:20Z")

</div>

Who can I contact with problems regarding formatting or typo problems on rubyonrails.org? (i.e.: http://manuals.rubyonrails.com/ - the rails logo has the anchor blue border around it in Firefox, at least) typos or in…

---

## [Swapping css for browser resolution- reference screen width?](https://www.ruby-forum.com/t/swapping-css-for-browser-resolution-reference-screen-width/110140)

<div class="topic-metadata">

**Author:** [@avenasatira](https://www.ruby-forum.com/u/avenasatira)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/swapping-css-for-browser-resolution-reference-screen-width/110140 "2007-07-23T18:44:57Z")

</div>

Hello. I’m currently saddened I cant reference the browser width in ruby. I’m trying to use a periodically\_call\_remote function to trigger a ruby function to change my css based on screen resolutions, but i cant pull …

---

## [I want my login and logout actions to not change the page](https://www.ruby-forum.com/t/i-want-my-login-and-logout-actions-to-not-change-the-page/110136)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/i-want-my-login-and-logout-actions-to-not-change-the-page/110136 "2007-07-23T18:26:43Z")

</div>

I implemented a user login/logout system from this tutorial: http://www.aidanf.net/rails\_user\_authentication\_tutorial It has seperate screens for every action: login, change password etc. When you logout it redirects …

---

## [Redner and redirect\_to](https://www.ruby-forum.com/t/redner-and-redirect-to/110125)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [July 23, 2007, 6:18pm UTC](https://www.ruby-forum.com/t/redner-and-redirect-to/110125 "2007-07-23T18:18:16Z")

</div>

I just want to get some feedback and understanding on what the differences are between render and redirect\_to. redirect\_to post the info to the page you are redirecting to and redner simple does not post, correct? Tha…

---

## [\[ANN\] Ruby East 2007 Call For Papers](https://www.ruby-forum.com/t/ann-ruby-east-2007-call-for-papers/110133)

<div class="topic-metadata">

**Author:** [@Eric\_Snyder](https://www.ruby-forum.com/u/Eric_Snyder)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 5:00pm UTC](https://www.ruby-forum.com/t/ann-ruby-east-2007-call-for-papers/110133 "2007-07-23T17:00:22Z")

</div>

The call for papers is now open for Ruby East 2007, to be held September 27-28 in Philadelphia (USA). The conference features one day of intense, real-world tutorials followed by a jam-packed day of sessions across mu…

---

## [Deployment Routing Issue](https://www.ruby-forum.com/t/deployment-routing-issue/110126)

<div class="topic-metadata">

**Author:** [@Pete\_Bekisz](https://www.ruby-forum.com/u/Pete_Bekisz)\
**Replies:** 3\
**Last updated:** [July 23, 2007, 4:50pm UTC](https://www.ruby-forum.com/t/deployment-routing-issue/110126 "2007-07-23T16:50:54Z")

</div>

Hi folks, I used Cap to deploy my first Rails app on Friday, but every time I try getting to the pages, I’m getting a 404 error. In my production.log, I keep getting an error message similar to this: “no route found …

---

## [Seek brilliant Rails programmer to add one field to acts\_as\_](https://www.ruby-forum.com/t/seek-brilliant-rails-programmer-to-add-one-field-to-acts-as/110085)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 23, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/seek-brilliant-rails-programmer-to-add-one-field-to-acts-as/110085 "2007-07-23T16:09:38Z")

</div>

I’m on the downhill side of a large project that requires an additional integer field to be added to the tag.rb in acts\_as\_taggable. I feel I have a good understanding of ActiveRecord and have performed the correct mi…

---

## [Validate\_format\_of](https://www.ruby-forum.com/t/validate-format-of/110110)

<div class="topic-metadata">

**Author:** [@qwerty73](https://www.ruby-forum.com/u/qwerty73)\
**Replies:** 5\
**Last updated:** [July 23, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/validate-format-of/110110 "2007-07-23T15:58:59Z")

</div>

Hi to all, i’m using the validate\_format\_of function… i need to check if an address is inserted in the correct way. I mean that the address must have this sintax: street namestreet square namesquare etc… I’ve look…

---

## [Strange Rendering with img\_tag](https://www.ruby-forum.com/t/strange-rendering-with-img-tag/110123)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/strange-rendering-with-img-tag/110123 "2007-07-23T15:52:39Z")

</div>

I need some advice on img\_tag() I checked in the console, and the file name of the image is stored correctly. puts a.file\_name dog\_whisper\_lowres.jpg The file is stored on the file system itself. In public/image…

---

## [How to send emails in ror application](https://www.ruby-forum.com/t/how-to-send-emails-in-ror-application/110103)

<div class="topic-metadata">

**Author:** [@nagesh](https://www.ruby-forum.com/u/nagesh)\
**Replies:** 12\
**Last updated:** [July 23, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/how-to-send-emails-in-ror-application/110103 "2007-07-23T15:35:02Z")

</div>

can anyone tell me abt how to include email option in ror application. with code plz

---

## [Acts\_as\_taggable and escaping apostrophe's](https://www.ruby-forum.com/t/acts-as-taggable-and-escaping-apostrophes/110120)

<div class="topic-metadata">

**Author:** [@piers](https://www.ruby-forum.com/u/piers)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-and-escaping-apostrophes/110120 "2007-07-23T15:34:47Z")

</div>

Hi I’ve got the acts as taggable gem installed. For the main it works great, but when someone tags something with an apostrophe in it hangs. Is there an easy way round this? An example error is: Mysql::Error: #4200…

---

## [Evaluating a variable from it's name](https://www.ruby-forum.com/t/evaluating-a-variable-from-its-name/110118)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 2\
**Last updated:** [July 23, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/evaluating-a-variable-from-its-name/110118 "2007-07-23T15:24:11Z")

</div>

If I have a string variable that contains the “name” of another variable. How can I access that other variable for both assignment and evaluation? e.g. x = 100 nameofvar = “x” I want to set the value of the variab…

---

## [Sending email](https://www.ruby-forum.com/t/sending-email/110119)

<div class="topic-metadata">

**Author:** [@nagesh](https://www.ruby-forum.com/u/nagesh)\
**Replies:** 1\
**Last updated:** [July 23, 2007, 3:02pm UTC](https://www.ruby-forum.com/t/sending-email/110119 "2007-07-23T15:02:09Z")

</div>

HI i am presently new to this ror language can you please send me the stepwise procedure for sending the email …

---

## [Validation of security code with leading zero](https://www.ruby-forum.com/t/validation-of-security-code-with-leading-zero/110117)

<div class="topic-metadata">

**Author:** [@dodgyboz](https://www.ruby-forum.com/u/dodgyboz)\
**Replies:** 2\
**Last updated:** [July 23, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/validation-of-security-code-with-leading-zero/110117 "2007-07-23T14:36:56Z")

</div>

Hi All, I am trying to validate the security codes on payment cards but I am having problems with leading zeros. I initially started off with validates\_length\_of :security\_code, :is =\> 3 however this produced some u…

---

## [Erb behavior](https://www.ruby-forum.com/t/erb-behavior/110102)

<div class="topic-metadata">

**Author:** [@dailer](https://www.ruby-forum.com/u/dailer)\
**Replies:** 5\
**Last updated:** [July 23, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/erb-behavior/110102 "2007-07-23T14:18:02Z")

</div>

I’m playing with dynamic test fixtures and seeing what seems to be odd behavior. I’m fairly new to ruby and rails so it could be something simple. I have the following fixture: \<%COUNTRY\_MAX=10%\> \<%0.upto(COUNTRY\_MAX…

---

## [Activerecord and empty find results](https://www.ruby-forum.com/t/activerecord-and-empty-find-results/110112)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 6\
**Last updated:** [July 23, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/activerecord-and-empty-find-results/110112 "2007-07-23T13:52:48Z")

</div>

is this the prefered way to render a special rhtml-file if a Record.find leads to an empty result? def dummy @users = User.find(:all, :conditions =\> “username = ‘dsr321’”) if @users.blank? redirect\_to :action =\> “em…

---

## [Permission denied on my windows xp sp2 development system](https://www.ruby-forum.com/t/permission-denied-on-my-windows-xp-sp2-development-system/110001)

<div class="topic-metadata">

**Author:** [@mischka](https://www.ruby-forum.com/u/mischka)\
**Replies:** 6\
**Last updated:** [July 23, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/permission-denied-on-my-windows-xp-sp2-development-system/110001 "2007-07-23T13:19:45Z")

</div>

Hello all, I want to test rails on my development system. I use Eclipse with the Aptana Rails Support. But when I start webrick and want to see the aplication properties I get an Error. Permission denied - ./script/……

---

## [Error re-deploying rails app with capistrano](https://www.ruby-forum.com/t/error-re-deploying-rails-app-with-capistrano/109258)

<div class="topic-metadata">

**Author:** [@welly](https://www.ruby-forum.com/u/welly)\
**Replies:** 3\
**Last updated:** [July 23, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/error-re-deploying-rails-app-with-capistrano/109258 "2007-07-23T13:13:02Z")

</div>

Hello all, I’m having a problem re-deploying a rails app with capistrano. It has been working fine previously but now it’s running into the following error: “command “sudo chgrp -R /var/www/apps/mountainboardmag.co…

---

## [Get 5$ cash for free in your paypal account](https://www.ruby-forum.com/t/get-5-cash-for-free-in-your-paypal-account/110107)

<div class="topic-metadata">

**Author:** [@newbar](https://www.ruby-forum.com/u/newbar)\
**Replies:** 0\
**Last updated:** [July 23, 2007, 11:00am UTC](https://www.ruby-forum.com/t/get-5-cash-for-free-in-your-paypal-account/110107 "2007-07-23T11:00:57Z")

</div>

get 5$ cash for free in your paypal account check it !!! http://www.cash-dreams.biz

---

## [NoMethodError in partial driving me mad](https://www.ruby-forum.com/t/nomethoderror-in-partial-driving-me-mad/109839)

<div class="topic-metadata">

**Author:** [@Pascal\_F](https://www.ruby-forum.com/u/Pascal_F)\
**Replies:** 7\
**Last updated:** [July 23, 2007, 10:57am UTC](https://www.ruby-forum.com/t/nomethoderror-in-partial-driving-me-mad/109839 "2007-07-23T10:57:48Z")

</div>

Hello, i simplified have a news model, a news category model and a news controller. my \_news.rhtml partial renders a single news entry. in my controller there are the actions show and show\_category. if the “show” ac…

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

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