# Rails

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

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

---

## [How to show escaped html tags?](https://www.ruby-forum.com/t/how-to-show-escaped-html-tags/124125)

<div class="topic-metadata">

**Author:** [@wheels](https://www.ruby-forum.com/u/wheels)\
**Replies:** 1\
**Last updated:** [December 25, 2007, 9:19am UTC](https://www.ruby-forum.com/t/how-to-show-escaped-html-tags/124125 "2007-12-25T09:19:00Z")

</div>

I have text stored as escaped html tags: “Overview \<br\>\<br\> Keynote�s” Is there a way to un-escape all the html tags? I found rails functions that can escape the tags but I haven’t found anything to go back easily. …

---

## [Email issues](https://www.ruby-forum.com/t/email-issues/124103)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 6\
**Last updated:** [December 25, 2007, 6:16am UTC](https://www.ruby-forum.com/t/email-issues/124103 "2007-12-25T06:16:45Z")

</div>

I am having troubles getting the email configured to work properly. On the development side I have updated the config settings to throw errors if they occur, but the email seems to go through ok, but I never receive t…

---

## [How do you set accept headers in remote\_function?](https://www.ruby-forum.com/t/how-do-you-set-accept-headers-in-remote-function/124122)

<div class="topic-metadata">

**Author:** [@ptontiger](https://www.ruby-forum.com/u/ptontiger)\
**Replies:** 0\
**Last updated:** [December 25, 2007, 4:12am UTC](https://www.ruby-forum.com/t/how-do-you-set-accept-headers-in-remote-function/124122 "2007-12-25T04:12:17Z")

</div>

How do I set the accept header for an AJAX request from the remote\_function helper? I’ve tried everything I can think of but no dice. \<%= remote\_function( … :requestHeaders =\> { :Accept =\> “application/xml” }, … ) %\>…

---

## [How Do I Create a Conditional Setter Method](https://www.ruby-forum.com/t/how-do-i-create-a-conditional-setter-method/124098)

<div class="topic-metadata">

**Author:** [@blaine](https://www.ruby-forum.com/u/blaine)\
**Replies:** 6\
**Last updated:** [December 25, 2007, 3:00am UTC](https://www.ruby-forum.com/t/how-do-i-create-a-conditional-setter-method/124098 "2007-12-25T03:00:59Z")

</div>

I’m trying to write a setter method in one of my models. Let me explain the purpose quickly: I have two objects in my model (that are stored in the database) that I would like to be set as zero if a condition is true…

---

## [Odd script/server error](https://www.ruby-forum.com/t/odd-script-server-error/124101)

<div class="topic-metadata">

**Author:** [@rpupkin77](https://www.ruby-forum.com/u/rpupkin77)\
**Replies:** 4\
**Last updated:** [December 25, 2007, 2:18am UTC](https://www.ruby-forum.com/t/odd-script-server-error/124101 "2007-12-25T02:18:20Z")

</div>

hi, I am fairly new to rails, I started learning it about 6 months ago, but stopped when a big project came up. That was on a Windows machine. Since then, I have purchased a mac power book. I am ready to again. I ins…

---

## [Forms and ActiveRecord validation magic](https://www.ruby-forum.com/t/forms-and-activerecord-validation-magic/124117)

<div class="topic-metadata">

**Author:** [@gamehack](https://www.ruby-forum.com/u/gamehack)\
**Replies:** 2\
**Last updated:** [December 25, 2007, 12:58am UTC](https://www.ruby-forum.com/t/forms-and-activerecord-validation-magic/124117 "2007-12-25T00:58:17Z")

</div>

Hi all, I’ve been digging through the code which scaffold creates (Rails 2). What I’m am looking for is to determine how does error\_messages\_for and form\_for determine that ActiveRecord object is completely new and s…

---

## [Return day from date (javascript)?](https://www.ruby-forum.com/t/return-day-from-date-javascript/124041)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 11\
**Last updated:** [December 25, 2007, 12:23am UTC](https://www.ruby-forum.com/t/return-day-from-date-javascript/124041 "2007-12-25T00:23:12Z")

</div>

Ok, I know this isn’t a Rails problem, but if you could help me out that’d be brill. I’ve used JavaScript to create a new Date object containing a date of my choice… mydate = new Date(“11/24/2007”); //going with Jav…

---

## [How is rails different from PHP from Apache's view?](https://www.ruby-forum.com/t/how-is-rails-different-from-php-from-apaches-view/124057)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 9\
**Last updated:** [December 25, 2007, 12:01am UTC](https://www.ruby-forum.com/t/how-is-rails-different-from-php-from-apaches-view/124057 "2007-12-25T00:01:00Z")

</div>

Hi, I love rails much better than php. (I’m not a php expert, though.) However, when I use rails with apache, it’s painful. (I use Dreamhost as my web hosting server, by the way) I know that I can’t compare rails wi…

---

## [Uninitialized constant in integration test](https://www.ruby-forum.com/t/uninitialized-constant-in-integration-test/124112)

<div class="topic-metadata">

**Author:** [@osteo](https://www.ruby-forum.com/u/osteo)\
**Replies:** 1\
**Last updated:** [December 24, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-in-integration-test/124112 "2007-12-24T22:07:39Z")

</div>

I am seeing weird issues when trying to create integration tests. Here is a very simple example of something that is failing. The assert\_redirected\_to, and other methods, fail with this or similar exceptions. I hav…

---

## [Possible to run only one query?](https://www.ruby-forum.com/t/possible-to-run-only-one-query/124111)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [December 24, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/possible-to-run-only-one-query/124111 "2007-12-24T21:36:28Z")

</div>

Hi all, I’m hoping that someone out there knows a more efficient way to run a query on a model with multiple levels of belongs\_to’s. I’m working on a property management application, and the models I have are Proper…

---

## [Ferret and habtm](https://www.ruby-forum.com/t/ferret-and-habtm/124060)

<div class="topic-metadata">

**Author:** [@tresero](https://www.ruby-forum.com/u/tresero)\
**Replies:** 1\
**Last updated:** [December 24, 2007, 8:29pm UTC](https://www.ruby-forum.com/t/ferret-and-habtm/124060 "2007-12-24T20:29:14Z")

</div>

I was wondering if anyone had used ferret with an habtm relation? Say you have books and authors books habtm authors authors habtm books join table would be authors\_books I know in a 1 =\> m you can: acts\_as\_ferret …

---

## [Will\_paginate not from model, in array?](https://www.ruby-forum.com/t/will-paginate-not-from-model-in-array/122580)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 2\
**Last updated:** [December 24, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/will-paginate-not-from-model-in-array/122580 "2007-12-24T20:15:08Z")

</div>

Hi: I’ve got an array i’d like to paginate. It’s a collection of the same model, but I can’t seem to paginate accordingly. Here’s my code: \<%pics = PictureCategory.find\_goal\_pics(uid) pics = pics.paginate pics.each…

---

## [Attachment\_fu not saving other attributes (like width, height)](https://www.ruby-forum.com/t/attachment-fu-not-saving-other-attributes-like-width-height/123979)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 8\
**Last updated:** [December 24, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/attachment-fu-not-saving-other-attributes-like-width-height/123979 "2007-12-24T19:55:17Z")

</div>

http://pastie.caboo.se/131759 I’m only getting the basic filename, product\_id for the image, and size (kb). I am not getting the thumbnail generated (in db or filesystem), nor is it resizing the image as depicted in …

---

## [Having Problems With group\_by syntax](https://www.ruby-forum.com/t/having-problems-with-group-by-syntax/124020)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 6\
**Last updated:** [December 24, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/having-problems-with-group-by-syntax/124020 "2007-12-24T18:56:13Z")

</div>

I am embarrassed to say I am having problems with the group by syntax. What I want to do is take a record set that is returned and group it by the updated\_at field (but only up to the day and not hours, seconds, minu…

---

## [Note belongs\_to Company or Contact?](https://www.ruby-forum.com/t/note-belongs-to-company-or-contact/123981)

<div class="topic-metadata">

**Author:** [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Replies:** 6\
**Last updated:** [December 24, 2007, 5:47pm UTC](https://www.ruby-forum.com/t/note-belongs-to-company-or-contact/123981 "2007-12-24T17:47:10Z")

</div>

I’m wondering if anyone has suggestion on how to go about setting up a Model that can belong to multiple tables (but only one of them). For example, I have Companies and Contacts, both of whom can have Notes. However,…

---

## [Belongs to data from polymorphic interface](https://www.ruby-forum.com/t/belongs-to-data-from-polymorphic-interface/124095)

<div class="topic-metadata">

**Author:** [@whitewolfaustria](https://www.ruby-forum.com/u/whitewolfaustria)\
**Replies:** 0\
**Last updated:** [December 24, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/belongs-to-data-from-polymorphic-interface/124095 "2007-12-24T17:22:33Z")

</div>

Hi all, If anyone knows how to get data from the interface one what the belongs\_to class names are I would really appreciate knowing how to get it. for example Polymorphic table =\> interface ??? models I need th…

---

## [Problem with two relationships to the same table](https://www.ruby-forum.com/t/problem-with-two-relationships-to-the-same-table/124076)

<div class="topic-metadata">

**Author:** [@rakoon](https://www.ruby-forum.com/u/rakoon)\
**Replies:** 1\
**Last updated:** [December 24, 2007, 4:57pm UTC](https://www.ruby-forum.com/t/problem-with-two-relationships-to-the-same-table/124076 "2007-12-24T16:57:58Z")

</div>

Hi all, When I try to save a form with two collection\_select I get this error: ActiveRecord::AssociationTypeMismatch in InscripcionController#create Profesion expected, got String I think that the relationship betwee…

---

## [How to check if gems is installed](https://www.ruby-forum.com/t/how-to-check-if-gems-is-installed/123908)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 4\
**Last updated:** [December 24, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/how-to-check-if-gems-is-installed/123908 "2007-12-24T16:42:10Z")

</div>

Hi all, I use one-click installer to install ruby, together with gems under my vista box. I can type “ruby -v” from any directory and the promt windows shows ruby 1.8.6 after setting the enviroment variables. But I …

---

## [Application error](https://www.ruby-forum.com/t/application-error/123847)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 4\
**Last updated:** [December 24, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/application-error/123847 "2007-12-24T15:47:41Z")

</div>

Hi Guys, I’ve hosted with dreamhost and deployed my app in sub directory mydomain.com/project is the default executable directory under project i created rails “railsapp” i created symlink ln ln -s ~/mydomain.com/pro…

---

## [Session and Internal server Error](https://www.ruby-forum.com/t/session-and-internal-server-error/124085)

<div class="topic-metadata">

**Author:** [@Javier\_Q](https://www.ruby-forum.com/u/Javier_Q)\
**Replies:** 4\
**Last updated:** [December 24, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/session-and-internal-server-error/124085 "2007-12-24T14:49:02Z")

</div>

Hi, Im developing an application in Rails 2.02. Everything seems to work fine but the problems begin when I try to put some data in the session. I have a model in proyect/models: class Result attr\_accessor :names, :…

---

## [Salesforce integration with Rails app](https://www.ruby-forum.com/t/salesforce-integration-with-rails-app/124083)

<div class="topic-metadata">

**Author:** [@arjun\_ghosh](https://www.ruby-forum.com/u/arjun_ghosh)\
**Replies:** 0\
**Last updated:** [December 24, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/salesforce-integration-with-rails-app/124083 "2007-12-24T13:41:30Z")

</div>

Hi, I have problem here and have searched a lot on net but did not get any answers. Now what i am trying to do is create a rails app which talks to SalesForec API. I did a search found a Rails gem called ‘activesal…

---

## [Editing a row as an object](https://www.ruby-forum.com/t/editing-a-row-as-an-object/124000)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 12\
**Last updated:** [December 24, 2007, 12:26pm UTC](https://www.ruby-forum.com/t/editing-a-row-as-an-object/124000 "2007-12-24T12:26:26Z")

</div>

Why isn’t this changing the “strength” field in the db? There seems to be a disconnect between the row and the object :frowning: thufir@arrakis ~/Desktop/dwemthys $ thufir@arrakis ~/Desktop/dwemthys $ ruby read\_creat…

---

## [Disappearing Associations](https://www.ruby-forum.com/t/disappearing-associations/123876)

<div class="topic-metadata">

**Author:** [@Jon\_Wood](https://www.ruby-forum.com/u/Jon_Wood)\
**Replies:** 9\
**Last updated:** [December 24, 2007, 12:15pm UTC](https://www.ruby-forum.com/t/disappearing-associations/123876 "2007-12-24T12:15:54Z")

</div>

Hi, I’m using a belongs\_to association to link two models, and having some very odd problems with it. When I first view the page, all is well, and the associated object is loaded, however on the second view it crashe…

---

## [Routes.rb](https://www.ruby-forum.com/t/routes-rb/124075)

<div class="topic-metadata">

**Author:** [@milazzo](https://www.ruby-forum.com/u/milazzo)\
**Replies:** 0\
**Last updated:** [December 24, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/routes-rb/124075 "2007-12-24T12:00:32Z")

</div>

Greetings, I’ve just updated to Rails 2 and have rebuilt on of my apps, but I’m having a headache with the paths. Please can someone explain to me what I need to do. The path is simple: http://localhost:3000/home/en …

---

## [How to make a hidden datetime selector?](https://www.ruby-forum.com/t/how-to-make-a-hidden-datetime-selector/124040)

<div class="topic-metadata">

**Author:** [@reback](https://www.ruby-forum.com/u/reback)\
**Replies:** 4\
**Last updated:** [December 24, 2007, 9:22am UTC](https://www.ruby-forum.com/t/how-to-make-a-hidden-datetime-selector/124040 "2007-12-24T09:22:47Z")

</div>

Hi, I am still very much a beginner at this - seems pretty neat though! I have a nice little comments form like so: Post a comment \<%= form\_tag :action =\> "comment", :id =\> @post %\> Name: \<%= text\_field "comment", "…

---

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

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 1\
**Last updated:** [December 24, 2007, 9:02am UTC](https://www.ruby-forum.com/t/single-table-inheritance-implementation/124064 "2007-12-24T09:02:45Z")

</div>

I want to change the “type” field for a table but am getting an error: read\_creatures.rb:19: undefined local variable or method \`green\_dragon’ I’ve tried both “green\_dragon” and the class name “GreenDragon” with both …

---

## [Testing HTTP Basic Authentication](https://www.ruby-forum.com/t/testing-http-basic-authentication/124052)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [December 24, 2007, 8:47am UTC](https://www.ruby-forum.com/t/testing-http-basic-authentication/124052 "2007-12-24T08:47:33Z")

</div>

I’m using the new 2.0 HTTP Basic Authentication module mentioned in the announcement, and having trouble figuring out how to write a functional tests that will do both positive and negative tests. The framework docume…

---

## [Adding plugins to svn](https://www.ruby-forum.com/t/adding-plugins-to-svn/124061)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 4\
**Last updated:** [December 24, 2007, 8:45am UTC](https://www.ruby-forum.com/t/adding-plugins-to-svn/124061 "2007-12-24T08:45:48Z")

</div>

Since many of the plugins that I have are from an svn repository and contain .svn folders, what is the proper way to add the plugins to my svn repository without getting errors thrown? Thanks.

---

## [What does '::' actually mean?](https://www.ruby-forum.com/t/what-does-actually-mean/124003)

<div class="topic-metadata">

**Author:** [@Davo](https://www.ruby-forum.com/u/Davo)\
**Replies:** 4\
**Last updated:** [December 24, 2007, 8:10am UTC](https://www.ruby-forum.com/t/what-does-actually-mean/124003 "2007-12-24T08:10:44Z")

</div>

HI everyone, I’m just getting my head around Ruby/RoR syntax & wondered exactly what the colon/colon means in the example below ( and similar contexts ) ? ( I see that the \< is inheritance ) I’ve read it is somethin…

---

## [Prepend\_view\_path not working](https://www.ruby-forum.com/t/prepend-view-path-not-working/124039)

<div class="topic-metadata">

**Author:** [@cowboy\_x](https://www.ruby-forum.com/u/cowboy_x)\
**Replies:** 5\
**Last updated:** [December 24, 2007, 7:59am UTC](https://www.ruby-forum.com/t/prepend-view-path-not-working/124039 "2007-12-24T07:59:48Z")

</div>

Now that controllers can have multiple view paths I’ve been playing with themes over the weekend. Running into a view issues. I have a before\_filter in the ApplicationController that calls prepend\_view\_path to add t…

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

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