# Rails

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

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

---

## [Problem with acts\_as\_commentable plugin](https://www.ruby-forum.com/t/problem-with-acts-as-commentable-plugin/140238)

<div class="topic-metadata">

**Author:** [@infinit](https://www.ruby-forum.com/u/infinit)\
**Replies:** 1\
**Last updated:** [June 12, 2008, 6:50am UTC](https://www.ruby-forum.com/t/problem-with-acts-as-commentable-plugin/140238 "2008-06-12T06:50:50Z")

</div>

Hi, I added a comment model in app/models, and when I execute the following code:comment.commentable, the following error occurs NoMethodError: undefined method \`commentable’ for #\<Comment… . But when I delete the c…

---

## [Unidirectional belongs\_to polymorphic](https://www.ruby-forum.com/t/unidirectional-belongs-to-polymorphic/140230)

<div class="topic-metadata">

**Author:** [@gcnovus](https://www.ruby-forum.com/u/gcnovus)\
**Replies:** 1\
**Last updated:** [June 12, 2008, 5:34am UTC](https://www.ruby-forum.com/t/unidirectional-belongs-to-polymorphic/140230 "2008-06-12T05:34:45Z")

</div>

The setup: class Location::Base \< ActiveRecord::Base set\_table\_name :locations … end class Location::Address \< Location::Base … end class Location::Airport \< Location::Base … end class Person \< ActiveRecord::B…

---

## [Generated html not sortable?](https://www.ruby-forum.com/t/generated-html-not-sortable/140165)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 3\
**Last updated:** [June 12, 2008, 5:23am UTC](https://www.ruby-forum.com/t/generated-html-not-sortable/140165 "2008-06-12T05:23:37Z")

</div>

Hi, I’m using the rails sortable\_element helper on a list and after it has been sorted I have used this code: page\[‘page\_’ + p.id.to\_s\].replace :partial =\> ‘page’, :locals =\> { :page =\> p } to replace the list items…

---

## [Attachment\_Fu and Rails 2,1](https://www.ruby-forum.com/t/attachment-fu-and-rails-2-1/140115)

<div class="topic-metadata">

**Author:** [@photomatt](https://www.ruby-forum.com/u/photomatt)\
**Replies:** 3\
**Last updated:** [June 12, 2008, 4:07am UTC](https://www.ruby-forum.com/t/attachment-fu-and-rails-2-1/140115 "2008-06-12T04:07:15Z")

</div>

In my application, I use mini\_magick and I need to convert images to black and white and sepia tones. In Rails 1,2,3, this used to work: after\_resize do |record,img| logger.debug “img = #{img}” logger.debug “record …

---

## [Rspec & attachment\_fu](https://www.ruby-forum.com/t/rspec-attachment-fu/140227)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 1\
**Last updated:** [June 12, 2008, 2:15am UTC](https://www.ruby-forum.com/t/rspec-attachment-fu/140227 "2008-06-12T02:15:38Z")

</div>

Hi, Did anyone attempt to use rspec and attachment\_fu? How can I pass a file to attachment\_fu? What do I need to stub? Thanks, Tiberiu

---

## [Broken dom\_id](https://www.ruby-forum.com/t/broken-dom-id/140221)

<div class="topic-metadata">

**Author:** [@andrewkendall](https://www.ruby-forum.com/u/andrewkendall)\
**Replies:** 0\
**Last updated:** [June 12, 2008, 12:58am UTC](https://www.ruby-forum.com/t/broken-dom-id/140221 "2008-06-12T00:58:32Z")

</div>

In the docs for dom\_id, this is given as an example… dom\_id(Post.new(:id =\> 45)) # =\> “post\_45” This doesn’t work and I don’t see how it’s supposed to work. :id is a protected attribute, meaning it will be nil. The …

---

## [Remote mySQL Database](https://www.ruby-forum.com/t/remote-mysql-database/140149)

<div class="topic-metadata">

**Author:** [@martynyap](https://www.ruby-forum.com/u/martynyap)\
**Replies:** 6\
**Last updated:** [June 11, 2008, 11:23pm UTC](https://www.ruby-forum.com/t/remote-mysql-database/140149 "2008-06-11T23:23:34Z")

</div>

Hi, Tried to configure the database.yml file to point to a remote mysql database but faced an error “Connection refused - connect(2)”. Here’s a copy of my database.yml configuration. development: adapter: mysql enc…

---

## [Problems creating emails using ActionMailer](https://www.ruby-forum.com/t/problems-creating-emails-using-actionmailer/136753)

<div class="topic-metadata">

**Author:** [@benl](https://www.ruby-forum.com/u/benl)\
**Replies:** 15\
**Last updated:** [June 11, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/problems-creating-emails-using-actionmailer/136753 "2008-06-11T23:12:53Z")

</div>

Hi Guys, I am having some issues with ActionMailer in a new project I am working on. I am getting the following message: “Due to changes in ActionMailer you need to provide the mailer\_name as well as the template na…

---

## [A find to key pair](https://www.ruby-forum.com/t/a-find-to-key-pair/140178)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [June 11, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/a-find-to-key-pair/140178 "2008-06-11T23:02:49Z")

</div>

I would like to get an array/hash where I can write @image\[88\] and that would result in “thisimage.jpg”. I’ve got: @images = Image.find(:all, :select =\> “id, real\_file\_name”) result = {} @images.map {|a| result\[a.id\]…

---

## [How to tell if MySQL native bindings are used (Win32)?](https://www.ruby-forum.com/t/how-to-tell-if-mysql-native-bindings-are-used-win32/140211)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [June 11, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/how-to-tell-if-mysql-native-bindings-are-used-win32/140211 "2008-06-11T22:44:00Z")

</div>

Hi all, I believe I’ve installed the Windows native© bindings for MySQL by executing ‘gem install mysql’ and choosing the ‘1. mysql 2.7.3 (mswin32)’ option. However, I’m not sure how to tell if Rails is making use o…

---

## [Rspec?](https://www.ruby-forum.com/t/rspec/140213)

<div class="topic-metadata">

**Author:** [@cleaner416](https://www.ruby-forum.com/u/cleaner416)\
**Replies:** 0\
**Last updated:** [June 11, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/rspec/140213 "2008-06-11T22:40:10Z")

</div>

Anyone using rspec to spec/test engines? If so I’d would love to see some source code … Thanks!

---

## [Action Mailer and HTML](https://www.ruby-forum.com/t/action-mailer-and-html/140168)

<div class="topic-metadata">

**Author:** [@mex23](https://www.ruby-forum.com/u/mex23)\
**Replies:** 4\
**Last updated:** [June 11, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168 "2008-06-11T22:27:06Z")

</div>

I have a problem with HTML email and Outlook; no matter what I do, Outlook displays email like Text and not like formatted HTML. If I send the same to Yahoo or Google email account, received emails are HTML rendered,…

---

## [Acquire parent attribute from child via belongs\_to?](https://www.ruby-forum.com/t/acquire-parent-attribute-from-child-via-belongs-to/140198)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [June 11, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/acquire-parent-attribute-from-child-via-belongs-to/140198 "2008-06-11T22:18:41Z")

</div>

Poking around books & blogs about association proxies, and experimenting, but I can’t seem to come across the right combination for this one particular task. I’m assuming there’s a way to get the “user\_type” attribute…

---

## [Comments Plugin or Plugin for Disqus](https://www.ruby-forum.com/t/comments-plugin-or-plugin-for-disqus/140209)

<div class="topic-metadata">

**Author:** [@jh100000](https://www.ruby-forum.com/u/jh100000)\
**Replies:** 0\
**Last updated:** [June 11, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/comments-plugin-or-plugin-for-disqus/140209 "2008-06-11T21:55:58Z")

</div>

I am looking to add comments to articles that I write. What options do I have for plugins for comments? I noticed a lot of people like using disqus for comments but I am not sure what tools are available in Ruby on R…

---

## [+'s in urls?](https://www.ruby-forum.com/t/s-in-urls/140188)

<div class="topic-metadata">

**Author:** [@amanda](https://www.ruby-forum.com/u/amanda)\
**Replies:** 10\
**Last updated:** [June 11, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/s-in-urls/140188 "2008-06-11T21:02:05Z")

</div>

Okay so right now I have this as a route: map.connect ‘browse/:cal\_name’, :controller =\> ‘browse’, :action =\> ‘events\_listing’ If the :cal\_name has spaces in it (Test Calendar) for example, then the url appears as Te…

---

## [Help with validates \_uniqueness\_of for a has\_many table](https://www.ruby-forum.com/t/help-with-validates-uniqueness-of-for-a-has-many-table/140201)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 0\
**Last updated:** [June 11, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/help-with-validates-uniqueness-of-for-a-has-many-table/140201 "2008-06-11T21:00:27Z")

</div>

i have a list of COMPOUNDS (combinations) that have any number of COMPOUND\_MATERIALS of which both are ITEMS. (this is for a video game item database) i want to validate that the compounds are unique by validating it’…

---

## [Basic File Question](https://www.ruby-forum.com/t/basic-file-question/140090)

<div class="topic-metadata">

**Author:** [@Jorg\_L](https://www.ruby-forum.com/u/Jorg_L)\
**Replies:** 1\
**Last updated:** [June 11, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/basic-file-question/140090 "2008-06-11T20:55:01Z")

</div>

I’m a data person and some of the basics on the front end seem to escape me. I am merely trying to upload a file to the backend. Everything works except that what is uploaded is not the file but the reference to the …

---

## [Overwrite methods and using has\_many](https://www.ruby-forum.com/t/overwrite-methods-and-using-has-many/140185)

<div class="topic-metadata">

**Author:** [@christoph](https://www.ruby-forum.com/u/christoph)\
**Replies:** 4\
**Last updated:** [June 11, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/overwrite-methods-and-using-has-many/140185 "2008-06-11T20:05:06Z")

</div>

Dear Community, I’m using Ruby and especially Ruby on Rails only for a short time, so please excuse me, if the answer to my following question is obvious. Please also excuse my bad English, it’s not my mother tongue -…

---

## [Rails xxx database=mysql produces invalid database.yml under Windows](https://www.ruby-forum.com/t/rails-xxx-database-mysql-produces-invalid-database-yml-under-windows/140010)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 2\
**Last updated:** [June 11, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/rails-xxx-database-mysql-produces-invalid-database-yml-under-windows/140010 "2008-06-11T20:01:33Z")

</div>

Hi All, For days, I’ve been trying to get rake db:migration to work. My first error was pointed out to my on this NG: I was using a dot rather than colon in the rake command. My second error led me to conclude that …

---

## [AJAX enabled table?](https://www.ruby-forum.com/t/ajax-enabled-table/140186)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 1\
**Last updated:** [June 11, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/ajax-enabled-table/140186 "2008-06-11T19:58:36Z")

</div>

Hi, I’m wondering how you build an ajax enabled table? By enabled, I mean users can click on table headings and sort ascending or descending by that header, etc. I’ve seen some info on rubyonrails.org for another ty…

---

## [Upload images while editing and drag it to the doc](https://www.ruby-forum.com/t/upload-images-while-editing-and-drag-it-to-the-doc/140195)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 0\
**Last updated:** [June 11, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/upload-images-while-editing-and-drag-it-to-the-doc/140195 "2008-06-11T19:49:33Z")

</div>

Hi, I need to implement a WYSIWYG editor where a user can upload images and drag and drop them to the text area. It’s like Wordpress posting function. Is there any good reference? Sam

---

## [How to keep up with Rails?](https://www.ruby-forum.com/t/how-to-keep-up-with-rails/140120)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 3\
**Last updated:** [June 11, 2008, 7:38pm UTC](https://www.ruby-forum.com/t/how-to-keep-up-with-rails/140120 "2008-06-11T19:38:03Z")

</div>

Hello, I have a issue with Rails and the constant new versions that are coming out such as Rails 2.1. It seems that commands such as below seem to change as new versions are being released. For example the controller…

---

## [Crazy question: Storing an encrypted user password](https://www.ruby-forum.com/t/crazy-question-storing-an-encrypted-user-password/139792)

<div class="topic-metadata">

**Author:** [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Replies:** 3\
**Last updated:** [June 11, 2008, 7:24pm UTC](https://www.ruby-forum.com/t/crazy-question-storing-an-encrypted-user-password/139792 "2008-06-11T19:24:23Z")

</div>

Hi, I’m no expert at all on security, but today I was pondering an interesting idea about storing passwords for use across a network connection. Here’s the scenario: You have an application you want to deploy via Ca…

---

## [Rails - ActiveRecord doesn't commit, cache problem?](https://www.ruby-forum.com/t/rails-activerecord-doesnt-commit-cache-problem/140184)

<div class="topic-metadata">

**Author:** [@dicouw](https://www.ruby-forum.com/u/dicouw)\
**Replies:** 0\
**Last updated:** [June 11, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/rails-activerecord-doesnt-commit-cache-problem/140184 "2008-06-11T18:00:22Z")

</div>

Hi everybody, I’m facing a strange problem (bug?) with a rails application. It’s an standard application that does some inserts, updates, deletes etc… And there is a rake task, like a cron, that check existence or i…

---

## [Which relationship to use?](https://www.ruby-forum.com/t/which-relationship-to-use/140182)

<div class="topic-metadata">

**Author:** [@Davi\_V](https://www.ruby-forum.com/u/Davi_V)\
**Replies:** 2\
**Last updated:** [June 11, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/which-relationship-to-use/140182 "2008-06-11T17:37:23Z")

</div>

Hi all. I’ve the following scenario: users id cars id name One user has many cars, but I need to always edit cars table (add more models, edit actual models, etc.). So, I’m think about use another table: cars\_u…

---

## [After\_save filter on the join model cannot create new objects](https://www.ruby-forum.com/t/after-save-filter-on-the-join-model-cannot-create-new-objects/140176)

<div class="topic-metadata">

**Author:** [@Morgan\_G](https://www.ruby-forum.com/u/Morgan_G)\
**Replies:** 7\
**Last updated:** [June 11, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/after-save-filter-on-the-join-model-cannot-create-new-objects/140176 "2008-06-11T17:00:49Z")

</div>

Establishing a friend relationship with another user with a join model (user\_id, friend\_id). Normally this would result in one-way relationships (Jack is a friend of Jill but Jill is not a friend of Jack). To get aro…

---

## [Crontab utility for rails](https://www.ruby-forum.com/t/crontab-utility-for-rails/140031)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 5\
**Last updated:** [June 11, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/crontab-utility-for-rails/140031 "2008-06-11T16:49:03Z")

</div>

to run any function at periodically in SYSTEM then we can use crontab tool. for the same purpose,is there anything into RAILS project ?

---

## [Buggy forgery protection in Rails 2.1?](https://www.ruby-forum.com/t/buggy-forgery-protection-in-rails-2-1/140175)

<div class="topic-metadata">

**Author:** [@overclokkato](https://www.ruby-forum.com/u/overclokkato)\
**Replies:** 2\
**Last updated:** [June 11, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/buggy-forgery-protection-in-rails-2-1/140175 "2008-06-11T16:40:49Z")

</div>

Hello, I’ve just upgraded by app to Rails 2.1 and my log started to be filled with ActionController::InvalidAuthenticityToken exceptions. I have an application with external XML Restful access. It seems each time a r…

---

## [Adding large files to application](https://www.ruby-forum.com/t/adding-large-files-to-application/140134)

<div class="topic-metadata">

**Author:** [@toro04](https://www.ruby-forum.com/u/toro04)\
**Replies:** 2\
**Last updated:** [June 11, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/adding-large-files-to-application/140134 "2008-06-11T16:29:32Z")

</div>

Hi Guys, I am working on what I hope is a simple asset management system for the company work for. Does anyone have any recommendations for uploading large files to the system? We work in TV post production, so file…

---

## [Changing Views' Extensions](https://www.ruby-forum.com/t/changing-views-extensions/140173)

<div class="topic-metadata">

**Author:** [@prasad](https://www.ruby-forum.com/u/prasad)\
**Replies:** 1\
**Last updated:** [June 11, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/changing-views-extensions/140173 "2008-06-11T16:01:11Z")

</div>

Hi, Is there a way to change to the views’ file extensions from .rhtml to .html ?? If yes, how can I do that? Thanks, Prasad

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

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