# Rails

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

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

---

## [Are images automatically cached? if not, put it in rails?](https://www.ruby-forum.com/t/are-images-automatically-cached-if-not-put-it-in-rails/105639)

<div class="topic-metadata">

**Author:** [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 11:29pm UTC](https://www.ruby-forum.com/t/are-images-automatically-cached-if-not-put-it-in-rails/105639 "2007-05-31T23:29:16Z")

</div>

Hi, I came across this article on yahoo http://developer.yahoo.net/blog/archives/2007/05/high\_performanc\_2.html how do i implement this in a rails app that serves up images? thanks/

---

## [Help with using RSS parser in a Rails project?](https://www.ruby-forum.com/t/help-with-using-rss-parser-in-a-rails-project/105629)

<div class="topic-metadata">

**Author:** [@sharon](https://www.ruby-forum.com/u/sharon)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/help-with-using-rss-parser-in-a-rails-project/105629 "2007-05-31T22:32:15Z")

</div>

I’m VERY new at Ruby on Rails. I’m at my first attempt at an application for myself that will do something useful, thanks in advance for any advice! I’ve already written a functioning Ruby script that goes through an …

---

## [Problem sending excel sheets by email](https://www.ruby-forum.com/t/problem-sending-excel-sheets-by-email/105622)

<div class="topic-metadata">

**Author:** [@ActionMailerS\_probl](https://www.ruby-forum.com/u/ActionMailerS_probl)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/problem-sending-excel-sheets-by-email/105622 "2007-05-31T22:18:30Z")

</div>

I need to send a excel sheet by emmail. I’m using Action mailer like this: class SimpleMailer \< ActionMailer::Base def the\_message(asunto, message, recipient, file) from ‘removed\_email\_address@domain.invalid…

---

## [Trouble running Unit tests with sqlite3](https://www.ruby-forum.com/t/trouble-running-unit-tests-with-sqlite3/105636)

<div class="topic-metadata">

**Author:** [@Nexos](https://www.ruby-forum.com/u/Nexos)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/trouble-running-unit-tests-with-sqlite3/105636 "2007-05-31T22:08:09Z")

</div>

Hi, I’m using an sqlite3 database with Rails and have some trouble running unit tests I created some models/migrations in my dev DB, then ran a “rake db:test:prepare” that correctly created the test database. The pr…

---

## [How to DRY up my code](https://www.ruby-forum.com/t/how-to-dry-up-my-code/105611)

<div class="topic-metadata">

**Author:** [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Replies:** 3\
**Last updated:** [May 31, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/how-to-dry-up-my-code/105611 "2007-05-31T20:47:30Z")

</div>

Is there a good book that really shows you how to DRY up your code? Because I don’t want to repeat my code all over again for all the 26 alphabetical letters. Here is my code that I use for 1 letter for the controller…

---

## [Rails version](https://www.ruby-forum.com/t/rails-version/105610)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 7:48pm UTC](https://www.ruby-forum.com/t/rails-version/105610 "2007-05-31T19:48:51Z")

</div>

Hi I have a rails version installed that was obtained from executing “apt-get install rails”. (New installation of Ubuntu 7.0.x) I had problems configuring and using gems to install it. The ./configure script throw e…

---

## [Suppress logging during unit tests?](https://www.ruby-forum.com/t/suppress-logging-during-unit-tests/105619)

<div class="topic-metadata">

**Author:** [@isopaleocopria](https://www.ruby-forum.com/u/isopaleocopria)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 7:44pm UTC](https://www.ruby-forum.com/t/suppress-logging-during-unit-tests/105619 "2007-05-31T19:44:51Z")

</div>

Is there a way to change the logging level of ActiveRecord while running unit tests?

---

## [Using encodeURI with text\_field\_with\_auto\_complete](https://www.ruby-forum.com/t/using-encodeuri-with-text-field-with-auto-complete/105618)

<div class="topic-metadata">

**Author:** [@desertpenguin](https://www.ruby-forum.com/u/desertpenguin)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 7:33pm UTC](https://www.ruby-forum.com/t/using-encodeuri-with-text-field-with-auto-complete/105618 "2007-05-31T19:33:47Z")

</div>

I am using text\_field\_with\_auto\_complete to display a list to the user. Unfortunately, some of the items contain non-url friendly characters. How can I wire up the prototype encodeURI function to package the field be…

---

## [ActiveResource with Rails 1.2.x?](https://www.ruby-forum.com/t/activeresource-with-rails-1-2-x/105606)

<div class="topic-metadata">

**Author:** [@linus1412](https://www.ruby-forum.com/u/linus1412)\
**Replies:** 8\
**Last updated:** [May 31, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/activeresource-with-rails-1-2-x/105606 "2007-05-31T18:26:40Z")

</div>

Hi, Is it possible to use ActiveResource with Rails 1.2.x ? I’ve seen that you can download it as a source gem (gem install activeresource-source http://gems.rubyonrails.org) I’d love to hear from anybody who has tri…

---

## [Migration fails need to reload attributes from model?](https://www.ruby-forum.com/t/migration-fails-need-to-reload-attributes-from-model/105594)

<div class="topic-metadata">

**Author:** [@Adam\_M.ox](https://www.ruby-forum.com/u/Adam_M.ox)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/migration-fails-need-to-reload-attributes-from-model/105594 "2007-05-31T17:55:49Z")

</div>

hello, I have a problem with a migration sequence. Running rake db:migrate from the start (empty db) fails at migration 20. The problem it appears, is that the new attributes are not reloaded. I have tried adding "loa…

---

## [Related table columns](https://www.ruby-forum.com/t/related-table-columns/105083)

<div class="topic-metadata">

**Author:** [@elmy-liddiard](https://www.ruby-forum.com/u/elmy-liddiard)\
**Replies:** 7\
**Last updated:** [May 31, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/related-table-columns/105083 "2007-05-31T17:46:20Z")

</div>

Help for newbie please! I have two tables: controls and programs. controls has\_many :programs Programs belongs\_to :control Controls has id, controlname Programs has, apart from it’s own id, two fields ctl1\_id and ct…

---

## [RoR Joomla equivilant](https://www.ruby-forum.com/t/ror-joomla-equivilant/104383)

<div class="topic-metadata">

**Author:** [@moesian](https://www.ruby-forum.com/u/moesian)\
**Replies:** 7\
**Last updated:** [May 31, 2007, 5:16pm UTC](https://www.ruby-forum.com/t/ror-joomla-equivilant/104383 "2007-05-31T17:16:30Z")

</div>

Hi, I’ve recently begun trying to get to grips with RoR. The other day however I was shown Joomla. Is there a RoR alternative a group developing a similar CMS. Thanks

---

## [MS SQL (legacy) relations not working](https://www.ruby-forum.com/t/ms-sql-legacy-relations-not-working/105602)

<div class="topic-metadata">

**Author:** [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 4:47pm UTC](https://www.ruby-forum.com/t/ms-sql-legacy-relations-not-working/105602 "2007-05-31T16:47:26Z")

</div>

I have my app talking to the MS SQL database. meaning I can retrieve data from it. I have an Office table. and it has a column called ‘Marketing’ that is a foreign key to the marketing tables primary key. so I was ha…

---

## [WebOrb on things other than Mongrel](https://www.ruby-forum.com/t/weborb-on-things-other-than-mongrel/105601)

<div class="topic-metadata">

**Author:** [@ramontayag](https://www.ruby-forum.com/u/ramontayag)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/weborb-on-things-other-than-mongrel/105601 "2007-05-31T16:41:26Z")

</div>

Hi everyone, I tried to install WebOrb in Bluehost (it uses cgi or fcgi) but Flash couldn’t connect to it like it does on my windows (WEBrick) machine. This is what the BH support said: “Unfortunately you cannot use …

---

## [Conditional migrations based on databased used](https://www.ruby-forum.com/t/conditional-migrations-based-on-databased-used/105595)

<div class="topic-metadata">

**Author:** [@jgrosjean](https://www.ruby-forum.com/u/jgrosjean)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/conditional-migrations-based-on-databased-used/105595 "2007-05-31T16:36:57Z")

</div>

I’m trying to add a migration with foreign keys like this: execute ‘ALTER TABLE projects ADD CONSTRAINT fk\_project\_user FOREIGN KEY ( user\_id ) REFERENCES users ( id )’ the problem is that for development i’m using sq…

---

## [Rjs and Ajax.Updater](https://www.ruby-forum.com/t/rjs-and-ajax-updater/105400)

<div class="topic-metadata">

**Author:** [@janke](https://www.ruby-forum.com/u/janke)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/rjs-and-ajax-updater/105400 "2007-05-31T16:13:23Z")

</div>

I have been searching for a while now have not be able to find any type of list of the prototype and effects functions available to rjs. Most of what I have done has either come from simple examples found here and the…

---

## [Gem timeouts](https://www.ruby-forum.com/t/gem-timeouts/105597)

<div class="topic-metadata">

**Author:** [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/gem-timeouts/105597 "2007-05-31T16:11:47Z")

</div>

I’m suffering from gem timeouts. None of my remote operations are working now. I deleted the source-cache in hope that would help, but to no avail. How can I debug or repair this?

---

## [Firefox bug causing an action to be processed twice?](https://www.ruby-forum.com/t/firefox-bug-causing-an-action-to-be-processed-twice/105384)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 8\
**Last updated:** [May 31, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/firefox-bug-causing-an-action-to-be-processed-twice/105384 "2007-05-31T15:58:21Z")

</div>

Hello, I’m facing a strange bug. I have a simple action in a simple controller in a simple Rails App (Rails 1.2.3, Mongrel 1.0.1). This action fetches some news in the Database : def news @news = News.find(:all) …

---

## [/script/console questions](https://www.ruby-forum.com/t/script-console-questions/105591)

<div class="topic-metadata">

**Author:** [@bartocc](https://www.ruby-forum.com/u/bartocc)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/script-console-questions/105591 "2007-05-31T14:50:11Z")

</div>

If I am right, when starting script/console (or script/server), models are not automatically required. But with you type MyModel.find(:first) in the console, it works. Is there any kind of method\_missing implemented s…

---

## [To\_json delivers incorrect format? Anyone else seeing this?](https://www.ruby-forum.com/t/to-json-delivers-incorrect-format-anyone-else-seeing-this/105589)

<div class="topic-metadata">

**Author:** [@JJ\_RoR](https://www.ruby-forum.com/u/JJ_RoR)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/to-json-delivers-incorrect-format-anyone-else-seeing-this/105589 "2007-05-31T14:20:06Z")

</div>

@notes.to\_json outputs=\> \[ {attributes: {title: “My Shiny New Box”, individual\_id: “1”, id: “1”, note: “The first of many such things”}}, {attributes: {title: “A second box”, individual\_id: “2”, id: “2”, note: “This …

---

## [How to get options from a URL string?](https://www.ruby-forum.com/t/how-to-get-options-from-a-url-string/104805)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 2:12pm UTC](https://www.ruby-forum.com/t/how-to-get-options-from-a-url-string/104805 "2007-05-31T14:12:04Z")

</div>

Hello, I have some non-REST named routes, e.g. home\_url, to hook up a couple of static pages on my otherwise RESTful site. I would like to use link\_to\_unless\_current or current\_page? but the problem is those methods …

---

## [Acts as list](https://www.ruby-forum.com/t/acts-as-list/105576)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/acts-as-list/105576 "2007-05-31T13:20:58Z")

</div>

hi, how would you insert a new item positioned after an existing item of an acts\_as\_list ?

---

## [How can a polymorphic object check its own class type?](https://www.ruby-forum.com/t/how-can-a-polymorphic-object-check-its-own-class-type/105520)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/how-can-a-polymorphic-object-check-its-own-class-type/105520 "2007-05-31T13:13:57Z")

</div>

I have a polymorphic class and need to know the type from within the model (for validation). From a controller, I can check instance\[:type\] to get the object’s type, but how do I access this attribute from within the…

---

## [Color is not a module](https://www.ruby-forum.com/t/color-is-not-a-module/105505)

<div class="topic-metadata">

**Author:** [@Martijn\_van\_Leeuwen](https://www.ruby-forum.com/u/Martijn_van_Leeuwen)\
**Replies:** 6\
**Last updated:** [May 31, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/color-is-not-a-module/105505 "2007-05-31T13:08:19Z")

</div>

I have a problem with my pdf-writer-1.1.3 installation. When type require “pdf/writer” in the console i get the following error: TypeError: Color is not a module from /usr/local/lib/ruby/gems/1.8/gems/color-tools-1.3…

---

## [How to add MultiMedia?](https://www.ruby-forum.com/t/how-to-add-multimedia/105425)

<div class="topic-metadata">

**Author:** [@jhon](https://www.ruby-forum.com/u/jhon)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/how-to-add-multimedia/105425 "2007-05-31T12:40:52Z")

</div>

Hello, how can I make a form so that multimedia elements (Images, Video, Audio) is uploaded and then displayed on the site? Thanks :smiley:

---

## [How using attributes privates](https://www.ruby-forum.com/t/how-using-attributes-privates/105426)

<div class="topic-metadata">

**Author:** [@mr\_brownstone](https://www.ruby-forum.com/u/mr_brownstone)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/how-using-attributes-privates/105426 "2007-05-31T12:40:52Z")

</div>

How to use an “attr\_private”?

---

## [Form Change Old Password](https://www.ruby-forum.com/t/form-change-old-password/105581)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 12:23pm UTC](https://www.ruby-forum.com/t/form-change-old-password/105581 "2007-05-31T12:23:16Z")

</div>

Hello there, I want my users to be able to change their password. I wrote the code below but I need help to add error if the old password he posted did not match the current password he have. In the controller I have…

---

## [Has\_and\_belongs\_to\_many question](https://www.ruby-forum.com/t/has-and-belongs-to-many-question/105523)

<div class="topic-metadata">

**Author:** [@uli\_kunkel](https://www.ruby-forum.com/u/uli_kunkel)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 11:09am UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-question/105523 "2007-05-31T11:09:06Z")

</div>

Hi, I have a has\_and\_belongs\_to\_many relationship between games and users in my project. Now i want to save the rank a user had each game he played. It seems obvious to add a field in the table linking the two holding…

---

## [How to snip a URL](https://www.ruby-forum.com/t/how-to-snip-a-url/105575)

<div class="topic-metadata">

**Author:** [@saurabhbhatia](https://www.ruby-forum.com/u/saurabhbhatia)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 9:59am UTC](https://www.ruby-forum.com/t/how-to-snip-a-url/105575 "2007-05-31T09:59:29Z")

</div>

how do we convert long url to short url in a rails app like snipurl.com or dwarfurl.com some algorithm or approach? please help thanks

---

## [Question on boosting and pagination with acts\_as\_solr](https://www.ruby-forum.com/t/question-on-boosting-and-pagination-with-acts-as-solr/105571)

<div class="topic-metadata">

**Author:** [@msubhas](https://www.ruby-forum.com/u/msubhas)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 8:12am UTC](https://www.ruby-forum.com/t/question-on-boosting-and-pagination-with-acts-as-solr/105571 "2007-05-31T08:12:12Z")

</div>

I am currently working with Solr and acts\_as\_solr. I updated acts\_as\_solr to include boost value in field attributes and for some reason they dont seem to have an impact on result scores. On Pagination with acts as so…

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

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