# Rails

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

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

---

## [Model inheritance problem](https://www.ruby-forum.com/t/model-inheritance-problem/123022)

<div class="topic-metadata">

**Author:** [@Adam\_Oldak](https://www.ruby-forum.com/u/Adam_Oldak)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 2:30pm UTC](https://www.ruby-forum.com/t/model-inheritance-problem/123022 "2007-12-13T14:30:14Z")

</div>

Hi, I’ve bumped into the following problem. I have two models, one inheriting from another: class Message \< ActiveRecord::Base … def reply\_link \[returns string\] end end class SpecificMessage \< Message … end I…

---

## [Updating Restful Authentication Plug](https://www.ruby-forum.com/t/updating-restful-authentication-plug/122973)

<div class="topic-metadata">

**Author:** [@rlwinter](https://www.ruby-forum.com/u/rlwinter)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 12:42pm UTC](https://www.ruby-forum.com/t/updating-restful-authentication-plug/122973 "2007-12-13T12:42:31Z")

</div>

Hi all, Does anyone know if there is information available about updating the restful\_authentication plugin on an existing application. There were some recent fixes to make it work properly with the Rails 2.0.1 relea…

---

## [Acts\_as\_attachment -\> attachment\_fu, db\_system -\> file\_system](https://www.ruby-forum.com/t/acts-as-attachment-attachment-fu-db-system-file-system/123010)

<div class="topic-metadata">

**Author:** [@apie](https://www.ruby-forum.com/u/apie)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 12:10pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-attachment-fu-db-system-file-system/123010 "2007-12-13T12:10:41Z")

</div>

Hi I currently have an app running with acts\_as\_attachment and db\_system. I would like to convert it to attachment\_fu and file\_system. Has anyone done this? Are there any pitfalls? I am aware that the change from act…

---

## [From Db Text to Hash \[Please Need really Help\]](https://www.ruby-forum.com/t/from-db-text-to-hash-please-need-really-help/123011)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/from-db-text-to-hash-please-need-really-help/123011 "2007-12-13T12:08:59Z")

</div>

Dear Teacher, I am newb in RoR, i have problem to convert data from database to hash. Example: before I save data to MySQL DB to column ‘budget\_list’, the hash is : @market\_budget = \[\[BMW5, 2007-12-26, 30000\], \[B…

---

## [Accessing directly to show action with a submit button](https://www.ruby-forum.com/t/accessing-directly-to-show-action-with-a-submit-button/123009)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 11:34am UTC](https://www.ruby-forum.com/t/accessing-directly-to-show-action-with-a-submit-button/123009 "2007-12-13T11:34:53Z")

</div>

Hi everybody! I’m working on a google-like search engine, using Ferret to index documents on a smb share. Everything works fine, but I still would like to get rid of the useless action ‘check\_query’, that doesn’t do …

---

## [Railsmanual is down](https://www.ruby-forum.com/t/railsmanual-is-down/78298)

<div class="topic-metadata">

**Author:** [@SSSSSbastien\_Gruhie](https://www.ruby-forum.com/u/SSSSSbastien_Gruhie)\
**Replies:** 3\
**Last updated:** [December 13, 2007, 11:33am UTC](https://www.ruby-forum.com/t/railsmanual-is-down/78298 "2007-12-13T11:33:35Z")

</div>

:frowning: There is an error on http://railsmanual.org Mysql::Error in DocController#index Can’t connect to local MySQL server through socket ‘/var/lib/mysql/ mysql.sock’ (111) RAILS\_ROOT: /u/apps/www.railsmanual.co…

---

## [Problem in the authorization plugin](https://www.ruby-forum.com/t/problem-in-the-authorization-plugin/123004)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 11:27am UTC](https://www.ruby-forum.com/t/problem-in-the-authorization-plugin/123004 "2007-12-13T11:27:54Z")

</div>

hi All, i used the authorization plugin and add it to my application. bt when it runs it gives a error like this, Couldn’t find #current\_user or @user, and nothing appropriate found in hash any one hows where i have…

---

## [Aliasing customer.mysite.com to customer.com possible?](https://www.ruby-forum.com/t/aliasing-customer-mysite-com-to-customer-com-possible/123000)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 11:05am UTC](https://www.ruby-forum.com/t/aliasing-customer-mysite-com-to-customer-com-possible/123000 "2007-12-13T11:05:43Z")

</div>

I’m using DHH’s Account Location plugin to create the subdomains for the users. If a user wants a unique domain name for their account (e.g. customer.com), instead of the default customer.mysite.com, is that possible? …

---

## [How do I force download with LiteSpeed?](https://www.ruby-forum.com/t/how-do-i-force-download-with-litespeed/123003)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 10:49am UTC](https://www.ruby-forum.com/t/how-do-i-force-download-with-litespeed/123003 "2007-12-13T10:49:08Z")

</div>

Hi! Searched a long time for this, but haven’t found an answer. I’m trying to make the user download a special file, no matter what mediatype it is (could be jpg, pdf or doc for example). My code right now is this: d…

---

## [Lead management in Rails](https://www.ruby-forum.com/t/lead-management-in-rails/123002)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 10:46am UTC](https://www.ruby-forum.com/t/lead-management-in-rails/123002 "2007-12-13T10:46:34Z")

</div>

Hi, I want to develop a simple lead management system for the leads we collect through are webform. Functionality: Store leads A user can update the lead (status) Nows someone a tutorial or snippets to guide me in …

---

## [Help with Model Associations](https://www.ruby-forum.com/t/help-with-model-associations/122978)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 9:58am UTC](https://www.ruby-forum.com/t/help-with-model-associations/122978 "2007-12-13T09:58:47Z")

</div>

HI everybody, I need some help with model association. Here I have one user table. User table. id name 1 XXX 2 YYY 3 ZZZ 4 XYZ Message Table id sender\_id receiver\_id message 1 1 2 …

---

## [Validating the presence of a foreign key?](https://www.ruby-forum.com/t/validating-the-presence-of-a-foreign-key/122797)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 3\
**Last updated:** [December 13, 2007, 9:50am UTC](https://www.ruby-forum.com/t/validating-the-presence-of-a-foreign-key/122797 "2007-12-13T09:50:35Z")

</div>

In the docs it says I should validate the presence of the foreign key and not the object itself. I did this and I still get the error when both objects are new records. A very simple example: class UserGroup \< ActiveR…

---

## [To\_xml ignore fields](https://www.ruby-forum.com/t/to-xml-ignore-fields/122945)

<div class="topic-metadata">

**Author:** [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 9:40am UTC](https://www.ruby-forum.com/t/to-xml-ignore-fields/122945 "2007-12-13T09:40:36Z")

</div>

Hi! I’d like to know how to (most easily) ignore some elements from produced XML … for example: @people.to\_xml produces: 2 bob carson street ... How can I not produce the “ID” field for example? Thank you!

---

## [Gsub ignorecase unicode](https://www.ruby-forum.com/t/gsub-ignorecase-unicode/122819)

<div class="topic-metadata">

**Author:** [@ferro\_i](https://www.ruby-forum.com/u/ferro_i)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 9:00am UTC](https://www.ruby-forum.com/t/gsub-ignorecase-unicode/122819 "2007-12-13T09:00:44Z")

</div>

Hey guys ‘Ã¶Ã§ÄŸÃ¼ÅŸ’.chars.upcase =\> “Ã–Ã‡ÄžÃœÅž” work perfectly How do you gsub the special characters (Ã¥Ã¤Ã¶Ã¼)? I use utf-8 rails 1.2. “AÃ–ÅžaÃ¶ÅŸ”.chars.gsub(/(\[aÃ¶ÅŸ\])/i, ’ â€¢\\1â€¢ ') =\> â€¢Aâ€¢ Ã–Åž â€¢aâ€…

---

## [Help on RESTful design and URL](https://www.ruby-forum.com/t/help-on-restful-design-and-url/122989)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 8:53am UTC](https://www.ruby-forum.com/t/help-on-restful-design-and-url/122989 "2007-12-13T08:53:42Z")

</div>

I’m developing blog/CMS application and I’m considering if I should use RESTful design for my app. map.resources will create “blog/1/item/2” type URLs, but it doesn’t seam pretty. I searched on the Web and found the w…

---

## [New LearningRails.com podcast posted, what topics would be useful to you?](https://www.ruby-forum.com/t/new-learningrails-com-podcast-posted-what-topics-would-be-useful-to-you/122760)

<div class="topic-metadata">

**Author:** [@chaupt](https://www.ruby-forum.com/u/chaupt)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 8:28am UTC](https://www.ruby-forum.com/t/new-learningrails-com-podcast-posted-what-topics-would-be-useful-to-you/122760 "2007-12-13T08:28:29Z")

</div>

Hi all, Michael S. and I just posted our second episode of the “LearningRails.com” podcast intended for new programmers aspiring to learn and use Rails and for designers who need to work with Rails developers. This e…

---

## [How to flag changes and load data from another table?](https://www.ruby-forum.com/t/how-to-flag-changes-and-load-data-from-another-table/122984)

<div class="topic-metadata">

**Author:** [@jojobert](https://www.ruby-forum.com/u/jojobert)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 8:16am UTC](https://www.ruby-forum.com/t/how-to-flag-changes-and-load-data-from-another-table/122984 "2007-12-13T08:16:10Z")

</div>

Hi, i have a course table, programme table and a degree table. The user has to create courses and programmes and when they add courses to programmes, it will be stored in the degree table. I have four fields from Co…

---

## [How to set virtual attributes while saving multiple models?](https://www.ruby-forum.com/t/how-to-set-virtual-attributes-while-saving-multiple-models/122990)

<div class="topic-metadata">

**Author:** [@theremix](https://www.ruby-forum.com/u/theremix)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 8:02am UTC](https://www.ruby-forum.com/t/how-to-set-virtual-attributes-while-saving-multiple-models/122990 "2007-12-13T08:02:50Z")

</div>

i need to let the user choose a few optional parameters through checkboxes, that when one is checked for example, will do this on the Upload model: @thumbs.update :Small =\> ‘600x800\>’ and if another checkbox is check…

---

## [Script/server and irbrc](https://www.ruby-forum.com/t/script-server-and-irbrc/122986)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 7:53am UTC](https://www.ruby-forum.com/t/script-server-and-irbrc/122986 "2007-12-13T07:53:19Z")

</div>

What’s the reason that script/server loads your .irbrc for every page request? It seems dangerous to me for a couple of reasons, one is that it might make your development environment drastically different than your p…

---

## [Mysql error on brand new application with one empty controller](https://www.ruby-forum.com/t/mysql-error-on-brand-new-application-with-one-empty-controller/122983)

<div class="topic-metadata">

**Author:** [@Jhorra](https://www.ruby-forum.com/u/Jhorra)\
**Replies:** 6\
**Last updated:** [December 13, 2007, 7:38am UTC](https://www.ruby-forum.com/t/mysql-error-on-brand-new-application-with-one-empty-controller/122983 "2007-12-13T07:38:41Z")

</div>

I just purchased the rails space book, and I’m walking through. All I did so far was create the application, and the controller with three empty actions. When I try to navigate to any of them I get the following err…

---

## [Generate scaffold or model for join table?](https://www.ruby-forum.com/t/generate-scaffold-or-model-for-join-table/122913)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 6:16am UTC](https://www.ruby-forum.com/t/generate-scaffold-or-model-for-join-table/122913 "2007-12-13T06:16:55Z")

</div>

I’m using http://wiki.rubyonrails.org/rails/pages/ThroughAssociations as a guide, but it doesn’t say how to generate the model for the join table. Which of the following would be preferable: script/generate scaffold …

---

## [Lost on what's next](https://www.ruby-forum.com/t/lost-on-whats-next/122976)

<div class="topic-metadata">

**Author:** [@geoffw](https://www.ruby-forum.com/u/geoffw)\
**Replies:** 8\
**Last updated:** [December 13, 2007, 6:07am UTC](https://www.ruby-forum.com/t/lost-on-whats-next/122976 "2007-12-13T06:07:57Z")

</div>

I’ve finished reading the Agile Web D. with Rails and the Intro to Ruby books. I followed the examples, learned how to create the basics but… I’m not sure what to do next. The books only cover the bare basics, and al…

---

## [Ruby Testing](https://www.ruby-forum.com/t/ruby-testing/122805)

<div class="topic-metadata">

**Author:** [@manjularaj](https://www.ruby-forum.com/u/manjularaj)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 5:52am UTC](https://www.ruby-forum.com/t/ruby-testing/122805 "2007-12-13T05:52:40Z")

</div>

Hi, How do i write unit test without writing the validations? Is it possible to write the unit test or functional test before writing the validation and controller code? manjula

---

## [Best server + database to use with Rails?](https://www.ruby-forum.com/t/best-server-database-to-use-with-rails/122936)

<div class="topic-metadata">

**Author:** [@Action](https://www.ruby-forum.com/u/Action)\
**Replies:** 6\
**Last updated:** [December 13, 2007, 5:50am UTC](https://www.ruby-forum.com/t/best-server-database-to-use-with-rails/122936 "2007-12-13T05:50:28Z")

</div>

I’ve never touched Ruby or Rails before (PHP developer) and I’ve decided to check out what the hype is all about. I’ve read that Ruby on Rails has issues with Apache. Is that still true? If so, what server + database …

---

## [Cookies/Session Management](https://www.ruby-forum.com/t/cookies-session-management/122975)

<div class="topic-metadata">

**Author:** [@corywilkerson](https://www.ruby-forum.com/u/corywilkerson)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 5:28am UTC](https://www.ruby-forum.com/t/cookies-session-management/122975 "2007-12-13T05:28:22Z")

</div>

All, I tried to take this to my host but they’ve deferred to me which means I’m deferring to the community. I’ve currently got an issue where my application is giving a user two distinct sessions/cookies - not a good…

---

## [Help on act\_as\_ferret](https://www.ruby-forum.com/t/help-on-act-as-ferret/122977)

<div class="topic-metadata">

**Author:** [@santoshat20007](https://www.ruby-forum.com/u/santoshat20007)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 5:09am UTC](https://www.ruby-forum.com/t/help-on-act-as-ferret/122977 "2007-12-13T05:09:27Z")

</div>

Hi, My name is santoshkumar r Patil. I am using ferret for searching. I am using mult\_search for searching a query on multiple modal and there are different conditions on different model. EX User.multi\_search(search…

---

## [Add a month to a Date object](https://www.ruby-forum.com/t/add-a-month-to-a-date-object/122944)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 6\
**Last updated:** [December 13, 2007, 5:07am UTC](https://www.ruby-forum.com/t/add-a-month-to-a-date-object/122944 "2007-12-13T05:07:09Z")

</div>

Howdy all, This may be the dumbest question in the world, but how can you “add one month” to a Date object? I can’t just add 30 days, because months have varying lengths. Any help would be much appreciated… Thanks! …

---

## [Setting of parent shell params?](https://www.ruby-forum.com/t/setting-of-parent-shell-params/122972)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 4:21am UTC](https://www.ruby-forum.com/t/setting-of-parent-shell-params/122972 "2007-12-13T04:21:32Z")

</div>

Guys, I have a problem with one of my rake tasks. It loads a very large yaml file into the db, but because of the default limitation on stack size in the Linux shell, the task craps out. Executing “ulimit -s 16384” f…

---

## [Getting plugins to automatically reload](https://www.ruby-forum.com/t/getting-plugins-to-automatically-reload/122970)

<div class="topic-metadata">

**Author:** [@rickm](https://www.ruby-forum.com/u/rickm)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 4:10am UTC](https://www.ruby-forum.com/t/getting-plugins-to-automatically-reload/122970 "2007-12-13T04:10:26Z")

</div>

Hey there, I’m trying to figure out why suddenly my plugins won’t auto reload on request anymore. I used to use this code to make it work: if RAILS\_ENV == ‘development’ Dependencies.load\_once\_paths.flatten.each do |…

---

## [Generating PDF- environment.rb problem](https://www.ruby-forum.com/t/generating-pdf-environment-rb-problem/122800)

<div class="topic-metadata">

**Author:** [@valerieloy](https://www.ruby-forum.com/u/valerieloy)\
**Replies:** 3\
**Last updated:** [December 13, 2007, 2:38am UTC](https://www.ruby-forum.com/t/generating-pdf-environment-rb-problem/122800 "2007-12-13T02:38:24Z")

</div>

Hi, I would like to implement a PDF function into my application. I have already installed the pdf-writer-1.1.6. Firstly, there are several folders in this zip folder e.g. pdf, writer etc. Where exactly should I pas…

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

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