# Rails

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

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

---

## [What is the lib/ folder in my rails app for?](https://www.ruby-forum.com/t/what-is-the-lib-folder-in-my-rails-app-for/177570)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 2\
**Last updated:** [October 20, 2009, 3:47pm UTC](https://www.ruby-forum.com/t/what-is-the-lib-folder-in-my-rails-app-for/177570 "2009-10-20T15:47:47Z")

</div>

hi all, When I generate a rails app, there is a lib/ folder underneath it. Now what is exactly this lib/ folder for? When I put the rack library there, it is not scanned by RoR. Actually to expand this matter, I want…

---

## [HTML table visual effect](https://www.ruby-forum.com/t/html-table-visual-effect/177513)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 4\
**Last updated:** [October 20, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/html-table-visual-effect/177513 "2009-10-20T14:24:03Z")

</div>

Hello, I have an HTML table with several rows. I want to change the row color when the user clicks it. This is quite simple to do with plain javascript, but I want to use rails. Is there any helper or something that …

---

## [Why does RakeFileUtils get mixed into ActiveRecord::Base?](https://www.ruby-forum.com/t/why-does-rakefileutils-get-mixed-into-activerecord-base/176829)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 2\
**Last updated:** [October 20, 2009, 2:21pm UTC](https://www.ruby-forum.com/t/why-does-rakefileutils-get-mixed-into-activerecord-base/176829 "2009-10-20T14:21:07Z")

</div>

I’m running into a rather weird problem… I have a model with a “link” attribute that isn’t working because it’s getting clobbered by RakeFileUtils#link It seems as soon as you require ‘rake’ that RakeFileUtils gets mi…

---

## [Join .Net Community](https://www.ruby-forum.com/t/join-net-community/177567)

<div class="topic-metadata">

**Author:** [@Shawon\_S](https://www.ruby-forum.com/u/Shawon_S)\
**Replies:** 0\
**Last updated:** [October 20, 2009, 11:57am UTC](https://www.ruby-forum.com/t/join-net-community/177567 "2009-10-20T11:57:42Z")

</div>

Join .Net Community This group represents the Microsoft .Net community. All .net programmers all around the world are welcome here. In this group you’ll find the latest releases of .Net related products, frameworks, …

---

## [Model-problem](https://www.ruby-forum.com/t/model-problem/177568)

<div class="topic-metadata">

**Author:** [@earthtree](https://www.ruby-forum.com/u/earthtree)\
**Replies:** 0\
**Last updated:** [October 20, 2009, 11:36am UTC](https://www.ruby-forum.com/t/model-problem/177568 "2009-10-20T11:36:46Z")

</div>

Hello. I have a simple multipart-form that uploads images and saves record in the database. I have a model that uses the RMagick plugin to save the images. My model looks like this: class Drawing \< ActiveRecord::Bas…

---

## [Domain status in Rails](https://www.ruby-forum.com/t/domain-status-in-rails/177525)

<div class="topic-metadata">

**Author:** [@jhaagmans](https://www.ruby-forum.com/u/jhaagmans)\
**Replies:** 6\
**Last updated:** [October 20, 2009, 10:21am UTC](https://www.ruby-forum.com/t/domain-status-in-rails/177525 "2009-10-20T10:21:42Z")

</div>

Hi, For an app I need users to put in the domain name their website is hosted on. It’s important that this domain works, so I’d like my app to check this. I’d like to be able to process the response. If it returns a …

---

## [Handling missing associations](https://www.ruby-forum.com/t/handling-missing-associations/177546)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 2\
**Last updated:** [October 20, 2009, 9:57am UTC](https://www.ruby-forum.com/t/handling-missing-associations/177546 "2009-10-20T09:57:14Z")

</div>

Hello, I have a message model which belongs to a user. Users can be deleted, but messages cannot. What can I do to reference a user that created a message when it no longer exists?: Create a dummy user. When a user …

---

## [Can (should) each :user have his own table?](https://www.ruby-forum.com/t/can-should-each-user-have-his-own-table/177502)

<div class="topic-metadata">

**Author:** [@AlwaysCharging](https://www.ruby-forum.com/u/AlwaysCharging)\
**Replies:** 9\
**Last updated:** [October 20, 2009, 9:52am UTC](https://www.ruby-forum.com/t/can-should-each-user-have-his-own-table/177502 "2009-10-20T09:52:07Z")

</div>

I was reading this article a while back and it got me thinking. If I wanted to set up my app so that each user has his/her own table, how would I go about doing that? “create\_table :users” just creates a table in t…

---

## [Check if association cached without hitting db?](https://www.ruby-forum.com/t/check-if-association-cached-without-hitting-db/177548)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 1\
**Last updated:** [October 20, 2009, 9:19am UTC](https://www.ruby-forum.com/t/check-if-association-cached-without-hitting-db/177548 "2009-10-20T09:19:38Z")

</div>

Is there a way to tell if an association on an object is cached without hitting the db? For example, let’s say I have order has\_many line\_items, is there a way for me to tell if order.line\_items is already populated?

---

## [Multiple File Upload](https://www.ruby-forum.com/t/multiple-file-upload/175346)

<div class="topic-metadata">

**Author:** [@Rails\_ROR](https://www.ruby-forum.com/u/Rails_ROR)\
**Replies:** 3\
**Last updated:** [October 20, 2009, 9:12am UTC](https://www.ruby-forum.com/t/multiple-file-upload/175346 "2009-10-20T09:12:36Z")

</div>

Hi I am new to rails. I found Ruby On Rails to be very interesting. I studied all the basics. I have developed multiple file upload using paperclip successfully, but when i tried the same application using 2.3.4 it…

---

## [Simple system for asynchronous SQL queries](https://www.ruby-forum.com/t/simple-system-for-asynchronous-sql-queries/177551)

<div class="topic-metadata">

**Author:** [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Replies:** 4\
**Last updated:** [October 20, 2009, 7:20am UTC](https://www.ruby-forum.com/t/simple-system-for-asynchronous-sql-queries/177551 "2009-10-20T07:20:11Z")

</div>

There has to be something like this… I have some tracking related SQL queries that are slow and don’t need to happen in the request cycle. Is it possible to dump them to some text file and then read them in a daemon a…

---

## [Project Server not starting. No Errors](https://www.ruby-forum.com/t/project-server-not-starting-no-errors/177489)

<div class="topic-metadata">

**Author:** [@woodzer](https://www.ruby-forum.com/u/woodzer)\
**Replies:** 8\
**Last updated:** [October 20, 2009, 7:19am UTC](https://www.ruby-forum.com/t/project-server-not-starting-no-errors/177489 "2009-10-20T07:19:42Z")

</div>

I apologize if this has been asked before. I’m trying to simply start my server and the only output is as follows… ruby script/server ./script/…/config/boot.rb:26:Warning: Gem::SourceIndex#search support for String …

---

## [Associations are not found with STI using Rails 2.3](https://www.ruby-forum.com/t/associations-are-not-found-with-sti-using-rails-2-3/177478)

<div class="topic-metadata">

**Author:** [@sbhatti](https://www.ruby-forum.com/u/sbhatti)\
**Replies:** 2\
**Last updated:** [October 20, 2009, 4:33am UTC](https://www.ruby-forum.com/t/associations-are-not-found-with-sti-using-rails-2-3/177478 "2009-10-20T04:33:45Z")

</div>

I have recently upgraded my Rails app to 2.3. I am using STI where I have class called BaseProfile that is extended by IndividualProfile. I have some assocations that are defined in BaseProfile but I have been getting…

---

## [Find, using a link instead of a form](https://www.ruby-forum.com/t/find-using-a-link-instead-of-a-form/177522)

<div class="topic-metadata">

**Author:** [@snlsn](https://www.ruby-forum.com/u/snlsn)\
**Replies:** 4\
**Last updated:** [October 20, 2009, 3:02am UTC](https://www.ruby-forum.com/t/find-using-a-link-instead-of-a-form/177522 "2009-10-20T03:02:03Z")

</div>

Hello; Here’s the latest puzzle stumping me. Seems it should be simple but I’m feeling like a moron. I would like to have a link that, when clicked, returns the results of a pre-set find. Here’s the deal. I’m working…

---

## [Render collection of partials: in batches of 30?](https://www.ruby-forum.com/t/render-collection-of-partials-in-batches-of-30/177552)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 0\
**Last updated:** [October 20, 2009, 2:24am UTC](https://www.ruby-forum.com/t/render-collection-of-partials-in-batches-of-30/177552 "2009-10-20T02:24:35Z")

</div>

My app is rendering a partial with a collection of 180 ActiveRecords. I noticed that while most are in the 3-8ms range, every 30th record is over 100ms. Any ideas what is causing that and if there is a way around it…

---

## [Combobox population by means of JQuery and Ajax](https://www.ruby-forum.com/t/combobox-population-by-means-of-jquery-and-ajax/177536)

<div class="topic-metadata">

**Author:** [@spitfire](https://www.ruby-forum.com/u/spitfire)\
**Replies:** 1\
**Last updated:** [October 19, 2009, 11:25pm UTC](https://www.ruby-forum.com/t/combobox-population-by-means-of-jquery-and-ajax/177536 "2009-10-19T23:25:53Z")

</div>

This is the view municipalities.js.erb I have: \<% list\_opt = options\_from\_collection\_for\_select(@municipalities, :id, :name) %\> \<% puts list\_opt %\> #ok! list\_opt contains the options $(’#municipality\_id’).html(’\<%= …

---

## [Problems with calling javascript containing dynamic content in partial page](https://www.ruby-forum.com/t/problems-with-calling-javascript-containing-dynamic-content-in-partial-page/177530)

<div class="topic-metadata">

**Author:** [@Lu\_Liu](https://www.ruby-forum.com/u/Lu_Liu)\
**Replies:** 0\
**Last updated:** [October 19, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/problems-with-calling-javascript-containing-dynamic-content-in-partial-page/177530 "2009-10-19T20:22:46Z")

</div>

Hi all, I am trying to call some javascript function defined in partial page “\_results.html.erb”. But it seemed that the js functions in the page are unrecognizable, and I have no idea why. In my app, I have an “inde…

---

## [Authlogic -- gem or plugin?](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476)

<div class="topic-metadata">

**Author:** [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Replies:** 6\
**Last updated:** [October 19, 2009, 8:18pm UTC](https://www.ruby-forum.com/t/authlogic-gem-or-plugin/177476 "2009-10-19T20:18:05Z")

</div>

Trying out Authlogic for the first time – somewhere, can’t find it now of course :slight\_smile: I saw a recommendation to use the plugin form, but the Ryan B. railscast recommends the gem (without explanation). Commen…

---

## [Sybase in rails2?](https://www.ruby-forum.com/t/sybase-in-rails2/177302)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 18\
**Last updated:** [October 19, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/sybase-in-rails2/177302 "2009-10-19T19:20:10Z")

</div>

Has anyone actually gotten the activerecord-sybase-adapter to work in Rails2? I can’t seem to, and can’t figure out why. I am on RedHat linux. I have the sybase client libraries installed, I have the adapter installe…

---

## [Rails Concurrent Requests](https://www.ruby-forum.com/t/rails-concurrent-requests/177454)

<div class="topic-metadata">

**Author:** [@german](https://www.ruby-forum.com/u/german)\
**Replies:** 13\
**Last updated:** [October 19, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/rails-concurrent-requests/177454 "2009-10-19T18:35:19Z")

</div>

Hi, i’m building a big Rails application, i really like the way that rails manage our normal problems building a web app. Yesterdays I found myself into a deadlock, why?, because in my rails app, there is a functional…

---

## [Calling a Oracle procedure inside ROR](https://www.ruby-forum.com/t/calling-a-oracle-procedure-inside-ror/177519)

<div class="topic-metadata">

**Author:** [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Replies:** 1\
**Last updated:** [October 19, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/calling-a-oracle-procedure-inside-ror/177519 "2009-10-19T18:25:39Z")

</div>

Hi all,auppose I have the following procedure: CREATE OR REPLACE Procedure Calc\_All\_Diarias(Pviagem In Number, Pcompl In Varchar2) IÂ´m trying to call it this way: x = ActiveRecord::Base.connection.execute( “exec ca…

---

## [Map.resources + has\_many + STI + :only](https://www.ruby-forum.com/t/map-resources-has-many-sti-only/177523)

<div class="topic-metadata">

**Author:** [@MartOn](https://www.ruby-forum.com/u/MartOn)\
**Replies:** 0\
**Last updated:** [October 19, 2009, 5:57pm UTC](https://www.ruby-forum.com/t/map-resources-has-many-sti-only/177523 "2009-10-19T17:57:35Z")

</div>

Hello I have product model that has a given workflow (given by state\_machine). Then I have 2-3 versions of product that have a slightly different workflow. Since state\_machine has a elegant way of handling class inhe…

---

## [Submit\_tag or f.submit](https://www.ruby-forum.com/t/submit-tag-or-f-submit/177518)

<div class="topic-metadata">

**Author:** [@risknet](https://www.ruby-forum.com/u/risknet)\
**Replies:** 1\
**Last updated:** [October 19, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/submit-tag-or-f-submit/177518 "2009-10-19T17:42:21Z")

</div>

Hello all, I am pretty much new here, trying to move to RoR from .net world. I will appreciate if anyone clarifies this for me. Most of books use “submit\_tag” in new or edit views, but I see Rails API web documents u…

---

## [\[ANN\] WiceGrid Plugin version 0.5](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486)

<div class="topic-metadata">

**Author:** [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Replies:** 6\
**Last updated:** [October 19, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/ann-wicegrid-plugin-version-0-5/177486 "2009-10-19T16:58:28Z")

</div>

Hello all, WiceGrid plugin version 0.5 is released. WiceGrid is a Rails grid plugin. A list of changes: http://leikind.org/2009/10/18/wicegrid-version-0-5 Examples online: http://grid.leikind.org/ Homepage: WiceGrid…

---

## [Security problems with CookieStore and CSRF protection](https://www.ruby-forum.com/t/security-problems-with-cookiestore-and-csrf-protection/177460)

<div class="topic-metadata">

**Author:** [@Avik](https://www.ruby-forum.com/u/Avik)\
**Replies:** 3\
**Last updated:** [October 19, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/security-problems-with-cookiestore-and-csrf-protection/177460 "2009-10-19T16:48:31Z")

</div>

Dear Rails community, As part of a programming languages/security research group at the University of Maryland, we are building some static analysis tools for Rails applications. These tools work by taking formally sp…

---

## [Huge XML Template](https://www.ruby-forum.com/t/huge-xml-template/177514)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 2\
**Last updated:** [October 19, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/huge-xml-template/177514 "2009-10-19T16:05:56Z")

</div>

Hi, I am having a xml template containing 5000 lines of code . Now i need to generate the template dynamically in ruby on rails . My requirement is every time a user clicks on GO , a new xml template will generate …

---

## [Why do we needs act\_as\_state\_machine?](https://www.ruby-forum.com/t/why-do-we-needs-act-as-state-machine/177496)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [October 19, 2009, 3:32pm UTC](https://www.ruby-forum.com/t/why-do-we-needs-act-as-state-machine/177496 "2009-10-19T15:32:15Z")

</div>

I kind of new at this…please correct me if I’m wrong. state\_machine do state :red state :green state :yellow ---------------a example--------------- event :change\_color do transitions :to =\> :red, :from =\> \[:ye…

---

## [Odd behaviour of update\_attributes in STI table](https://www.ruby-forum.com/t/odd-behaviour-of-update-attributes-in-sti-table/177505)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [October 19, 2009, 1:23pm UTC](https://www.ruby-forum.com/t/odd-behaviour-of-update-attributes-in-sti-table/177505 "2009-10-19T13:23:16Z")

</div>

I just noticed this odd behaviour (in rails 2.2.2). It looks like changing the type with update\_attributes doesn’t work (but returns true!), but changing the field and then saving it does work. Here i have an STI s…

---

## [Linked associations question please help](https://www.ruby-forum.com/t/linked-associations-question-please-help/177498)

<div class="topic-metadata">

**Author:** [@theambler](https://www.ruby-forum.com/u/theambler)\
**Replies:** 5\
**Last updated:** [October 19, 2009, 11:44am UTC](https://www.ruby-forum.com/t/linked-associations-question-please-help/177498 "2009-10-19T11:44:40Z")

</div>

I have a Users model. Users ‘have many’ Stories, and Stories have many Items. This structure allows the sharing of Items between Stories and Stories between Users. But given there is no direct ‘ownership’ link betw…

---

## [Paperclip - imagemagick Configuration](https://www.ruby-forum.com/t/paperclip-imagemagick-configuration/176593)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [October 19, 2009, 11:30am UTC](https://www.ruby-forum.com/t/paperclip-imagemagick-configuration/176593 "2009-10-19T11:30:36Z")

</div>

I’m not sure what changed, but I started getting errors from the paperclip plugin: \[paperclip\] An error was received while processing: #\<Paperclip::NotIdentifiedByImageMagickError: /tmp/stream.13688.0 is not recogniz…

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

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