# Rails

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

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

---

## [CSS file + Background images + facebook](https://www.ruby-forum.com/t/css-file-background-images-facebook/184405)

<div class="topic-metadata">

**Author:** [@Jonhy\_P](https://www.ruby-forum.com/u/Jonhy_P)\
**Replies:** 0\
**Last updated:** [March 2, 2010, 1:25am UTC](https://www.ruby-forum.com/t/css-file-background-images-facebook/184405 "2010-03-02T01:25:52Z")

</div>

Hello, I’m building a facebook app using rails 3.2.5 and facebooker and I’m having some trouble with background images in my CSS file. In my css file I have the following: #head { background: transparent url(/image…

---

## [Merging Spree and BrowserCMS for my app](https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052)

<div class="topic-metadata">

**Author:** [@magpie](https://www.ruby-forum.com/u/magpie)\
**Replies:** 2\
**Last updated:** [March 2, 2010, 12:31am UTC](https://www.ruby-forum.com/t/merging-spree-and-browsercms-for-my-app/175052 "2010-03-02T00:31:37Z")

</div>

Hello All, I have a fixed price contract to develop a website for a training organisation that will show courses they offer, dates, times and venues when they run. There is also a fair amount of typical CMS content, …

---

## [No reasonable output created from Rails app](https://www.ruby-forum.com/t/no-reasonable-output-created-from-rails-app/184394)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 3\
**Last updated:** [March 1, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/no-reasonable-output-created-from-rails-app/184394 "2010-03-01T23:24:08Z")

</div>

Hi All, I’ve got a Rails app that I broke by adding some code from a book. To unravel this I tried to just get something working but only got an error message. I expected the following code to transfer control to th…

---

## [Assert\_select\_rjs testing question](https://www.ruby-forum.com/t/assert-select-rjs-testing-question/184399)

<div class="topic-metadata">

**Author:** [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 11:07pm UTC](https://www.ruby-forum.com/t/assert-select-rjs-testing-question/184399 "2010-03-01T23:07:09Z")

</div>

I’m using assert\_select\_rjs for testing my RJS code. If my RJS code is: page.replace\_html “errors”, “” + @item.errors.full\_messages.to\_s + “” I know that I can test it like so: assert\_select\_rjs :replace\_html, “erro…

---

## [Rendering an action (with layout) into a Javascript template](https://www.ruby-forum.com/t/rendering-an-action-with-layout-into-a-javascript-template/184332)

<div class="topic-metadata">

**Author:** [@tristan](https://www.ruby-forum.com/u/tristan)\
**Replies:** 2\
**Last updated:** [March 1, 2010, 8:29pm UTC](https://www.ruby-forum.com/t/rendering-an-action-with-layout-into-a-javascript-template/184332 "2010-03-01T20:29:06Z")

</div>

Hi everyone I have an action: def index @settings = Setting.all(:order =\> ‘name’) respond\_to do |format| format.html format.js end end and corresponding views: index.html.erb: Settings ... index.js.erb $("\<%=…

---

## [Model associations and optimization problem](https://www.ruby-forum.com/t/model-associations-and-optimization-problem/184383)

<div class="topic-metadata">

**Author:** [@benol](https://www.ruby-forum.com/u/benol)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 8:21pm UTC](https://www.ruby-forum.com/t/model-associations-and-optimization-problem/184383 "2010-03-01T20:21:29Z")

</div>

Hi. Any way to write this more efficiently? Can I make the active record handle this through some kind of association? @images = \[\] current\_user.foo\_models.each do |foo| @images.concat(foo.images) end Any help appr…

---

## [Data in json ruby on rails and Extjs](https://www.ruby-forum.com/t/data-in-json-ruby-on-rails-and-extjs/177104)

<div class="topic-metadata">

**Author:** [@markror2009](https://www.ruby-forum.com/u/markror2009)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 8:00pm UTC](https://www.ruby-forum.com/t/data-in-json-ruby-on-rails-and-extjs/177104 "2010-03-01T20:00:26Z")

</div>

Hi all, I start to use ruby on rails with Extjs, in a controller i put this code respond\_to do |format| format.html format.ext\_json { render :json =\> Collection.find(:all).to\_ext\_json(:class =\> Collection) } end a…

---

## [Upload progress bar with Paperclip, Mongrel, Apache](https://www.ruby-forum.com/t/upload-progress-bar-with-paperclip-mongrel-apache/184382)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 7:59pm UTC](https://www.ruby-forum.com/t/upload-progress-bar-with-paperclip-mongrel-apache/184382 "2010-03-01T19:59:24Z")

</div>

Hello all, I’ve been looking now for several days for an easy to use progress bar plugin or tutorial. I have Paperclip installed and it works great. My production server runs on Apache and Mongrel. It’s amazing that…

---

## [Unit Testing with ActiveRecord External Database Tables](https://www.ruby-forum.com/t/unit-testing-with-activerecord-external-database-tables/184374)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 6:16pm UTC](https://www.ruby-forum.com/t/unit-testing-with-activerecord-external-database-tables/184374 "2010-03-01T18:16:21Z")

</div>

I want to perform unit tests but the model object in question is actually linked to an external database table. So I don’t actually have the database table in my local database which I need to run unit tests. Any idea…

---

## [Redirection rule 301 on routes.rb](https://www.ruby-forum.com/t/redirection-rule-301-on-routes-rb/184309)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 4\
**Last updated:** [March 1, 2010, 5:38pm UTC](https://www.ruby-forum.com/t/redirection-rule-301-on-routes-rb/184309 "2010-03-01T17:38:56Z")

</div>

hi, i have created a redirection controller for redirect old pages of another previous site: ####### start code ###### class RedirectController \< ApplicationController def index headers\[“Status”\] = “301 Moved Perman…

---

## [Correct value doesn't get selected in select](https://www.ruby-forum.com/t/correct-value-doesnt-get-selected-in-select/184368)

<div class="topic-metadata">

**Author:** [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/correct-value-doesnt-get-selected-in-select/184368 "2010-03-01T17:24:41Z")

</div>

Hi, I’ve got a Form with a select helper, but the value in the database doesn’t get selected: The name of the model is “special\_tip” and belongs to a special\_quest\_option and a special\_quest \<% form\_for special\_tip …

---

## [Ajax.updater problem](https://www.ruby-forum.com/t/ajax-updater-problem/184142)

<div class="topic-metadata">

**Author:** [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Replies:** 10\
**Last updated:** [March 1, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/ajax-updater-problem/184142 "2010-03-01T17:17:09Z")

</div>

Hi everyone IÂ´know that it is not a ajax forum, but Im using ajax ina program created with rails code and I think that IÂ´m not the unique person who use the Ajax. UpdaterPeriodically. My problem is that my program …

---

## [Blog and comment](https://www.ruby-forum.com/t/blog-and-comment/184362)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 4\
**Last updated:** [March 1, 2010, 5:11pm UTC](https://www.ruby-forum.com/t/blog-and-comment/184362 "2010-03-01T17:11:48Z")

</div>

Hello everyone, I’d like to implement a blog on my site. I can do this easily enough using the built in scaffolding, and then amend it accordingly. However, I’d quite like users to be able to comment on blogs, and to …

---

## [Dependency loading confusion](https://www.ruby-forum.com/t/dependency-loading-confusion/184360)

<div class="topic-metadata">

**Author:** [@Adam\_CigSSSSnek](https://www.ruby-forum.com/u/Adam_CigSSSSnek)\
**Replies:** 4\
**Last updated:** [March 1, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/dependency-loading-confusion/184360 "2010-03-01T16:25:35Z")

</div>

Hey guys, I have a module Foo::Bar, which extends ActiveRecord::Base with some custom functionality. This module is in lib/foo/bar.rb. Inside this file is also the code, that includes the module into ActiveRecord::Ba…

---

## [Web service client code layout -- standard practice](https://www.ruby-forum.com/t/web-service-client-code-layout-standard-practice/184305)

<div class="topic-metadata">

**Author:** [@smarter](https://www.ruby-forum.com/u/smarter)\
**Replies:** 4\
**Last updated:** [March 1, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/web-service-client-code-layout-standard-practice/184305 "2010-03-01T14:45:44Z")

</div>

Hi: Where do you all think the web service client code (for a REST service) access fit in a Rails App? Models are what Controllers call and should probably do so now also even though its Non-Active Record. However, …

---

## [ActiveRecord validation erros with cucumber/webrat](https://www.ruby-forum.com/t/activerecord-validation-erros-with-cucumber-webrat/184358)

<div class="topic-metadata">

**Author:** [@zloy](https://www.ruby-forum.com/u/zloy)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/activerecord-validation-erros-with-cucumber-webrat/184358 "2010-03-01T14:45:28Z")

</div>

Hi, I’m implementing user registration Cucumber scenario. Intentionally leaving CAPTCHA solution field empty I expect to pass my custom THEN I should see “Captcha solution could not be blank” (not exactly that messag…

---

## [RJS error:TypeError: arrow is null](https://www.ruby-forum.com/t/rjs-error-arrow-is-null/184356)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 1:43pm UTC](https://www.ruby-forum.com/t/rjs-error-arrow-is-null/184356 "2010-03-01T13:43:26Z")

</div>

when i tried to click a button called option uit is showing a pop up with error “RJS error:TypeError: arrow is null” when i click ok then it shows what is given below.pls help me crm.flick(“empty”, “toggle”); …

---

## [MatchData providing unexpected result](https://www.ruby-forum.com/t/matchdata-providing-unexpected-result/184310)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 2\
**Last updated:** [March 1, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/matchdata-providing-unexpected-result/184310 "2010-03-01T12:13:18Z")

</div>

Hi, Below are two tests of using MatchData. The first is essentially Hal Futon’s taken from The Ruby Way, 2nd. ed. \[Thanks, Hal\]. In particular, m\[0\] returns the string being searched. The 2nd is my humble use. For …

---

## [Stubbing CAPTCHA to pass Cucumber scenario](https://www.ruby-forum.com/t/stubbing-captcha-to-pass-cucumber-scenario/184357)

<div class="topic-metadata">

**Author:** [@zloy](https://www.ruby-forum.com/u/zloy)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 12:09pm UTC](https://www.ruby-forum.com/t/stubbing-captcha-to-pass-cucumber-scenario/184357 "2010-03-01T12:09:11Z")

</div>

Hi, I’m trying to start using cucumber. I’ve done login, logout scenarious, but stumbled in CAPTCHA validation on user registration page. As I get I should stub CAPTCHA validation method. I guess I should implement s…

---

## [Render - Missing Template](https://www.ruby-forum.com/t/render-missing-template/184350)

<div class="topic-metadata">

**Author:** [@Daryn](https://www.ruby-forum.com/u/Daryn)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 11:33am UTC](https://www.ruby-forum.com/t/render-missing-template/184350 "2010-03-01T11:33:31Z")

</div>

Sorry if you have had this problem many times before. I just can’t seem to find the problem. I have a budget controller with a create action like this: def create # do some things if budget.save redirect\_to(period…

---

## [Noob on Mac OS w/ MySQL Problem](https://www.ruby-forum.com/t/noob-on-mac-os-w-mysql-problem/184315)

<div class="topic-metadata">

**Author:** [@readysethack](https://www.ruby-forum.com/u/readysethack)\
**Replies:** 2\
**Last updated:** [March 1, 2010, 11:24am UTC](https://www.ruby-forum.com/t/noob-on-mac-os-w-mysql-problem/184315 "2010-03-01T11:24:09Z")

</div>

Hello everyone! I’m very much a noob (to Ruby, Rails, and even the Terminal) so bear with me. I got the following error message while trying to following a simple blog creation tutorial. Everything was going fine unti…

---

## [Detect changes with update\_attributes](https://www.ruby-forum.com/t/detect-changes-with-update-attributes/184343)

<div class="topic-metadata">

**Author:** [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Replies:** 3\
**Last updated:** [March 1, 2010, 10:34am UTC](https://www.ruby-forum.com/t/detect-changes-with-update-attributes/184343 "2010-03-01T10:34:58Z")

</div>

Hi, how can i detect changed attributes, when i’m using update\_attributes in the update method of my controller? A solution in the model would be very nice. Tanks greetings Leon

---

## [Rhtml & rails](https://www.ruby-forum.com/t/rhtml-rails/184337)

<div class="topic-metadata">

**Author:** [@david2](https://www.ruby-forum.com/u/david2)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 10:27am UTC](https://www.ruby-forum.com/t/rhtml-rails/184337 "2010-03-01T10:27:22Z")

</div>

Very nubee If you have a rails app as part of a website that has a good bit of static or close to static HTML. Where is it suggested that the static HTML reside? Should the HTML reside within the public directory of …

---

## [How to do Loging in Rails](https://www.ruby-forum.com/t/how-to-do-loging-in-rails/184335)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 10:24am UTC](https://www.ruby-forum.com/t/how-to-do-loging-in-rails/184335 "2010-03-01T10:24:26Z")

</div>

Hi My question may be too silly. But I Don’t know how to work with logging functionality in Ruby and Rails. The thing is Ruby/Rails is my first technology as a professional. I read some basics like logger.info, logge…

---

## [Wondering about combining has\_one and has\_many in one application](https://www.ruby-forum.com/t/wondering-about-combining-has-one-and-has-many-in-one-application/184318)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 1\
**Last updated:** [March 1, 2010, 10:09am UTC](https://www.ruby-forum.com/t/wondering-about-combining-has-one-and-has-many-in-one-application/184318 "2010-03-01T10:09:48Z")

</div>

I am writing an app for a foodbank. The edit screen uses a database called visit with fields of household\_id, month, year, monthly, and weekly. Household\_id is a link to another database with family records, month and…

---

## [Undefined method for Polymorphic association using Searchlogic](https://www.ruby-forum.com/t/undefined-method-for-polymorphic-association-using-searchlogic/184340)

<div class="topic-metadata">

**Author:** [@dmht81](https://www.ruby-forum.com/u/dmht81)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 9:18am UTC](https://www.ruby-forum.com/t/undefined-method-for-polymorphic-association-using-searchlogic/184340 "2010-03-01T09:18:17Z")

</div>

I am unable to call a polymorphic scope using the searchlogic plugin as it keeps on returning ‘undefined method’. I am certain it is only a problem within my project as I created a test project and I was able to call …

---

## [Nested model form problem, not saving, any help?](https://www.ruby-forum.com/t/nested-model-form-problem-not-saving-any-help/184342)

<div class="topic-metadata">

**Author:** [@Ramon\_De\_Paula\_Marq](https://www.ruby-forum.com/u/Ramon_De_Paula_Marq)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 9:18am UTC](https://www.ruby-forum.com/t/nested-model-form-problem-not-saving-any-help/184342 "2010-03-01T09:18:17Z")

</div>

I have two models, Curso and Ementa class Curso \< ActiveRecord::Base attr\_accessible :nome, :descricao, :periodo\_inscricao\_inicio, :periodo\_inscricao\_fim has\_one :ementa, :dependent =\> :destroy has\_many :turmas …

---

## [No route matches "/users//comments" with {:method=\>:post}](https://www.ruby-forum.com/t/no-route-matches-users-comments-with-method-post/184341)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 0\
**Last updated:** [March 1, 2010, 9:18am UTC](https://www.ruby-forum.com/t/no-route-matches-users-comments-with-method-post/184341 "2010-03-01T09:18:17Z")

</div>

I’m now getting- No route matches “/users//comments” with {:method=\>:post} whenever I try to submit a form for comments that is assigned to each individual user. The confusion thing is that I’m doing all this on a “ho…

---

## [Initializer or application\_controller? Where should it go?](https://www.ruby-forum.com/t/initializer-or-application-controller-where-should-it-go/184338)

<div class="topic-metadata">

**Author:** [@GoodGets](https://www.ruby-forum.com/u/GoodGets)\
**Replies:** 2\
**Last updated:** [March 1, 2010, 8:08am UTC](https://www.ruby-forum.com/t/initializer-or-application-controller-where-should-it-go/184338 "2010-03-01T08:08:39Z")

</div>

I’m changing how rails handles error messages. So I’m defining ActionView::Base.field\_error\_proc = Proc.new do etc. Where should I put this? I’ve seen examples putting it in the application\_controller, as well as c…

---

## [Couldn't find Order with ID=pending\_orders](https://www.ruby-forum.com/t/couldnt-find-order-with-id-pending-orders/183907)

<div class="topic-metadata">

**Author:** [@SachinJ](https://www.ruby-forum.com/u/SachinJ)\
**Replies:** 9\
**Last updated:** [March 1, 2010, 7:30am UTC](https://www.ruby-forum.com/t/couldnt-find-order-with-id-pending-orders/183907 "2010-03-01T07:30:02Z")

</div>

I have a Controller named Orders which has a pending\_orders method which is expected to fetch some records from the database. If i dont write a route for this method, I get the following error when i call this method. …

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

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