# Rails

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

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

---

## [Haml tag](https://www.ruby-forum.com/t/haml-tag/166031)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 0\
**Last updated:** [April 21, 2009, 6:51am UTC](https://www.ruby-forum.com/t/haml-tag/166031 "2009-04-21T06:51:26Z")

</div>

hi all any one know what is haml:loud and haml:silent when it is used?

---

## [How to I see SQL trace when using (a) rails console & (b) running rspec tests?](https://www.ruby-forum.com/t/how-to-i-see-sql-trace-when-using-a-rails-console-b-running-rspec-tests/166018)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [April 21, 2009, 4:48am UTC](https://www.ruby-forum.com/t/how-to-i-see-sql-trace-when-using-a-rails-console-b-running-rspec-tests/166018 "2009-04-21T04:48:34Z")

</div>

Hi, I’d like to know how to monitor the SQL calls (from ActiveRecord) for both the cases: (a) using rails console \[development mode\], and (b) running rspec tests \[test mode\] How can I do this? For item (a) I recol…

---

## [Can anyone give a quick explaination](https://www.ruby-forum.com/t/can-anyone-give-a-quick-explaination/165916)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 3\
**Last updated:** [April 21, 2009, 2:55am UTC](https://www.ruby-forum.com/t/can-anyone-give-a-quick-explaination/165916 "2009-04-21T02:55:02Z")

</div>

Hey all! I’ve got an app on a shared host at the moment. They load ruby gems into a dir onto my space: home/myusername/ruby/ gems/gems and recommend that you include this path by adding it to the load\_path like so: $…

---

## [Using Paperclip::Processor and RMagick to sharpen my thumbnails](https://www.ruby-forum.com/t/using-paperclip-processor-and-rmagick-to-sharpen-my-thumbnails/165747)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 6\
**Last updated:** [April 21, 2009, 1:55am UTC](https://www.ruby-forum.com/t/using-paperclip-processor-and-rmagick-to-sharpen-my-thumbnails/165747 "2009-04-21T01:55:23Z")

</div>

Hi, I’m brand new to RMagick (and pretty new to Rails for that matter!). Right now, site owners are allowed to upload product and ingredient photos to the website. Everything works great, ingredients are sized down an…

---

## [:mem\_cache\_store and memcache-client](https://www.ruby-forum.com/t/mem-cache-store-and-memcache-client/109125)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 2\
**Last updated:** [April 21, 2009, 1:53am UTC](https://www.ruby-forum.com/t/mem-cache-store-and-memcache-client/109125 "2009-04-21T01:53:06Z")

</div>

Seems to not be working in that there is no error, but my Rails app is not keeping track of any session. Fragment cache is working, however. I have tried many different ways, but just can’t get this to work. My memcac…

---

## [Opening a image located outside the public folder](https://www.ruby-forum.com/t/opening-a-image-located-outside-the-public-folder/166014)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [April 21, 2009, 1:44am UTC](https://www.ruby-forum.com/t/opening-a-image-located-outside-the-public-folder/166014 "2009-04-21T01:44:51Z")

</div>

Hello! Can anyone help me on how to open an image on the browser NOT located in the public folder. I am using the tag, but the image doesn’t opens because it’s outside the public folder. Thanks, Elías

---

## [Accessing Models via Views](https://www.ruby-forum.com/t/accessing-models-via-views/165920)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [April 21, 2009, 12:08am UTC](https://www.ruby-forum.com/t/accessing-models-via-views/165920 "2009-04-21T00:08:21Z")

</div>

Hi When creating a view to display infromation obtained from a model, should the view always get this information from the controller, or should it get it directly from the model? For example, say I have Class and St…

---

## [Nested params issue with Rack 1.0 / Unable to freeze Rails](https://www.ruby-forum.com/t/nested-params-issue-with-rack-1-0-unable-to-freeze-rails/166001)

<div class="topic-metadata">

**Author:** [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/nested-params-issue-with-rack-1-0-unable-to-freeze-rails/166001 "2009-04-20T23:10:07Z")

</div>

Hi, I have a very strange issue. I upgraded my Application to Rails 2.3.2 without any problems, then freezed it to vendor/rails and worked through all my specs after I also upgraded Rspec to 1.2.4. At some point (I c…

---

## [Any plugin to send email asyncronously in the background](https://www.ruby-forum.com/t/any-plugin-to-send-email-asyncronously-in-the-background/165991)

<div class="topic-metadata">

**Author:** [@ajay](https://www.ruby-forum.com/u/ajay)\
**Replies:** 5\
**Last updated:** [April 20, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/any-plugin-to-send-email-asyncronously-in-the-background/165991 "2009-04-20T22:30:28Z")

</div>

We would like to queue our emails and send them outside of the application using an external SMTP provider. Any plugin out there which will do this for us? I would like to explore before we go all out & write our own…

---

## [Running a specific migration](https://www.ruby-forum.com/t/running-a-specific-migration/148353)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 10:29pm UTC](https://www.ruby-forum.com/t/running-a-specific-migration/148353 "2009-04-20T22:29:17Z")

</div>

Hi all, I’m working on a large rails projects that has a lot of migration files (around 80). Through some development quirk, probably due to bad svn merging, my local database hasn’t run migration 63. Is there a way …

---

## [Ruby + Postgres = Bad Idea or Good Idea?](https://www.ruby-forum.com/t/ruby-postgres-bad-idea-or-good-idea/165813)

<div class="topic-metadata">

**Author:** [@sporb](https://www.ruby-forum.com/u/sporb)\
**Replies:** 25\
**Last updated:** [April 20, 2009, 9:39pm UTC](https://www.ruby-forum.com/t/ruby-postgres-bad-idea-or-good-idea/165813 "2009-04-20T21:39:27Z")

</div>

Hello, We’re making a development decision soon to use Ruby to develop a front end for our system. The backend currently runs on Postgresql. Some contractors are pushing us to change the backend database to MySQL, …

---

## [Redirect\_to results in "syntax error" for \<!DOCTYPE HTML...\>](https://www.ruby-forum.com/t/redirect-to-results-in-syntax-error-for-doctype-html/165917)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 4\
**Last updated:** [April 20, 2009, 9:23pm UTC](https://www.ruby-forum.com/t/redirect-to-results-in-syntax-error-for-doctype-html/165917 "2009-04-20T21:23:51Z")

</div>

Hi there, I have a strange error: In a controller, I have a… redirect\_to :action =\> ‘show’ …at the end. But upon code execution, Firebug tells me: syntax error (It says that for Line 0) Does anyone have a clue …

---

## [Blackbook](https://www.ruby-forum.com/t/blackbook/160848)

<div class="topic-metadata">

**Author:** [@kivancgumrukcu](https://www.ruby-forum.com/u/kivancgumrukcu)\
**Replies:** 2\
**Last updated:** [April 20, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/blackbook/160848 "2009-04-20T20:49:08Z")

</div>

Hi, When I run the following piece of code; @gmail\_xml = Blackbook.get :username =\> ‘removed\_email\_address@domain.invalid’, :password =\> ‘pwd’, :as =\> :xml Hotmail and yahoo work fine. But with gmail I get the follow…

---

## [Problems with Rails and Postgres](https://www.ruby-forum.com/t/problems-with-rails-and-postgres/165722)

<div class="topic-metadata">

**Author:** [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/problems-with-rails-and-postgres/165722 "2009-04-20T19:25:12Z")

</div>

Hi all, i have a method that I use in the ‘after\_save’ that is implemented as follows: def verify a =11674 x = self.aui\_codigo reinc =AutoInfracao.find\_by\_sql("select age((select aui\_data\_lav from tb\_aui\_auto\_i…

---

## [Help with Data Warehouse app -- How to display data?](https://www.ruby-forum.com/t/help-with-data-warehouse-app-how-to-display-data/165843)

<div class="topic-metadata">

**Author:** [@kyle\_n](https://www.ruby-forum.com/u/kyle_n)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 7:11pm UTC](https://www.ruby-forum.com/t/help-with-data-warehouse-app-how-to-display-data/165843 "2009-04-20T19:11:43Z")

</div>

I have a “data warehouse” application I’ve been writing and I would like to solicit some assistance with how to design it. Basically, I harvest data from a lot of sources and dump them into my database. For backgroun…

---

## [\[noob question\] View error, Resource route](https://www.ruby-forum.com/t/noob-question-view-error-resource-route/165945)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 4\
**Last updated:** [April 20, 2009, 6:51pm UTC](https://www.ruby-forum.com/t/noob-question-view-error-resource-route/165945 "2009-04-20T18:51:57Z")

</div>

Hello everyone, I have a little problem, since I have change my route from resources to resource. My files look like: config/routes.rb ActionController::Routing::Routes.draw do |map| map.resource :system end app/co…

---

## [Gmaps and radio\_button](https://www.ruby-forum.com/t/gmaps-and-radio-button/165988)

<div class="topic-metadata">

**Author:** [@luigixiv](https://www.ruby-forum.com/u/luigixiv)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 6:14pm UTC](https://www.ruby-forum.com/t/gmaps-and-radio-button/165988 "2009-04-20T18:14:20Z")

</div>

Hi all I’have a problem whit radio\_buttons and button\_to\_remote, when I use them together with google\_maps. I inserted the gmaps into my project, and then when I click on a radio\_button or a button\_to\_remote it isn’t…

---

## [Problem with embedding a SWF player file in page](https://www.ruby-forum.com/t/problem-with-embedding-a-swf-player-file-in-page/196945)

<div class="topic-metadata">

**Author:** [@rubio](https://www.ruby-forum.com/u/rubio)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 5:51pm UTC](https://www.ruby-forum.com/t/problem-with-embedding-a-swf-player-file-in-page/196945 "2009-04-20T17:51:26Z")

</div>

Found a great link (Eleventyten.com is for sale | HugeDomains) describing adding Flash content (in my case playerMultipleList.swf) in a “rails” webpage. I’ve followed the instructions to a “T”, however the player doe…

---

## [Current\_user in a model observer](https://www.ruby-forum.com/t/current-user-in-a-model-observer/165982)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/current-user-in-a-model-observer/165982 "2009-04-20T17:42:20Z")

</div>

I need to get the current\_user id in my model observers: Here is the code for current\_user in the lib/authentication.rb file: module Authentication def self.included(controller) controller.send :helper\_method, :curre…

---

## [Wrap 2 error fields on one div](https://www.ruby-forum.com/t/wrap-2-error-fields-on-one-div/165985)

<div class="topic-metadata">

**Author:** [@mikki](https://www.ruby-forum.com/u/mikki)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/wrap-2-error-fields-on-one-div/165985 "2009-04-20T17:10:18Z")

</div>

Hi, help me in my problem plz. I have a following code: \<%= error\_message\_on “guestbook”, “text” %\> \<%= f.label :text, ‘Text:’ %\> \<%= f.text\_area :text %\> After validation i get HTML: Error. Text: How i can ge…

---

## [Multiple log entries when using Rails.cache](https://www.ruby-forum.com/t/multiple-log-entries-when-using-rails-cache/165773)

<div class="topic-metadata">

**Author:** [@whitespace](https://www.ruby-forum.com/u/whitespace)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/multiple-log-entries-when-using-rails-cache/165773 "2009-04-20T16:13:40Z")

</div>

I’ve started using Rails.cache, specially Rails.cache.fetch. This gives me some log entries I’m a little curious about - I hope someone can poke me in the right direction. Examples: Rails.cache.write(‘testing’, ‘…

---

## [Testing and SQL views](https://www.ruby-forum.com/t/testing-and-sql-views/165758)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 11\
**Last updated:** [April 20, 2009, 4:02pm UTC](https://www.ruby-forum.com/t/testing-and-sql-views/165758 "2009-04-20T16:02:13Z")

</div>

The tests want to execute “delete \* from TABLENAME” and this causes problems when the table is actually a view. Is there an easy way to deal with this issue?

---

## [Application.html.erb problem](https://www.ruby-forum.com/t/application-html-erb-problem/165973)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 5\
**Last updated:** [April 20, 2009, 3:56pm UTC](https://www.ruby-forum.com/t/application-html-erb-problem/165973 "2009-04-20T15:56:22Z")

</div>

Hi, This may be a silly question to ask. But as performance issues start popping up I had no other go other than searching for a solution. I’ve application.html.erb where i’ve defined the layout of my whole project, …

---

## [Problems upgrading from 2.2.2 to 2.3.2 - uninitialized constant ActionController::Failsafe (NameErr](https://www.ruby-forum.com/t/problems-upgrading-from-2-2-2-to-2-3-2-uninitialized-constant-actioncontroller-failsafe-nameerr/165899)

<div class="topic-metadata">

**Author:** [@dkam](https://www.ruby-forum.com/u/dkam)\
**Replies:** 4\
**Last updated:** [April 20, 2009, 2:13pm UTC](https://www.ruby-forum.com/t/problems-upgrading-from-2-2-2-to-2-3-2-uninitialized-constant-actioncontroller-failsafe-nameerr/165899 "2009-04-20T14:13:05Z")

</div>

Hi Guys, I’m trying to get my app up to rails 2.3.2, but I have a problem - I can’t start the app with Mongrel or Thin, and the “rake middleware” all return the same error. I’m using the edge version of rails so my n…

---

## [Xxx.valid? still true after xxx.errors.add(...)?](https://www.ruby-forum.com/t/xxx-valid-still-true-after-xxx-errors-add/165954)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 3\
**Last updated:** [April 20, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/xxx-valid-still-true-after-xxx-errors-add/165954 "2009-04-20T14:10:52Z")

</div>

Hi all I have the following code in my controller: if @comment.valid? captcha\_url = “http://captchator.com/captcha/check\_answer/#{captcha\_code}/#{@comment.captcha}” result = open(captcha\_url) unless result.read ==…

---

## [Procesos en background](https://www.ruby-forum.com/t/procesos-en-background/165972)

<div class="topic-metadata">

**Author:** [@chimorito](https://www.ruby-forum.com/u/chimorito)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 2:04pm UTC](https://www.ruby-forum.com/t/procesos-en-background/165972 "2009-04-20T14:04:50Z")

</div>

Muy buenas, estoy interesado en realizar ciertas tareas de mi aplicacion en un segundo plano, como por ejemplo la eleccion del usuario del dia. He estado informandome de como funciona cron y las distintas herramientas…

---

## [User defined model and validations?](https://www.ruby-forum.com/t/user-defined-model-and-validations/165967)

<div class="topic-metadata">

**Author:** [@rsrsrs](https://www.ruby-forum.com/u/rsrsrs)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 1:02pm UTC](https://www.ruby-forum.com/t/user-defined-model-and-validations/165967 "2009-04-20T13:02:08Z")

</div>

I am trying to wrap my head around an idea and would appreciate any input from rails geniuses out there I would like to allow an admin user to define data that should be in a template, and then allow regular users to …

---

## [Need help with controller/show.html.erb](https://www.ruby-forum.com/t/need-help-with-controller-show-html-erb/165947)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 20, 2009, 12:41pm UTC](https://www.ruby-forum.com/t/need-help-with-controller-show-html-erb/165947 "2009-04-20T12:41:03Z")

</div>

Hello, I am attempting to display data in the requseraccount form, from the divisions table. For example: I have a division\_id field in requseraccount that works great. No issues getting this populated from my create…

---

## [Referencing associated records in a named scope](https://www.ruby-forum.com/t/referencing-associated-records-in-a-named-scope/165965)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 12:24pm UTC](https://www.ruby-forum.com/t/referencing-associated-records-in-a-named-scope/165965 "2009-04-20T12:24:47Z")

</div>

Hi all I have a situation like this: class Country has\_many :policy\_indicator\_ratings has\_many :policy\_indicators, :through =\> :policy\_indicator\_ratings class PolicyIndicatorRating belongs\_to :country belongs\_to :…

---

## [Using collection\<\< on has\_many with :conditions](https://www.ruby-forum.com/t/using-collection-on-has-many-with-conditions/165963)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 0\
**Last updated:** [April 20, 2009, 12:09pm UTC](https://www.ruby-forum.com/t/using-collection-on-has-many-with-conditions/165963 "2009-04-20T12:09:24Z")

</div>

Hi. I have a has\_many relation with a hashed condition, taking from the RI doc: :conditions Specify the conditions that the associated objects must meet in order to be included as a WHERE SQL fragment, such as pric…

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

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