# Rails

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

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

---

## [Hash string to symbol](https://www.ruby-forum.com/t/hash-string-to-symbol/186382)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [April 6, 2010, 7:45am UTC](https://www.ruby-forum.com/t/hash-string-to-symbol/186382 "2010-04-06T07:45:56Z")

</div>

I found a method to convert the keys that are string to symbols. I included the file in the lib directory but when I call it it says it does not recognize the method. Ideas? class Hash Recursively replace key names…

---

## [SWM seeking new function in ActionView](https://www.ruby-forum.com/t/swm-seeking-new-function-in-actionview/186381)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 1\
**Last updated:** [April 6, 2010, 4:42am UTC](https://www.ruby-forum.com/t/swm-seeking-new-function-in-actionview/186381 "2010-04-06T04:42:41Z")

</div>

(Okay, kidding about the SWM part, and I hope the spam filters agree…) I have a three-level nested model, and can’t invoke the link\_to path for the “inner” nested pair without error. Here are the models (pardon the c…

---

## [Use ActiveSupport::Deprecation myself?](https://www.ruby-forum.com/t/use-activesupport-deprecation-myself/186371)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 1\
**Last updated:** [April 6, 2010, 1:21am UTC](https://www.ruby-forum.com/t/use-activesupport-deprecation-myself/186371 "2010-04-06T01:21:23Z")

</div>

So I have a plugin that is shared by many people. I’d really like a good way to mark certain methods as ‘deprecated’, that will be disappearing in a future version. I noticed that ActiveSupport::Deprecation seems to …

---

## [Dup translations right after lookup?](https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 2\
**Last updated:** [April 5, 2010, 11:14pm UTC](https://www.ruby-forum.com/t/dup-translations-right-after-lookup/186358 "2010-04-05T23:14:56Z")

</div>

Heya, I’ve just committed a change that has been proposed to me a while ago: http://github.com/svenfuchs/i18n/commit/43304331eb7de2f52ccf9e343f457ffa4f5dc473 Based on (Ummm, I should probably keep the author credit…

---

## ['to\_f or not to\_f', that is the matter of my question](https://www.ruby-forum.com/t/to-f-or-not-to-f-that-is-the-matter-of-my-question/186357)

<div class="topic-metadata">

**Author:** [@grar](https://www.ruby-forum.com/u/grar)\
**Replies:** 5\
**Last updated:** [April 5, 2010, 9:41pm UTC](https://www.ruby-forum.com/t/to-f-or-not-to-f-that-is-the-matter-of-my-question/186357 "2010-04-05T21:41:18Z")

</div>

What is the best practice for handling ActiveRecord attributes in logic when those attributes were allowed to be nil? I’ve been handling the possibly-nil status of my Numeric attributes in my logic by calling to\_f (to…

---

## [Activerecord sql server frustrations](https://www.ruby-forum.com/t/activerecord-sql-server-frustrations/186360)

<div class="topic-metadata">

**Author:** [@stewbawka](https://www.ruby-forum.com/u/stewbawka)\
**Replies:** 2\
**Last updated:** [April 5, 2010, 9:29pm UTC](https://www.ruby-forum.com/t/activerecord-sql-server-frustrations/186360 "2010-04-05T21:29:01Z")

</div>

First off, i’m on ubuntu trying to connect to sql server 2008… I installed the latest version of the activerecord-sqlserver-adapter gem (2.3.4). in my database.yml i first tried connecting with the mode: ADO, but got …

---

## [Rcov help please](https://www.ruby-forum.com/t/rcov-help-please/186369)

<div class="topic-metadata">

**Author:** [@mayur\_sk](https://www.ruby-forum.com/u/mayur_sk)\
**Replies:** 0\
**Last updated:** [April 5, 2010, 8:56pm UTC](https://www.ruby-forum.com/t/rcov-help-please/186369 "2010-04-05T20:56:49Z")

</div>

when i try to rub the command “rake test:units:rcov --trace” i get the following message any suggestions thanks. error i get : C:\\Projects\\FranklinAnywhere\>rake test:units:rcov --trace (in C:/Projects/FranklinAnywher…

---

## [Risk Assessment Application](https://www.ruby-forum.com/t/risk-assessment-application/186356)

<div class="topic-metadata">

**Author:** [@MattUebel](https://www.ruby-forum.com/u/MattUebel)\
**Replies:** 0\
**Last updated:** [April 5, 2010, 6:45pm UTC](https://www.ruby-forum.com/t/risk-assessment-application/186356 "2010-04-05T18:45:07Z")

</div>

I am going to be developing a Risk Assessment system for a secure environment whose database will double as an asset management system. Or at least the Risk Assessment stuff will be an outcropping of the asset managem…

---

## [Syntax error, unexpected '\\n', expecting tASSOC](https://www.ruby-forum.com/t/syntax-error-unexpected-n-expecting-tassoc/186351)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [April 5, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/syntax-error-unexpected-n-expecting-tassoc/186351 "2010-04-05T18:44:31Z")

</div>

Hey all, I get the following error. Now I know it’s related to a curly brace, but it seems that all curly braces are properly in place. So I’m not sure why I get this error: SyntaxError in DashboardController#panels …

---

## [Switching from SQLite 3 to MySQL DB gives strange redirects](https://www.ruby-forum.com/t/switching-from-sqlite-3-to-mysql-db-gives-strange-redirects/186344)

<div class="topic-metadata">

**Author:** [@Blaise](https://www.ruby-forum.com/u/Blaise)\
**Replies:** 3\
**Last updated:** [April 5, 2010, 6:35pm UTC](https://www.ruby-forum.com/t/switching-from-sqlite-3-to-mysql-db-gives-strange-redirects/186344 "2010-04-05T18:35:45Z")

</div>

Hi there, I have a site that’s been running for a few years now and I want to change the Database to MySQL from SQLite, Using yaml\_db I performed the migration fairly seamlessly, and have the site up and running with…

---

## [I18n in ruby scripts](https://www.ruby-forum.com/t/i18n-in-ruby-scripts/186355)

<div class="topic-metadata">

**Author:** [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Replies:** 0\
**Last updated:** [April 5, 2010, 6:21pm UTC](https://www.ruby-forum.com/t/i18n-in-ruby-scripts/186355 "2010-04-05T18:21:06Z")

</div>

Hello, I created a ruby script for my RubyOnRails application that send a mail to my application users. This script is executed using a cron job everyday at midnight. Ok so that part works just great. My problem is th…

---

## [How to expire cache in AR backend?](https://www.ruby-forum.com/t/how-to-expire-cache-in-ar-backend/186278)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 1\
**Last updated:** [April 5, 2010, 4:50pm UTC](https://www.ruby-forum.com/t/how-to-expire-cache-in-ar-backend/186278 "2010-04-05T16:50:23Z")

</div>

Hey, how to expire cache in AR backend i.e. after updating a translation? I think there’s a problem with cache\_key method - it simply takes the arguments passed to #translate and generates cache key based on them. Th…

---

## [Secuiyrt issue in App](https://www.ruby-forum.com/t/secuiyrt-issue-in-app/186345)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 5\
**Last updated:** [April 5, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/secuiyrt-issue-in-app/186345 "2010-04-05T16:38:06Z")

</div>

Hi, I am facing a following problem:- I have app in which user can edit his/her personal information and we are showing it on browser. Some of users has added “” javascript in name textbox. Due to this whenever I am…

---

## [Deciml](https://www.ruby-forum.com/t/deciml/186341)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 4\
**Last updated:** [April 5, 2010, 2:22pm UTC](https://www.ruby-forum.com/t/deciml/186341 "2010-04-05T14:22:55Z")

</div>

Hi In my table I have t.decimal :rent, :precision =\> 12, :scale =\> 2 But when ever I enter a large value like 1234567890333.465 To the table it is stored as 9999999999.99 I would like to know how active record…

---

## [\`test': wrong number of arguments (1 for 2) (ArgumentError)](https://www.ruby-forum.com/t/test-wrong-number-of-arguments-1-for-2-argumenterror/186348)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 1\
**Last updated:** [April 5, 2010, 2:14pm UTC](https://www.ruby-forum.com/t/test-wrong-number-of-arguments-1-for-2-argumenterror/186348 "2010-04-05T14:14:43Z")

</div>

Hi, Im trying to change the syntax of my tests to the test “some method” do … end syntax from the existing def test\_some\_method … end syntax. Im pasting my test code below. Im getting the error in the subject l…

---

## [Security issue in app](https://www.ruby-forum.com/t/security-issue-in-app/220372)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [April 5, 2010, 1:36pm UTC](https://www.ruby-forum.com/t/security-issue-in-app/220372 "2010-04-05T13:36:52Z")

</div>

Hi, I am facing a following problem:- I have app in which user can edit his/her personal information and we are showing it on browser. Some of users has added “” javascript in name textbox. Due to this whenever I am…

---

## [Css sprite best practices](https://www.ruby-forum.com/t/css-sprite-best-practices/186343)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 0\
**Last updated:** [April 5, 2010, 12:01pm UTC](https://www.ruby-forum.com/t/css-sprite-best-practices/186343 "2010-04-05T12:01:52Z")

</div>

Hi all, Last week I wrote a post “css sprite best prachticeshttp://www.huangzhimin.com/entries/190-css-sprite-best-practices”. The practices follow the idea “Convention Over Configuration” to do the css sprite autom…

---

## [Multiple foreign keys](https://www.ruby-forum.com/t/multiple-foreign-keys/186335)

<div class="topic-metadata">

**Author:** [@jcain](https://www.ruby-forum.com/u/jcain)\
**Replies:** 4\
**Last updated:** [April 5, 2010, 11:49am UTC](https://www.ruby-forum.com/t/multiple-foreign-keys/186335 "2010-04-05T11:49:34Z")

</div>

Hi, I have two players playing a game. The game has foreign keys into each player: player1\_id, player2\_id From the Player model, I can get the opponent self played if I know which player self was, but I want to agnos…

---

## [Help needed on Select Form](https://www.ruby-forum.com/t/help-needed-on-select-form/186284)

<div class="topic-metadata">

**Author:** [@ruby\_noobie](https://www.ruby-forum.com/u/ruby_noobie)\
**Replies:** 3\
**Last updated:** [April 5, 2010, 11:33am UTC](https://www.ruby-forum.com/t/help-needed-on-select-form/186284 "2010-04-05T11:33:00Z")

</div>

Dear all, I am pretty new to ruby on rails and I am supposed to create a form with a few drop down options. The first drop down option will affect the result in the data appearing in the drop down option for the secon…

---

## [Rails 3 b2+nginx report error "no such file to load -- rack"](https://www.ruby-forum.com/t/rails-3-b2-nginx-report-error-no-such-file-to-load-rack/186313)

<div class="topic-metadata">

**Author:** [@jsakuma](https://www.ruby-forum.com/u/jsakuma)\
**Replies:** 5\
**Last updated:** [April 5, 2010, 8:49am UTC](https://www.ruby-forum.com/t/rails-3-b2-nginx-report-error-no-such-file-to-load-rack/186313 "2010-04-05T08:49:23Z")

</div>

Thank you for all your help!!! \<rails 3 beta2+nginx report error “no such file to load – rack”\> I already used google to search this question when I send this message. but I did not find method of solution. ========…

---

## [Ruby-ldap timeout](https://www.ruby-forum.com/t/ruby-ldap-timeout/186185)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 4\
**Last updated:** [April 5, 2010, 7:28am UTC](https://www.ruby-forum.com/t/ruby-ldap-timeout/186185 "2010-04-05T07:28:33Z")

</div>

Hello list, Does anyone know if ruby-ldap supports connection timeouts? We have LDAP integrated into our authentication system to provide LDAP authentication as well. It works fine if you input a valid host/port and …

---

## [Rails 3 performance](https://www.ruby-forum.com/t/rails-3-performance/186319)

<div class="topic-metadata">

**Author:** [@alewis](https://www.ruby-forum.com/u/alewis)\
**Replies:** 7\
**Last updated:** [April 5, 2010, 5:40am UTC](https://www.ruby-forum.com/t/rails-3-performance/186319 "2010-04-05T05:40:53Z")

</div>

Is anyone else seeing significantly worse performance after upgrading an app to Rails3? Two datapoints after upgrading an app: an action that averages ~550ms in Rails2.3.5 averages nearly twice as long (1020ms) in…

---

## [Problems with LOG](https://www.ruby-forum.com/t/problems-with-log/186320)

<div class="topic-metadata">

**Author:** [@andersonleite](https://www.ruby-forum.com/u/andersonleite)\
**Replies:** 3\
**Last updated:** [April 5, 2010, 3:26am UTC](https://www.ruby-forum.com/t/problems-with-log/186320 "2010-04-05T03:26:26Z")

</div>

It’s probably a begginers question…but, in a controller I have: logger = Logger.new(STDOUT) logger.info "Testing logger at controller" When running my app in my machine, I can see this log in log/development.log file. …

---

## [Instead of blah/16 can i have the title there?](https://www.ruby-forum.com/t/instead-of-blah-16-can-i-have-the-title-there/186324)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 2\
**Last updated:** [April 5, 2010, 1:37am UTC](https://www.ruby-forum.com/t/instead-of-blah-16-can-i-have-the-title-there/186324 "2010-04-05T01:37:27Z")

</div>

Hey guys You know how by default the scaffold show view takes you to for ex- www.blah.com/blahs/16? How would i replace that 16 with something else?.. most preferably the title field or something What do i need to c…

---

## [RoR Folder application](https://www.ruby-forum.com/t/ror-folder-application/186325)

<div class="topic-metadata">

**Author:** [@firecube](https://www.ruby-forum.com/u/firecube)\
**Replies:** 0\
**Last updated:** [April 5, 2010, 1:24am UTC](https://www.ruby-forum.com/t/ror-folder-application/186325 "2010-04-05T01:24:19Z")

</div>

Hey, I’m wondering if there’s a Rails app that displays folders in a tree-like system to store things. Basically, something to organize stuff. I’m looking for something like how Firefox manages bookmarks - you know, …

---

## [Define\_method with dynamic attributes](https://www.ruby-forum.com/t/define-method-with-dynamic-attributes/186317)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 11\
**Last updated:** [April 4, 2010, 11:30pm UTC](https://www.ruby-forum.com/t/define-method-with-dynamic-attributes/186317 "2010-04-04T23:30:26Z")

</div>

How would I take the dynamic nature of define\_method and also use that to set attributes: define\_method ("#{ex}\_method") do self.my\_db\_attribute\_ex = value end Is there a way to set the attribute part dynamically?

---

## [Newbe question link\_to\_unless\_current](https://www.ruby-forum.com/t/newbe-question-link-to-unless-current/186297)

<div class="topic-metadata">

**Author:** [@dkowalski](https://www.ruby-forum.com/u/dkowalski)\
**Replies:** 6\
**Last updated:** [April 4, 2010, 10:25pm UTC](https://www.ruby-forum.com/t/newbe-question-link-to-unless-current/186297 "2010-04-04T22:25:20Z")

</div>

Rails newbe here: Using link\_to\_unless\_current and on my website it displays the the menu item and its entire path in () … example: home (/) about (/welcome/about) register (/users/register) … and so on. In my app…

---

## [Ruby Manor: Manor Harder - videos now available](https://www.ruby-forum.com/t/ruby-manor-manor-harder-videos-now-available/185532)

<div class="topic-metadata">

**Author:** [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Replies:** 3\
**Last updated:** [April 4, 2010, 10:16pm UTC](https://www.ruby-forum.com/t/ruby-manor-manor-harder-videos-now-available/185532 "2010-04-04T22:16:42Z")

</div>

Thanks to the herculean efforts of Murray and Final Cut Pro, we now have most of the “Ruby Manor: Manor Harder” videos online: http://rubymanor.org/harder/videos Watch them, download them, give them to all your friend…

---

## [Translate everything ok but activerecord.errors.template](https://www.ruby-forum.com/t/translate-everything-ok-but-activerecord-errors-template/186316)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 0\
**Last updated:** [April 4, 2010, 6:15pm UTC](https://www.ruby-forum.com/t/translate-everything-ok-but-activerecord-errors-template/186316 "2010-04-04T18:15:17Z")

</div>

Hi Guys, My i18n locale yml files work well for all translation except the error template header and body. What’s wrong with my yml: zh: activerecord: errors: template: header: one: “æœ‰ 1 å€‹éŒ¯èª¤ç™¼ç”Ÿï¼Œã€…

---

## [Changin of & to &amp;](https://www.ruby-forum.com/t/changin-of-to-amp/186308)

<div class="topic-metadata">

**Author:** [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Replies:** 1\
**Last updated:** [April 4, 2010, 3:59pm UTC](https://www.ruby-forum.com/t/changin-of-to-amp/186308 "2010-04-04T15:59:15Z")

</div>

i have in varible people-&-culture want to show it people-&-culture any special function to change in to html except gsub()

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

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