# Rails

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

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

---

## [Filename prefixes in file\_column](https://www.ruby-forum.com/t/filename-prefixes-in-file-column/126137)

<div class="topic-metadata">

**Author:** [@piyush\_r](https://www.ruby-forum.com/u/piyush_r)\
**Replies:** 1\
**Last updated:** [January 16, 2008, 9:01am UTC](https://www.ruby-forum.com/t/filename-prefixes-in-file-column/126137 "2008-01-16T09:01:50Z")

</div>

I need to add filename prefix to files uploaded by file\_column plugin. For instance the image file uploaded by the user is by name ‘foobar.jpg’ I need to prefix this image with a random number(‘23\_foobar.jpg’). I nee…

---

## [BackgroundRB FFMPEG](https://www.ruby-forum.com/t/backgroundrb-ffmpeg/126072)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 3\
**Last updated:** [January 16, 2008, 7:46am UTC](https://www.ruby-forum.com/t/backgroundrb-ffmpeg/126072 "2008-01-16T07:46:34Z")

</div>

why will ffmpeg not output my video?? class VideoWorker \< BackgrounDRb::Rails def do\_work(args) video = Video.find(args\[:video\_id\]) video.processing\_status = 1 video.save system("ffmpeg -i #{video.public\_filena…

---

## [Problems with params\[:commit\]](https://www.ruby-forum.com/t/problems-with-params-commit/126051)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 15\
**Last updated:** [January 16, 2008, 4:56am UTC](https://www.ruby-forum.com/t/problems-with-params-commit/126051 "2008-01-16T04:56:03Z")

</div>

Hi, Can someone tell me why doesnt this work? I have two links the action of both links are the same. They post the data from the form and suppose to redirect to two different pages respectively if i click any one of …

---

## [Mysql is wrong or rails 2.0.2 is wrong?](https://www.ruby-forum.com/t/mysql-is-wrong-or-rails-2-0-2-is-wrong/126177)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 1\
**Last updated:** [January 16, 2008, 2:52am UTC](https://www.ruby-forum.com/t/mysql-is-wrong-or-rails-2-0-2-is-wrong/126177 "2008-01-16T02:52:09Z")

</div>

I have 3 tables want to join. questions: id, question\_category\_id, content answers: id, question\_id, created\_at, content, person\_id question\_categories: id, name, created\_at and now I do this on rails 2.0.2: @myansw…

---

## [How can I DRY this cide?](https://www.ruby-forum.com/t/how-can-i-dry-this-cide/126130)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 2\
**Last updated:** [January 16, 2008, 1:58am UTC](https://www.ruby-forum.com/t/how-can-i-dry-this-cide/126130 "2008-01-16T01:58:58Z")

</div>

I have code like this def self.find(\*args) if @@filter with\_scope :find =\> {:conditions =\> @@filter } do super end else super end end def self.paginate(\*args) if @@filter with\_scope :find =\> {:conditions =\> @@…

---

## [Meaning of "gem version of rails"?](https://www.ruby-forum.com/t/meaning-of-gem-version-of-rails/126172)

<div class="topic-metadata">

**Author:** [@robb](https://www.ruby-forum.com/u/robb)\
**Replies:** 1\
**Last updated:** [January 16, 2008, 12:56am UTC](https://www.ruby-forum.com/t/meaning-of-gem-version-of-rails/126172 "2008-01-16T00:56:49Z")

</div>

This phrase appears in environment.rb. How is this different from “version of rails”? Thanks, Robb

---

## [Namespaced routes and js.erb](https://www.ruby-forum.com/t/namespaced-routes-and-js-erb/126170)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 0\
**Last updated:** [January 16, 2008, 12:31am UTC](https://www.ruby-forum.com/t/namespaced-routes-and-js-erb/126170 "2008-01-16T00:31:16Z")

</div>

Whenever I try and use a .js.erb view in my nested routes it tries to look for a layout(i.e. admin.js.erb). any ideas on how to stop this other than calling :layout =\> false?

---

## [Resources, has\_many :through and extra attributes on 'join model'](https://www.ruby-forum.com/t/resources-has-many-through-and-extra-attributes-on-join-model/126169)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 16, 2008, 12:20am UTC](https://www.ruby-forum.com/t/resources-has-many-through-and-extra-attributes-on-join-model/126169 "2008-01-16T00:20:45Z")

</div>

Hi, I found a small ‘problem’ to which I think I found a solution. But the solution feels a bit hacky. I would like some feedback on it. Say I have Groups & Users. A group has many users, but a user can also belong …

---

## [Question about Element.toggle](https://www.ruby-forum.com/t/question-about-element-toggle/126126)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 11:49pm UTC](https://www.ruby-forum.com/t/question-about-element-toggle/126126 "2008-01-15T23:49:44Z")

</div>

I’m currently doing this: \<%= link\_to\_function h(course.title), “Element.toggle(‘course#{course.id}’)” %\> Is there a way to: (a) Extend this so that instead of simply clicking on a title to toggle the element the us…

---

## [How can I do that? Text with paragraphs in show](https://www.ruby-forum.com/t/how-can-i-do-that-text-with-paragraphs-in-show/126144)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [January 15, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/how-can-i-do-that-text-with-paragraphs-in-show/126144 "2008-01-15T22:48:21Z")

</div>

I have this in code in show: Observation: \<%=h @repair\_ticket.observation %\> The observation is text. When I edit this observation, I put “.”, creating several paragraphs, but when I go to show, the view g…

---

## [Translating this test using Mocha](https://www.ruby-forum.com/t/translating-this-test-using-mocha/126162)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 0\
**Last updated:** [January 15, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/translating-this-test-using-mocha/126162 "2008-01-15T22:40:01Z")

</div>

Hello, I’m trying to learn Mocha and having a bit of problems how to translate some of my tests to the mocha world. For example - I’m trying to convert this simple test: \[code\] def test\_get\_feed\_details\_w\_bad\_url a…

---

## [Different Versions of Rails](https://www.ruby-forum.com/t/different-versions-of-rails/126084)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 5\
**Last updated:** [January 15, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/different-versions-of-rails/126084 "2008-01-15T22:27:35Z")

</div>

I’m getting very confused with how the versions of Rails work and wondered if somebody could explain it to me (preferably as basically as possible, treat me as a beginner!) The situation is that I have a desktop machi…

---

## [Custom FormBuilder problems](https://www.ruby-forum.com/t/custom-formbuilder-problems/126154)

<div class="topic-metadata">

**Author:** [@acampos](https://www.ruby-forum.com/u/acampos)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/custom-formbuilder-problems/126154 "2008-01-15T22:25:49Z")

</div>

I’m trying to create my first custom FormBuilder and I’m having a bit of a problem. I’m trying to add a ‘field\_group’ method to my builder that takes a block, but when I yield to the block I seem to be getting duplic…

---

## [Rails 2.0 Fixtures bug?](https://www.ruby-forum.com/t/rails-2-0-fixtures-bug/126035)

<div class="topic-metadata">

**Author:** [@fifoo](https://www.ruby-forum.com/u/fifoo)\
**Replies:** 5\
**Last updated:** [January 15, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/rails-2-0-fixtures-bug/126035 "2008-01-15T22:17:56Z")

</div>

All, I’ve started playing with Rails 2.0.2 and I have an issue with fixtures. It used to work in Rails 1.8.6… A bit of context first. I have 2 models: class competition has\_and\_belongs\_to\_many :teams end class tea…

---

## [Rjs is not working in the internet explorer](https://www.ruby-forum.com/t/rjs-is-not-working-in-the-internet-explorer/125957)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 7\
**Last updated:** [January 15, 2008, 10:16pm UTC](https://www.ruby-forum.com/t/rjs-is-not-working-in-the-internet-explorer/125957 "2008-01-15T22:16:24Z")

</div>

i have checked the DOM tree and every thing is working fine… The same works fine in mozilla firefox… I m here by pasting the screen shot taken in the internet explorer… The code i have written is render :update do |p…

---

## [Pie chart](https://www.ruby-forum.com/t/pie-chart/125989)

<div class="topic-metadata">

**Author:** [@mzalendo](https://www.ruby-forum.com/u/mzalendo)\
**Replies:** 4\
**Last updated:** [January 15, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/pie-chart/125989 "2008-01-15T22:15:04Z")

</div>

i have a rails applications which can record various tasks and times used to do those tasks within each day in a week, now i want it to have the abbility of displaying the percentage of …

---

## [Periodically\_call\_remote(), WebChat Q](https://www.ruby-forum.com/t/periodically-call-remote-webchat-q/126048)

<div class="topic-metadata">

**Author:** [@SySySy](https://www.ruby-forum.com/u/SySySy)\
**Replies:** 2\
**Last updated:** [January 15, 2008, 9:53pm UTC](https://www.ruby-forum.com/t/periodically-call-remote-webchat-q/126048 "2008-01-15T21:53:27Z")

</div>

Hi all, I am teaching myself rails and I can’t figure out why the following code does not work: ‘say’ part works, but nothing shows up for ‘get\_new’ part. Here is my chat\_controller.rb file: class ChatController \< A…

---

## [Soap support in Rails 2.0](https://www.ruby-forum.com/t/soap-support-in-rails-2-0/126142)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 2\
**Last updated:** [January 15, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/soap-support-in-rails-2-0/126142 "2008-01-15T21:51:05Z")

</div>

Hi, Was SOAP support discontinued in Rails 2.0? I did read the release notes which mention that REST is the preferred web services architecture, but nowhere is mentioned that SOAP is completely out. I created a new R…

---

## [Importing file in html (noob)](https://www.ruby-forum.com/t/importing-file-in-html-noob/126095)

<div class="topic-metadata">

**Author:** [@statictony](https://www.ruby-forum.com/u/statictony)\
**Replies:** 3\
**Last updated:** [January 15, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/importing-file-in-html-noob/126095 "2008-01-15T21:50:30Z")

</div>

Hi People, I’m pretty new to rails so please bear with me on this. I’m wanting to pull a text file into my rhtml page to use as the header part of my site. I know I can use layouts but it isn’t pratical for my proble…

---

## [Oracle adapter + activerecord sessions do not work](https://www.ruby-forum.com/t/oracle-adapter-activerecord-sessions-do-not-work/125053)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 2\
**Last updated:** [January 15, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/oracle-adapter-activerecord-sessions-do-not-work/125053 "2008-01-15T21:44:35Z")

</div>

Anyone know what’s up with the activerecord session store when using the oracle adapter in Rails 2.0.2 ? I can set a session variable and can then see it’s actually set using the debugger, but after the request comple…

---

## [Rake performance on different platforms](https://www.ruby-forum.com/t/rake-performance-on-different-platforms/126151)

<div class="topic-metadata">

**Author:** [@sjoshi](https://www.ruby-forum.com/u/sjoshi)\
**Replies:** 0\
**Last updated:** [January 15, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/rake-performance-on-different-platforms/126151 "2008-01-15T21:16:26Z")

</div>

Hi, I have question that is related to rake cpu usage. I am running a rake task that parses a huge xml file and inserts data into mysql db using activerecord. On my macbook pro (2GB memory,2.2 Ghz, leopard) the rake …

---

## [Installing Ruby on Rails - missing the "Components" folder](https://www.ruby-forum.com/t/installing-ruby-on-rails-missing-the-components-folder/126143)

<div class="topic-metadata">

**Author:** [@Quickie](https://www.ruby-forum.com/u/Quickie)\
**Replies:** 2\
**Last updated:** [January 15, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-missing-the-components-folder/126143 "2008-01-15T21:02:52Z")

</div>

Hi, I’m trying to get up and running on rails. I’m on Vista 32 and have installed instant rails on C:\\InstantRails from: http://instantrails.rubyforge.org/wiki/wiki.pl I’ve done the “gem update --system” and “gem ins…

---

## [Belongs\_to \<parent name\>, :foreign\_key modifier not working](https://www.ruby-forum.com/t/belongs-to-parent-name-foreign-key-modifier-not-working/96258)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 3\
**Last updated:** [January 15, 2008, 8:53pm UTC](https://www.ruby-forum.com/t/belongs-to-parent-name-foreign-key-modifier-not-working/96258 "2008-01-15T20:53:53Z")

</div>

All, I have two ActiveRecord objects. TargetList has\_many Targets Targets belongs\_to TargetList I’ve specified belongs\_to :target\_list, :foreign\_key =\> ‘DataSetID’ Queries generated by various methods in target\_l…

---

## [Sorting in REST](https://www.ruby-forum.com/t/sorting-in-rest/126067)

<div class="topic-metadata">

**Author:** [@Sumeru](https://www.ruby-forum.com/u/Sumeru)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/sorting-in-rest/126067 "2008-01-15T20:40:01Z")

</div>

I have written the following code for sorting list of courses: \<%= link\_to\_remote “From Date”, :update =\> ‘content’, :url =\> {:controller=\> “courses”, :action =\> ‘list’, :sort =\> ‘from\_date’ }, :before =\> “Element.sho…

---

## [Error when running things through the public directory](https://www.ruby-forum.com/t/error-when-running-things-through-the-public-directory/126131)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [January 15, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/error-when-running-things-through-the-public-directory/126131 "2008-01-15T20:13:38Z")

</div>

Hi, I’m running the latest version of Ruby on Rails on Fedora Core 6 Linux. I created the simple “hello world” application found on the RoR site (http://wiki.rubyonrails.org/rails/pages/Tutorial). B/c of the hostin…

---

## [Combine sql with ferret](https://www.ruby-forum.com/t/combine-sql-with-ferret/125972)

<div class="topic-metadata">

**Author:** [@Sylvain](https://www.ruby-forum.com/u/Sylvain)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/combine-sql-with-ferret/125972 "2008-01-15T19:32:22Z")

</div>

Dear all, Ferret seems to be great for full text searches and mysql is suitable for relational searches. Now, what is the most efficient way to combine both in a ruby on rails application? For instance, I would like …

---

## [Single Table Inheritance and modules](https://www.ruby-forum.com/t/single-table-inheritance-and-modules/126138)

<div class="topic-metadata">

**Author:** [@acarlos](https://www.ruby-forum.com/u/acarlos)\
**Replies:** 0\
**Last updated:** [January 15, 2008, 7:29pm UTC](https://www.ruby-forum.com/t/single-table-inheritance-and-modules/126138 "2008-01-15T19:29:27Z")

</div>

Hello, I have model objects inside modules to prevent naming collisions. Does anyone know how to force ActiveRecord, when using STI, to use the module name in the type column of the database? I’ve tried forcing AR to…

---

## [Application error Rails application failed to start properly"](https://www.ruby-forum.com/t/application-error-rails-application-failed-to-start-properly/126132)

<div class="topic-metadata">

**Author:** [@slava](https://www.ruby-forum.com/u/slava)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/application-error-rails-application-failed-to-start-properly/126132 "2008-01-15T18:41:45Z")

</div>

I’ve been strugling for days trying to resolve this issue installing a rails project on a hosted server. I keep getting Application error Rails application failed to start properly" when I go to front page of my sit…

---

## [Can HAML and Liquid Templates Coexist?](https://www.ruby-forum.com/t/can-haml-and-liquid-templates-coexist/126075)

<div class="topic-metadata">

**Author:** [@marstoni](https://www.ruby-forum.com/u/marstoni)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/can-haml-and-liquid-templates-coexist/126075 "2008-01-15T18:38:13Z")

</div>

So we’re in the middle of converting all our rhtml to HAML (Love it, simply beautiful) and I was wondering if Liquid Temples by the Leetsoft/Shopify guys can be used at the same time or is it one or the other? I may …

---

## [How to convert to Julian DateTime](https://www.ruby-forum.com/t/how-to-convert-to-julian-datetime/126112)

<div class="topic-metadata">

**Author:** [@dharshi](https://www.ruby-forum.com/u/dharshi)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/how-to-convert-to-julian-datetime/126112 "2008-01-15T18:16:24Z")

</div>

Please help me with this, I want to convert a dateTime to Julian date format… and vice versa…

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

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