# Rails

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

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

---

## [Creating types or categories](https://www.ruby-forum.com/t/creating-types-or-categories/148649)

<div class="topic-metadata">

**Author:** [@garth](https://www.ruby-forum.com/u/garth)\
**Replies:** 3\
**Last updated:** [September 15, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/creating-types-or-categories/148649 "2008-09-15T23:32:59Z")

</div>

Hi my question is relating to Controllers or I think Models. I have a site that allows a user to create one “Company” profile like a superuser account. From which that user can then create several Businesses under tha…

---

## [\[attachment\_fu\] Allways triggering after\_attachment\_saved callback](https://www.ruby-forum.com/t/attachment-fu-allways-triggering-after-attachment-saved-callback/148650)

<div class="topic-metadata">

**Author:** [@Drogomir](https://www.ruby-forum.com/u/Drogomir)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/attachment-fu-allways-triggering-after-attachment-saved-callback/148650 "2008-09-15T22:35:29Z")

</div>

Hi, I use attachment\_fu in one of my apps and recently I’ve realized that udpates are taking too much time. After some debugging I’ve found that attachment\_fu is calling after\_attachment\_saved callback no mather if a…

---

## [Accessing multiple rails apps from inside network](https://www.ruby-forum.com/t/accessing-multiple-rails-apps-from-inside-network/148626)

<div class="topic-metadata">

**Author:** [@bmcelhany](https://www.ruby-forum.com/u/bmcelhany)\
**Replies:** 4\
**Last updated:** [September 15, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/accessing-multiple-rails-apps-from-inside-network/148626 "2008-09-15T21:19:38Z")

</div>

Hi all, I’m not sure if this is the right forum for this question, but here goes: I have a web server at home (Apache2, Ubuntu) that is running two Rails apps. Each app is forwarded to a Mongrel cluster (app1 uses p…

---

## [Rails and Word -- Revised](https://www.ruby-forum.com/t/rails-and-word-revised/148642)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/rails-and-word-revised/148642 "2008-09-15T21:17:16Z")

</div>

Hi all, I have a rails app and would it to be able to create MS Word files. There was a discussion back in 2006 about this, but I’m wondering what today’s approach is to creating Word files. Is there a library now t…

---

## [Recursive updates](https://www.ruby-forum.com/t/recursive-updates/148582)

<div class="topic-metadata">

**Author:** [@paolo](https://www.ruby-forum.com/u/paolo)\
**Replies:** 2\
**Last updated:** [September 15, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/recursive-updates/148582 "2008-09-15T21:06:42Z")

</div>

Hi everybody, I’m trying to do some kind of recursive update that looks like this: Products list Quantity Price Balance 10 5 10 5 5 15 as you can see, balance is like the…

---

## [Actionmailer - Multipart and Outlook?](https://www.ruby-forum.com/t/actionmailer-multipart-and-outlook/147540)

<div class="topic-metadata">

**Author:** [@Matt\_Simpson](https://www.ruby-forum.com/u/Matt_Simpson)\
**Replies:** 2\
**Last updated:** [September 15, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/actionmailer-multipart-and-outlook/147540 "2008-09-15T20:50:52Z")

</div>

Hi, I’m having issues with getting a consistent result with the emails I am sending using Actionmailer. Problem: Emails that I send with plain text, rich text, and attachments do not display the same results across …

---

## [Instant Client: Connecting Oracle and Mac](https://www.ruby-forum.com/t/instant-client-connecting-oracle-and-mac/148638)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/instant-client-connecting-oracle-and-mac/148638 "2008-09-15T20:18:31Z")

</div>

Hi, I am having a terrible time installing Instant Client to connect my Mac and an Oracle db. I am using the following instructions: http://www.foliosus.com/2007/11/19/connecting-ruby-on-rails-to-oracle-on-an-intel-m…

---

## [Error while assigning the content type](https://www.ruby-forum.com/t/error-while-assigning-the-content-type/148633)

<div class="topic-metadata">

**Author:** [@Rockey](https://www.ruby-forum.com/u/Rockey)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/error-while-assigning-the-content-type/148633 "2008-09-15T19:32:04Z")

</div>

if request.post? @fData = params\[:photo\] puts("\\n\\n"removed\_email\_address@domain.invalid\_type+"\\n\\n\\n") # Here I am getting the right content type @fData.content\_type = File.mime\_type? (params\[:photo\].or…

---

## [Problems installing Ruby Enterprise Edition for Rails deploy](https://www.ruby-forum.com/t/problems-installing-ruby-enterprise-edition-for-rails-deploy/148625)

<div class="topic-metadata">

**Author:** [@oawofolu](https://www.ruby-forum.com/u/oawofolu)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/problems-installing-ruby-enterprise-edition-for-rails-deploy/148625 "2008-09-15T17:56:46Z")

</div>

Hello, I’m having problems with my Rails deployment (version 2.1.0, using Passenger). I have a basic Rails application which worked fine on an Ubuntu server, but after migrating it to RedHat the application sporadica…

---

## [Merb?](https://www.ruby-forum.com/t/merb/148586)

<div class="topic-metadata">

**Author:** [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Replies:** 10\
**Last updated:** [September 15, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/merb/148586 "2008-09-15T17:12:26Z")

</div>

I’ve basically completed my first Rails app. It’s so simple, though, that I was thinking of porting it to Merb. How hard would it be to do that? The only plugins I’m using are will\_paginate and Restful Authenticatio…

---

## [Using multipart/form-data when calling 'post' in tests](https://www.ruby-forum.com/t/using-multipart-form-data-when-calling-post-in-tests/148588)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/using-multipart-form-data-when-calling-post-in-tests/148588 "2008-09-15T16:49:38Z")

</div>

Hi, Has anyone used ActionController::Integration::Session#post in their integration tests to post multipart/form-data encoded parameters? eg my\_session.post url , encoded\_string , headers where ‘headers’ includes t…

---

## [Caching RJS fragments](https://www.ruby-forum.com/t/caching-rjs-fragments/148612)

<div class="topic-metadata">

**Author:** [@overclokkato](https://www.ruby-forum.com/u/overclokkato)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/caching-rjs-fragments/148612 "2008-09-15T16:34:08Z")

</div>

Do you have any hint for using fragment caching within a RJS response? I’ve the following piece of code in a rjs template for hotel in @hotels cache(:id =\> hotel.id, :format =\> params\[:format\]) do page.insert\_html(:b…

---

## [Difference between "require VS include"](https://www.ruby-forum.com/t/difference-between-require-vs-include/148608)

<div class="topic-metadata">

**Author:** [@palani](https://www.ruby-forum.com/u/palani)\
**Replies:** 2\
**Last updated:** [September 15, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/difference-between-require-vs-include/148608 "2008-09-15T16:17:35Z")

</div>

Hi, Can any one please tell me the difference between require statement and include statement in Rails application…please

---

## [Variables in error pages](https://www.ruby-forum.com/t/variables-in-error-pages/148605)

<div class="topic-metadata">

**Author:** [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/variables-in-error-pages/148605 "2008-09-15T15:46:19Z")

</div>

Hello! I want to make my own error pages with some variables, because description of the errors may vary. How can I make this? As far as I know, I can only place static html in /public folder.

---

## [Best rating plugin](https://www.ruby-forum.com/t/best-rating-plugin/148599)

<div class="topic-metadata">

**Author:** [@Shawn\_Tang](https://www.ruby-forum.com/u/Shawn_Tang)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 3:33pm UTC](https://www.ruby-forum.com/t/best-rating-plugin/148599 "2008-09-15T15:33:20Z")

</div>

Hi, I just joined rails and i need to create a website that rates products. Been googling but the rating plugins are either outdated or obsolete. Can someone point me to a working tutorial for a rating plugin? Regar…

---

## [ActiveRecord: save\_only\_valid\_attributes?](https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148580)

<div class="topic-metadata">

**Author:** [@brady8](https://www.ruby-forum.com/u/brady8)\
**Replies:** 5\
**Last updated:** [September 15, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148580 "2008-09-15T14:35:54Z")

</div>

Hello, I’m looking for a variation on the “save” method, that will only save attributes that do not have errors attached to them. So a model can be updated without being valid overall, and this will still prevent sav…

---

## [Render partial and text in one action](https://www.ruby-forum.com/t/render-partial-and-text-in-one-action/148542)

<div class="topic-metadata">

**Author:** [@pure](https://www.ruby-forum.com/u/pure)\
**Replies:** 4\
**Last updated:** [September 15, 2008, 2:19pm UTC](https://www.ruby-forum.com/t/render-partial-and-text-in-one-action/148542 "2008-09-15T14:19:14Z")

</div>

Hey all, how can i render :partial and render :text in one action? I need to update the partial and update an div field with some html data. Thanks for your help :slight\_smile:

---

## [Reinit assets per request](https://www.ruby-forum.com/t/reinit-assets-per-request/148597)

<div class="topic-metadata">

**Author:** [@fero](https://www.ruby-forum.com/u/fero)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/reinit-assets-per-request/148597 "2008-09-15T14:09:06Z")

</div>

Hi there. I am developing rails engine/plugin and I am changing CSS an JS files. How to configure application/engines to re-copy assets directory (of selected plugin(s)) to public directory PER REQUEST? (and thus have…

---

## [How to know the action (name) which I am coming from?](https://www.ruby-forum.com/t/how-to-know-the-action-name-which-i-am-coming-from/148303)

<div class="topic-metadata">

**Author:** [@paco.onrails](https://www.ruby-forum.com/u/paco.onrails)\
**Replies:** 8\
**Last updated:** [September 15, 2008, 11:46am UTC](https://www.ruby-forum.com/t/how-to-know-the-action-name-which-i-am-coming-from/148303 "2008-09-15T11:46:19Z")

</div>

Hi there! What I need is know the action name which I am coming from. Best regards. Paco

---

## [Database server without rails and Capistrano](https://www.ruby-forum.com/t/database-server-without-rails-and-capistrano/148590)

<div class="topic-metadata">

**Author:** [@shaggyrd](https://www.ruby-forum.com/u/shaggyrd)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 11:45am UTC](https://www.ruby-forum.com/t/database-server-without-rails-and-capistrano/148590 "2008-09-15T11:45:44Z")

</div>

Hi guys, I’ve a stupid capistrano question. This is my production environment: 2 web server 1 database server Is it possible to configure capistrano in order to migrate the database in my database server (only mysql…

---

## [What is best practice to indicate exception/error in controller?](https://www.ruby-forum.com/t/what-is-best-practice-to-indicate-exception-error-in-controller/148585)

<div class="topic-metadata">

**Author:** [@arifb](https://www.ruby-forum.com/u/arifb)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 11:43am UTC](https://www.ruby-forum.com/t/what-is-best-practice-to-indicate-exception-error-in-controller/148585 "2008-09-15T11:43:22Z")

</div>

Hi all, Just getting familiar with rails and am performing some checks in a method within a controller. If the checks fail, I would like to indicate to the user a custom error message and stop the update (the method …

---

## [UTF-8 in rails](https://www.ruby-forum.com/t/utf-8-in-rails/147885)

<div class="topic-metadata">

**Author:** [@difei](https://www.ruby-forum.com/u/difei)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 10:34am UTC](https://www.ruby-forum.com/t/utf-8-in-rails/147885 "2008-09-15T10:34:40Z")

</div>

Greetings all, Just hours ago I found the :with options of helpers like validates\_format\_of seems UTF-8 compatible (for instance, “/.{2}/” matches exactly two UTF-8 characters instead of a length 2 UTF-8 string). I a…

---

## [Webpage has expiered problem](https://www.ruby-forum.com/t/webpage-has-expiered-problem/148587)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 10:33am UTC](https://www.ruby-forum.com/t/webpage-has-expiered-problem/148587 "2008-09-15T10:33:30Z")

</div>

Dear all some of my users complained about the following error. It appears on Internet Explorer but not on Firefox is there any solution to this problem from the server side. Webpage has expired Most likely cause: …

---

## [Can some one Please help me](https://www.ruby-forum.com/t/can-some-one-please-help-me/148579)

<div class="topic-metadata">

**Author:** [@Kong7](https://www.ruby-forum.com/u/Kong7)\
**Replies:** 2\
**Last updated:** [September 15, 2008, 10:17am UTC](https://www.ruby-forum.com/t/can-some-one-please-help-me/148579 "2008-09-15T10:17:05Z")

</div>

I am new at Ruby on Rails. I downloaded everything and it is up and running, but when I started to create my first project,I had a problem with the boot.rb SEE BELOW… rescue Gem::LoadError =\> load\_error $stderr.put…

---

## [Best practice to indicate exception/validation error?](https://www.ruby-forum.com/t/best-practice-to-indicate-exception-validation-error/148581)

<div class="topic-metadata">

**Author:** [@arifb](https://www.ruby-forum.com/u/arifb)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 9:40am UTC](https://www.ruby-forum.com/t/best-practice-to-indicate-exception-validation-error/148581 "2008-09-15T09:40:42Z")

</div>

Hi all, Just getting familiar with rails and am performing some checks in a method within a controller. If the checks fail, I would like to indicate to the user a custom error message and stop the update (the method …

---

## [ActiveRecord: save\_only\_valid\_attributes?](https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148578)

<div class="topic-metadata">

**Author:** [@brady8](https://www.ruby-forum.com/u/brady8)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 9:38am UTC](https://www.ruby-forum.com/t/activerecord-save-only-valid-attributes/148578 "2008-09-15T09:38:56Z")

</div>

Hello, I’ve been going through the Rails code today, looking for a method that will allow me to save an invalid record, but only update attributes that do not have errors attached. (i.e. model.errors.on(:attribute) i…

---

## [Unusual Time Behavior in 2.1](https://www.ruby-forum.com/t/unusual-time-behavior-in-2-1/148575)

<div class="topic-metadata">

**Author:** [@maraby](https://www.ruby-forum.com/u/maraby)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 9:11am UTC](https://www.ruby-forum.com/t/unusual-time-behavior-in-2-1/148575 "2008-09-15T09:11:59Z")

</div>

I’m running into an odd situation where datetime\_select is making the hours into minutes and putting nothing in for hours. It sounds really odd, but it is whats happening. I generated a simple scaffold with the resu…

---

## [Issue with routes while running the STORIES](https://www.ruby-forum.com/t/issue-with-routes-while-running-the-stories/148574)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 0\
**Last updated:** [September 15, 2008, 8:45am UTC](https://www.ruby-forum.com/t/issue-with-routes-while-running-the-stories/148574 "2008-09-15T08:45:57Z")

</div>

Hi, I am having some issue with the path while running the stories. Below is my controller code. class ShopController \< ApplicationController def add\_to\_cart # My code here… end end in routes i have the following…

---

## [Creating large test datasets](https://www.ruby-forum.com/t/creating-large-test-datasets/148571)

<div class="topic-metadata">

**Author:** [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Replies:** 1\
**Last updated:** [September 15, 2008, 7:07am UTC](https://www.ruby-forum.com/t/creating-large-test-datasets/148571 "2008-09-15T07:07:49Z")

</div>

Hi, I want to create some large test datasets, what is a good way to do this? I don’t want to use fixtures, because i don’t want them to run during the normal db:fixtures:load rake command. Should i create a new rak…

---

## [Ruby PHP and Apache](https://www.ruby-forum.com/t/ruby-php-and-apache/148545)

<div class="topic-metadata">

**Author:** [@FryShadow](https://www.ruby-forum.com/u/FryShadow)\
**Replies:** 4\
**Last updated:** [September 15, 2008, 4:10am UTC](https://www.ruby-forum.com/t/ruby-php-and-apache/148545 "2008-09-15T04:10:05Z")

</div>

Hi guys :slight\_smile: 1st of all I’m still new with ruby and just following some tutorial to build with ruby language and ruby on rails. Before this I just bootup the webrick web server for development. Things come …

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

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