# Rails

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

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

---

## [\[ANN\] Social networking with Rails using ActsAsNetwork](https://www.ruby-forum.com/t/ann-social-networking-with-rails-using-actsasnetwork/115195)

<div class="topic-metadata">

**Author:** [@Stephen\_Lombardo](https://www.ruby-forum.com/u/Stephen_Lombardo)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/ann-social-networking-with-rails-using-actsasnetwork/115195 "2007-09-21T16:38:06Z")

</div>

ActsAsNetwork is a plugin that we’ve recently extracted from PingMe ( http://gopingme.com ) to simplify the definition and storage of network relationships between entities using ActiveRecord. It drives the social net…

---

## [Rake task from crontab?](https://www.ruby-forum.com/t/rake-task-from-crontab/114520)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/rake-task-from-crontab/114520 "2007-09-21T16:16:30Z")

</div>

Is there a good way to run a rake task from a crontab? It seems like I’d need to put in my crontab: “cd rails\_dir; rake whatever”. Which is kind of ugly. Is there some way to set a value in the rake command line to e…

---

## [Model field accessor missing? Driving me insane](https://www.ruby-forum.com/t/model-field-accessor-missing-driving-me-insane/115126)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 3\
**Last updated:** [September 21, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/model-field-accessor-missing-driving-me-insane/115126 "2007-09-21T15:55:58Z")

</div>

I did a simple migration… class AddAdminDesignationToUsers \< ActiveRecord::Migration def self.up add\_column :users, :is\_admin, :boolean end def self.down remove\_column :users, :is\_admin end end Now, if I go into…

---

## [Rendering view for another controller?](https://www.ruby-forum.com/t/rendering-view-for-another-controller/115004)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 7\
**Last updated:** [September 21, 2007, 3:21pm UTC](https://www.ruby-forum.com/t/rendering-view-for-another-controller/115004 "2007-09-21T15:21:43Z")

</div>

I asked this last week but nobody answered. Surely in the age of AJAX someone knows how to do this… Let’s say I have a Foo object, and the Foo object has Comment objects associated with it: I have a Foo controller,…

---

## [Threaded?](https://www.ruby-forum.com/t/threaded/115079)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 9\
**Last updated:** [September 21, 2007, 3:04pm UTC](https://www.ruby-forum.com/t/threaded/115079 "2007-09-21T15:04:51Z")

</div>

Hi, I admit I am relatively new to RoR, but, I have a question about threading… I have my ruby app and one of the things it can do is import a huge quantity of data into the database via the web interface. When I kick …

---

## [Observe\_field and :function](https://www.ruby-forum.com/t/observe-field-and-function/114727)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 1:55pm UTC](https://www.ruby-forum.com/t/observe-field-and-function/114727 "2007-09-21T13:55:41Z")

</div>

Hi, I m using the observe\_field helper with the :function attribute. If I do the following everything it works without any issue: \<%= observe\_field ‘select\_gender’, {:function =\> “(value == ‘2’) ? $(‘record\_ohrmarke’…

---

## [How to do "delete item" AJAX](https://www.ruby-forum.com/t/how-to-do-delete-item-ajax/115187)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 1:45pm UTC](https://www.ruby-forum.com/t/how-to-do-delete-item-ajax/115187 "2007-09-21T13:45:07Z")

</div>

if we add an item to the shopping cart, the AJAX is easy: the View adds an item to the cart, and also set the “current\_item\_added” and then just let the view (RJS) update the whole cart content, and then blink the cur…

---

## [Initialization: where does Rails 'require' its plugins' lib/](https://www.ruby-forum.com/t/initialization-where-does-rails-require-its-plugins-lib/115182)

<div class="topic-metadata">

**Author:** [@xonmac](https://www.ruby-forum.com/u/xonmac)\
**Replies:** 3\
**Last updated:** [September 21, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/initialization-where-does-rails-require-its-plugins-lib/115182 "2007-09-21T13:37:24Z")

</div>

Hi guys, Can someone point out, where, during initialization, Rails calls “require” on those files which are located in vendor/plugins/ some\_plugin/lib? Thanks a lot! xonmac

---

## [How to combine a text box and select box in rails](https://www.ruby-forum.com/t/how-to-combine-a-text-box-and-select-box-in-rails/115185)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 1:22pm UTC](https://www.ruby-forum.com/t/how-to-combine-a-text-box-and-select-box-in-rails/115185 "2007-09-21T13:22:36Z")

</div>

Hi folks, Is there any way to combine a text and a select box like combo box. Regards, Veeraa.T

---

## [Calculate age of a person and compare it](https://www.ruby-forum.com/t/calculate-age-of-a-person-and-compare-it/115186)

<div class="topic-metadata">

**Author:** [@abhi](https://www.ruby-forum.com/u/abhi)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/calculate-age-of-a-person-and-compare-it/115186 "2007-09-21T13:19:21Z")

</div>

how can i calculate the age of a person using database " birth date" my teble is user and column is bday … now i want to calculate the age will some one please tell me how can i calculate the age… actually i want to…

---

## [Complex Error Handling](https://www.ruby-forum.com/t/complex-error-handling/115158)

<div class="topic-metadata">

**Author:** [@Curtis\_Hawthorne](https://www.ruby-forum.com/u/Curtis_Hawthorne)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 1:16pm UTC](https://www.ruby-forum.com/t/complex-error-handling/115158 "2007-09-21T13:16:21Z")

</div>

I’ve got a model that has to check other objects before it is valid. If there are problems with the other objects, I want to report that and also give the template access to the offending objects. The regular errors …

---

## [Undefined method \`request' for "products":String?](https://www.ruby-forum.com/t/undefined-method-request-for-products-string/115095)

<div class="topic-metadata">

**Author:** [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 12:18pm UTC](https://www.ruby-forum.com/t/undefined-method-request-for-products-string/115095 "2007-09-21T12:18:34Z")

</div>

Since updated edge yesturday i have had a series of errors related to undefinded methods for “products”:String. I do have these controllers namespaced. ==== Errors example 1: undefined method \`request’ for “products…

---

## [Clob Handling](https://www.ruby-forum.com/t/clob-handling/196473)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/clob-handling/196473 "2007-09-21T12:04:32Z")

</div>

Hello In an oracle table, I hava a field of CLOB type (named “VXML”). This column have a XML text and i would like to parse it to extract several informations. In ruby when i access to this column, and for exemple, i…

---

## [How to do "delete item" AJAX](https://www.ruby-forum.com/t/how-to-do-delete-item-ajax/115177)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 11:35am UTC](https://www.ruby-forum.com/t/how-to-do-delete-item-ajax/115177 "2007-09-21T11:35:47Z")

</div>

if we add an item to the shopping cart, the AJAX is easy: the View adds an item to the cart, and also set the “current\_item\_added” and then just let the view (RJS) update the whole cart content, and then blink the cur…

---

## [Problem in V3 product search in yahoo shopping](https://www.ruby-forum.com/t/problem-in-v3-product-search-in-yahoo-shopping/115175)

<div class="topic-metadata">

**Author:** [@asitk](https://www.ruby-forum.com/u/asitk)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 11:33am UTC](https://www.ruby-forum.com/t/problem-in-v3-product-search-in-yahoo-shopping/115175 "2007-09-21T11:33:20Z")

</div>

Hi all, I am trying to implement the yahoo shopping apis in my application. I am trying to get the response using the XMLSimple. I am getting proper result for the V1 and V2 product search. But V3 product search is no…

---

## [Attachement\_fu max\_size problem...mystery...need help please](https://www.ruby-forum.com/t/attachement-fu-max-size-problem-mystery-need-help-please/115173)

<div class="topic-metadata">

**Author:** [@pacochin](https://www.ruby-forum.com/u/pacochin)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 11:20am UTC](https://www.ruby-forum.com/t/attachement-fu-max-size-problem-mystery-need-help-please/115173 "2007-09-21T11:20:12Z")

</div>

Hi All, Just to share with you, after many hours of hair scratching, 10 cubs of coffee and sleepless night, i finally got attachement\_fu creating thumbnail for me… BUT, there is a mysterious problem i encounter. Wha…

---

## [RoR Wireless?](https://www.ruby-forum.com/t/ror-wireless/115165)

<div class="topic-metadata">

**Author:** [@ivan\_trajkovic](https://www.ruby-forum.com/u/ivan_trajkovic)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 10:47am UTC](https://www.ruby-forum.com/t/ror-wireless/115165 "2007-09-21T10:47:22Z")

</div>

Hi guys! Does anyone have any knowledge and experience in using RoR for wireless applications? I am thinking of implementing a few features at my site www.quickker.com and would appreciate any input on that topic. Pl…

---

## [ActiveFixture: loading fixtures into database with correct f](https://www.ruby-forum.com/t/activefixture-loading-fixtures-into-database-with-correct-f/115163)

<div class="topic-metadata">

**Author:** [@Alex\_Le](https://www.ruby-forum.com/u/Alex_Le)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 10:05am UTC](https://www.ruby-forum.com/t/activefixture-loading-fixtures-into-database-with-correct-f/115163 "2007-09-21T10:05:56Z")

</div>

Hello everyone, I’ve released a plugin called ActiveFixture to allow loading fixtures into database in correct order based on the foreign key constraints defined within the ActiveRecord models. After installing the p…

---

## [Rescue Error in Module](https://www.ruby-forum.com/t/rescue-error-in-module/115166)

<div class="topic-metadata">

**Author:** [@phudson1442](https://www.ruby-forum.com/u/phudson1442)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 10:05am UTC](https://www.ruby-forum.com/t/rescue-error-in-module/115166 "2007-09-21T10:05:28Z")

</div>

Hi, I am not sure why, but I get the following error when I try to catch a specific exception: uninitialized constant One::ActiveRecord::RecordNotFound Here is some example code that I will use for simplification. W…

---

## [Select list and observe\_field problem](https://www.ruby-forum.com/t/select-list-and-observe-field-problem/115127)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 3\
**Last updated:** [September 21, 2007, 9:01am UTC](https://www.ruby-forum.com/t/select-list-and-observe-field-problem/115127 "2007-09-21T09:01:51Z")

</div>

Hey all, I have attached an observe\_field to a select box in one of my views in order to trigger a function when the user selects a new item. The problem is that I can not seem to be able to convince it by any means …

---

## [\[ANN\] Rails plugin: jQuery Helper for Rails (jq4r)](https://www.ruby-forum.com/t/ann-rails-plugin-jquery-helper-for-rails-jq4r/115162)

<div class="topic-metadata">

**Author:** [@ericsk](https://www.ruby-forum.com/u/ericsk)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 8:19am UTC](https://www.ruby-forum.com/t/ann-rails-plugin-jquery-helper-for-rails-jq4r/115162 "2007-09-21T08:19:48Z")

</div>

Hi all, I’ve just written a Rails plugin: jQuery Helper for Rails (jq4r) and it works as ActionView::Helper::PrototypeHelper and ActionView::Helper::Scriptaculous but jq4r generates the jQuery code instead. I’ve alr…

---

## [Oracle date, i get 0007 instead of 2007](https://www.ruby-forum.com/t/oracle-date-i-get-0007-instead-of-2007/115059)

<div class="topic-metadata">

**Author:** [@alexmic](https://www.ruby-forum.com/u/alexmic)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 5:18am UTC](https://www.ruby-forum.com/t/oracle-date-i-get-0007-instead-of-2007/115059 "2007-09-21T05:18:35Z")

</div>

I’m running Oracle and in my table i have a field: SCHEDULED\_DATE of type DATE. When I do a query model = MyModel.find(1) model.scheduled\_date\_before\_type\_case ends up being equal to ‘0007-09-19’ instead of ‘2007-09…

---

## [A self-contained Rails application/benchmark?](https://www.ruby-forum.com/t/a-self-contained-rails-application-benchmark/114951)

<div class="topic-metadata">

**Author:** [@znmeb](https://www.ruby-forum.com/u/znmeb)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 4:34am UTC](https://www.ruby-forum.com/t/a-self-contained-rails-application-benchmark/114951 "2007-09-21T04:34:28Z")

</div>

I’m looking for a self-contained Rails application that I can use as a benchmark for Ruby, Rails, and presumably the hardware and RDBMS as well. It must be open source. It’s not particularly important to me what the a…

---

## [\<=\> comparison operator method undefined in AR class](https://www.ruby-forum.com/t/comparison-operator-method-undefined-in-ar-class/114575)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 4\
**Last updated:** [September 21, 2007, 4:30am UTC](https://www.ruby-forum.com/t/comparison-operator-method-undefined-in-ar-class/114575 "2007-09-21T04:30:28Z")

</div>

I have an active record class that looks like the following: class TemplatePhotoSlot \< ActiveRecord::Base belongs\_to :template used in the autoflow photo best fit algorithm def \<=\>(other) self.slot\_num \< other.slot\_n…

---

## [Canonical place to store ruby object files?](https://www.ruby-forum.com/t/canonical-place-to-store-ruby-object-files/114625)

<div class="topic-metadata">

**Author:** [@steveeq1](https://www.ruby-forum.com/u/steveeq1)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 4:23am UTC](https://www.ruby-forum.com/t/canonical-place-to-store-ruby-object-files/114625 "2007-09-21T04:23:25Z")

</div>

I am sorry for asking such an obvious question, but I am starting to write with objects in RoR. I want to follow the standard convention of putting one object per file. But where is the standard location to put the fi…

---

## [Dynamic database table](https://www.ruby-forum.com/t/dynamic-database-table/115151)

<div class="topic-metadata">

**Author:** [@inrila](https://www.ruby-forum.com/u/inrila)\
**Replies:** 1\
**Last updated:** [September 21, 2007, 4:17am UTC](https://www.ruby-forum.com/t/dynamic-database-table/115151 "2007-09-21T04:17:25Z")

</div>

Just out of curiosity, Is it possible with RoR (to be more exact - with ActiveRecord) to create database table “on fly”, from the application?

---

## [How to serve rhtml files under /public, not /app/views?](https://www.ruby-forum.com/t/how-to-serve-rhtml-files-under-public-not-app-views/115061)

<div class="topic-metadata">

**Author:** [@akira](https://www.ruby-forum.com/u/akira)\
**Replies:** 11\
**Last updated:** [September 21, 2007, 4:06am UTC](https://www.ruby-forum.com/t/how-to-serve-rhtml-files-under-public-not-app-views/115061 "2007-09-21T04:06:23Z")

</div>

Dear all, I’m running Instantrails on Windows, and I’m wondering if I can put some ruby code to html files under the /public folder. (rather than those application code under the /app folder) Do I need to tune someth…

---

## [Trouble with Rmagick and profile data](https://www.ruby-forum.com/t/trouble-with-rmagick-and-profile-data/115153)

<div class="topic-metadata">

**Author:** [@shinji](https://www.ruby-forum.com/u/shinji)\
**Replies:** 0\
**Last updated:** [September 21, 2007, 3:22am UTC](https://www.ruby-forum.com/t/trouble-with-rmagick-and-profile-data/115153 "2007-09-21T03:22:19Z")

</div>

When I load up an image via rmagick, I get everything except profile data: (from script/console) img = Magick::Image.read("/image\_with\_iptc.jpg").first =\> /image\_with\_iptc.jpg JPEG 2560x1600 2560x1600+0+0 DirectCla…

---

## [Elusive Nil Object error on Comments](https://www.ruby-forum.com/t/elusive-nil-object-error-on-comments/115140)

<div class="topic-metadata">

**Author:** [@ebrad](https://www.ruby-forum.com/u/ebrad)\
**Replies:** 2\
**Last updated:** [September 21, 2007, 3:08am UTC](https://www.ruby-forum.com/t/elusive-nil-object-error-on-comments/115140 "2007-09-21T03:08:16Z")

</div>

I have 2 models: Applicants and Comments. Applicants has\_many Comments and Comments belongs\_to Applicant. If I add validation to my Applicants model (for example, “validates\_presence\_of :first\_name”) and edit the app…

---

## [Encyclopedia of Life starts on Rails - seeking open source d](https://www.ruby-forum.com/t/encyclopedia-of-life-starts-on-rails-seeking-open-source-d/115131)

<div class="topic-metadata">

**Author:** [@peetucket](https://www.ruby-forum.com/u/peetucket)\
**Replies:** 5\
**Last updated:** [September 21, 2007, 2:38am UTC](https://www.ruby-forum.com/t/encyclopedia-of-life-starts-on-rails-seeking-open-source-d/115131 "2007-09-21T02:38:14Z")

</div>

Hello all, I am a software developer at the Encyclopedia of Life project (http:// www.eol.org), a recently announced effort funded by the MacArthur and Sloan Foundations to produce a web page for each of the 1.8 milli…

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

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