# Rails

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

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

---

## [How do i define and access custom function in model](https://www.ruby-forum.com/t/how-do-i-define-and-access-custom-function-in-model/188452)

<div class="topic-metadata">

**Author:** [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Replies:** 3\
**Last updated:** [May 12, 2010, 10:54am UTC](https://www.ruby-forum.com/t/how-do-i-define-and-access-custom-function-in-model/188452 "2010-05-12T10:54:27Z")

</div>

i need to define a custom finction in model which is named as “count\_remaked\_users”. when i try to access that function from view (\< %=User.count\_remaked\_users%\>) i’m getting “undefined method” error. any clue for th…

---

## [How to add an after\_save callback on runtime on a particular instance](https://www.ruby-forum.com/t/how-to-add-an-after-save-callback-on-runtime-on-a-particular-instance/188445)

<div class="topic-metadata">

**Author:** [@Nadal](https://www.ruby-forum.com/u/Nadal)\
**Replies:** 2\
**Last updated:** [May 12, 2010, 10:53am UTC](https://www.ruby-forum.com/t/how-to-add-an-after-save-callback-on-runtime-on-a-particular-instance/188445 "2010-05-12T10:53:16Z")

</div>

class User \< AR end user = User.new Let’s say that I have a user instance with me. After this record is saved I want an after\_save callback which would print the id of the record. The only catch is that I am not al…

---

## [Link\_to\_remote is not works for me](https://www.ruby-forum.com/t/link-to-remote-is-not-works-for-me/188446)

<div class="topic-metadata">

**Author:** [@FZ101](https://www.ruby-forum.com/u/FZ101)\
**Replies:** 2\
**Last updated:** [May 12, 2010, 10:46am UTC](https://www.ruby-forum.com/t/link-to-remote-is-not-works-for-me/188446 "2010-05-12T10:46:50Z")

</div>

link\_to\_remote is not works for me here my codes in my user controller def edit puts “===== test output =====” end In view \<%= link\_to\_remote “Vote”,:controller=\>“poem”,:action=\>“vote\_for\_poem”%\> when i click the…

---

## [New version 2.5.0 of IBM\_DB gem now available](https://www.ruby-forum.com/t/new-version-2-5-0-of-ibm-db-gem-now-available/188455)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 0\
**Last updated:** [May 12, 2010, 10:35am UTC](https://www.ruby-forum.com/t/new-version-2-5-0-of-ibm-db-gem-now-available/188455 "2010-05-12T10:35:07Z")

</div>

Hi All, New version 2.5.0 of the IBM\_DB gem, the Rails Adapter/Ruby Driver for IBM DB2 and IBM Informix is now available. This release of the gem adds unicode support in the IBM\_DB driver for Ruby 1.9. When used with …

---

## [Selenium + javascript + cucumber](https://www.ruby-forum.com/t/selenium-javascript-cucumber/188453)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 0\
**Last updated:** [May 12, 2010, 10:00am UTC](https://www.ruby-forum.com/t/selenium-javascript-cucumber/188453 "2010-05-12T10:00:36Z")

</div>

Hello Friend, I iam stucked at a place where I am updating a div on click but the link is not a anchor tag it;s just a li which contain a text and when a user click on that tag a javascript function evoke and the di…

---

## [\[Announce\] Bond - A gem which autocompletes method arguments in rails console](https://www.ruby-forum.com/t/announce-bond-a-gem-which-autocompletes-method-arguments-in-rails-console/188399)

<div class="topic-metadata">

**Author:** [@cldwalker](https://www.ruby-forum.com/u/cldwalker)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 11:09pm UTC](https://www.ruby-forum.com/t/announce-bond-a-gem-which-autocompletes-method-arguments-in-rails-console/188399 "2010-05-11T23:09:15Z")

</div>

Hi, Announcing bond, a gem which enhances autocompletion in the rails console by autocompleting method arguments. It comes with the ability to autocomplete attribute/column names for any model’s class methods (i.e. c…

---

## [Find ALL and then count them up?](https://www.ruby-forum.com/t/find-all-and-then-count-them-up/187821)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 14\
**Last updated:** [May 11, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/find-all-and-then-count-them-up/187821 "2010-05-11T22:28:13Z")

</div>

Is it possible to do a find all, and then return the # of items?

---

## [JOBS: Principal Ruby on Rails Software Developer (Boston - relocation assistance provided)](https://www.ruby-forum.com/t/jobs-principal-ruby-on-rails-software-developer-boston-relocation-assistance-provided/188431)

<div class="topic-metadata">

**Author:** [@selectiverec1](https://www.ruby-forum.com/u/selectiverec1)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/jobs-principal-ruby-on-rails-software-developer-boston-relocation-assistance-provided/188431 "2010-05-11T21:50:09Z")

</div>

PLEASE SUBMIT RESUMES TO THE FOLLOWING LINK: http://hire.jobvite.com/j/?aj=o1HiVfwF&s=googlekeywords Brief Description Does the idea of working in a start-up environment where you have a significant role in defining …

---

## [\[JOBS\] Agile Rails job in Oceanside CA (w/plans to move to Orange County in the near future)](https://www.ruby-forum.com/t/jobs-agile-rails-job-in-oceanside-ca-w-plans-to-move-to-orange-county-in-the-near-future/188432)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/jobs-agile-rails-job-in-oceanside-ca-w-plans-to-move-to-orange-county-in-the-near-future/188432 "2010-05-11T21:38:26Z")

</div>

You: Programmer Loves to code. Creating and building stuff excites you Knows OO Uncle Bob’s SOLID, the principles of design patterns rather than rubber stamped templates Appreciate elegance, to include Kent Beck’s ru…

---

## [Sqlite3-ruby-1.2.5 is cached?](https://www.ruby-forum.com/t/sqlite3-ruby-1-2-5-is-cached/188411)

<div class="topic-metadata">

**Author:** [@jjrussell](https://www.ruby-forum.com/u/jjrussell)\
**Replies:** 7\
**Last updated:** [May 11, 2010, 7:32pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-1-2-5-is-cached/188411 "2010-05-11T19:32:11Z")

</div>

I had Rails --version 3.0.0.beta3 installed. When I try to start the server I get a message, "sqlite3-ruby-1.2.5 is cached, but not installed. Try running ‘bundle install’. When I run the bundle install the following …

---

## [RE: Reject a nested object if all parameters of its own nested object are blank](https://www.ruby-forum.com/t/re-reject-a-nested-object-if-all-parameters-of-its-own-nested-object-are-blank/188248)

<div class="topic-metadata">

**Author:** [@Fattah](https://www.ruby-forum.com/u/Fattah)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 7:26pm UTC](https://www.ruby-forum.com/t/re-reject-a-nested-object-if-all-parameters-of-its-own-nested-object-are-blank/188248 "2010-05-11T19:26:44Z")

</div>

You can write method to validate nested result attributes. Def valid\_nested\_results?(results\_attributes) results\_attributes.each do|res\_attr| return false if(res\_attr\[‘attr1’\].blank? and res\_attr\[‘attr2’\].blank? …) …

---

## [Inserted html using javascript function](https://www.ruby-forum.com/t/inserted-html-using-javascript-function/188424)

<div class="topic-metadata">

**Author:** [@Mlle](https://www.ruby-forum.com/u/Mlle)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 7:20pm UTC](https://www.ruby-forum.com/t/inserted-html-using-javascript-function/188424 "2010-05-11T19:20:18Z")

</div>

I’m using a javascript function to insert html code into my page (following the Railscast on nested models) The function that inserts the javascript is this: function add\_result(link, association, content) { var new\_…

---

## [Memcached and Rails 3](https://www.ruby-forum.com/t/memcached-and-rails-3/188423)

<div class="topic-metadata">

**Author:** [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 6:57pm UTC](https://www.ruby-forum.com/t/memcached-and-rails-3/188423 "2010-05-11T18:57:27Z")

</div>

I am porting a v2 app to v3 and hitting an issue with configuring memcached as the cache store via: config.cache\_store = :mem\_cache\_store, Memcached::Rails.new In the new version this generates: /Users/neil/code/gli/…

---

## [Can access the through attributes from the many with has\_many through?](https://www.ruby-forum.com/t/can-access-the-through-attributes-from-the-many-with-has-many-through/188414)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/can-access-the-through-attributes-from-the-many-with-has-many-through/188414 "2010-05-11T17:20:16Z")

</div>

hi - if i have A has\_many B A has\_many C through B Is there any way to retrieve the B attributes once I have a C object? For example: class User \< … has\_many :friend\_links has\_many :friends, :through =\> :friend\_l…

---

## [Reading an API Server Response](https://www.ruby-forum.com/t/reading-an-api-server-response/188409)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 5:11pm UTC](https://www.ruby-forum.com/t/reading-an-api-server-response/188409 "2010-05-11T17:11:29Z")

</div>

Hello, I am trying to debug an API. Towards the end of the process, the remote server sends me a request. I respond to that request with: render :text =\> my\_response, :status =\> 200. I am trying to find out how to…

---

## [Getting data from an ancestor (I think)](https://www.ruby-forum.com/t/getting-data-from-an-ancestor-i-think/188398)

<div class="topic-metadata">

**Author:** [@sso](https://www.ruby-forum.com/u/sso)\
**Replies:** 2\
**Last updated:** [May 11, 2010, 1:36pm UTC](https://www.ruby-forum.com/t/getting-data-from-an-ancestor-i-think/188398 "2010-05-11T13:36:02Z")

</div>

I’m setting up a music catalogue to learn my way around RoR. In index.html.erb I would like to show the band name instead of the id. What is the proper way to do this? records.rb class Record \< ActiveRecord::Base bel…

---

## [Treaceability Matrix](https://www.ruby-forum.com/t/treaceability-matrix/188402)

<div class="topic-metadata">

**Author:** [@m\_bhupendrain](https://www.ruby-forum.com/u/m_bhupendrain)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 12:59pm UTC](https://www.ruby-forum.com/t/treaceability-matrix/188402 "2010-05-11T12:59:30Z")

</div>

Hello Everyone, Can any suggest me use of traceability matrix in project management from QA point of view. Also it would be great, if i can have some sample/template on the same. Thanks & Regards Bhupendra

---

## [Any plugin/gem for charting?](https://www.ruby-forum.com/t/any-plugin-gem-for-charting/188386)

<div class="topic-metadata">

**Author:** [@shameermelethil](https://www.ruby-forum.com/u/shameermelethil)\
**Replies:** 2\
**Last updated:** [May 11, 2010, 12:22pm UTC](https://www.ruby-forum.com/t/any-plugin-gem-for-charting/188386 "2010-05-11T12:22:37Z")

</div>

Hi All, Could anybody tell me about most popular stable plugins/gems for charting in rails Thanks, Shameer

---

## [Has\_many\_polymorphs with searchlogic](https://www.ruby-forum.com/t/has-many-polymorphs-with-searchlogic/185635)

<div class="topic-metadata">

**Author:** [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 9:42am UTC](https://www.ruby-forum.com/t/has-many-polymorphs-with-searchlogic/185635 "2010-05-11T09:42:28Z")

</div>

Has anyone been able to use searchlogic with has\_many\_polymorphs? Are they compatible?

---

## [Changing link\_to link location slightly](https://www.ruby-forum.com/t/changing-link-to-link-location-slightly/188357)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 5\
**Last updated:** [May 11, 2010, 8:24am UTC](https://www.ruby-forum.com/t/changing-link-to-link-location-slightly/188357 "2010-05-11T08:24:00Z")

</div>

Hi, Basically I’m just wondering how I can change my link\_to’s location slightly. At the moment I have a system with categories and tutorials, and the categories have\_many tutorials. The link itself is like this: \<%…

---

## [Permission denied for folder creation using background\_fu](https://www.ruby-forum.com/t/permission-denied-for-folder-creation-using-background-fu/188390)

<div class="topic-metadata">

**Author:** [@anubhaw](https://www.ruby-forum.com/u/anubhaw)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 7:44am UTC](https://www.ruby-forum.com/t/permission-denied-for-folder-creation-using-background-fu/188390 "2010-05-11T07:44:05Z")

</div>

Hi All, I am calling a controller method to convert a video file. This process is called using background\_fu job. When the function tries to create a new folder in rails root it gives error i.e. Permission denied. The …

---

## [Backup rails project](https://www.ruby-forum.com/t/backup-rails-project/188365)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 3\
**Last updated:** [May 11, 2010, 3:57am UTC](https://www.ruby-forum.com/t/backup-rails-project/188365 "2010-05-11T03:57:40Z")

</div>

I’m using Ubuntu 10.04 But i need to restore the system, stuff isn’t working right after the update so I need to backup my rails project. Would a copy and paste onto a flashdrive work? What about all my migrated dat…

---

## [Link\_to error in beta3](https://www.ruby-forum.com/t/link-to-error-in-beta3/188354)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 3\
**Last updated:** [May 11, 2010, 3:43am UTC](https://www.ruby-forum.com/t/link-to-error-in-beta3/188354 "2010-05-11T03:43:03Z")

</div>

Can anybody take a quick look at the following problem, occurring with beta3 on Ruby 1.9.2 ? I used the scaffold generator for the above, so this is just using defaults (the example is in an index view; specifying a…

---

## [Prod vs. dev model loading](https://www.ruby-forum.com/t/prod-vs-dev-model-loading/188375)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 3:39am UTC](https://www.ruby-forum.com/t/prod-vs-dev-model-loading/188375 "2010-05-11T03:39:32Z")

</div>

Are there any conventions or anything to look out for assigning variables or what not running production mode as models and such are loaded only once? Is there anything that would cause something not to load or initi…

---

## [How to load js in ajax.?](https://www.ruby-forum.com/t/how-to-load-js-in-ajax/188376)

<div class="topic-metadata">

**Author:** [@soldier](https://www.ruby-forum.com/u/soldier)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 3:36am UTC](https://www.ruby-forum.com/t/how-to-load-js-in-ajax/188376 "2010-05-11T03:36:01Z")

</div>

I can’t loading my javascript when I use ajax replace local html. Can anybody help me? thanks.

---

## [RJS - ActionView::TemplateError (page)](https://www.ruby-forum.com/t/rjs-actionview-templateerror-page/188360)

<div class="topic-metadata">

**Author:** [@kmiller](https://www.ruby-forum.com/u/kmiller)\
**Replies:** 1\
**Last updated:** [May 11, 2010, 1:57am UTC](https://www.ruby-forum.com/t/rjs-actionview-templateerror-page/188360 "2010-05-11T01:57:39Z")

</div>

Without going into too much detail, is there something obvious that I’m missing here? It seems to be finding the RJS file as expected but generates this error: ActionView::TemplateError (undefined local variable or m…

---

## [Creating a database view in a Rails way without ActiveCouch?](https://www.ruby-forum.com/t/creating-a-database-view-in-a-rails-way-without-activecouch/188355)

<div class="topic-metadata">

**Author:** [@Rafael\_SSSuguiura](https://www.ruby-forum.com/u/Rafael_SSSuguiura)\
**Replies:** 3\
**Last updated:** [May 11, 2010, 1:12am UTC](https://www.ruby-forum.com/t/creating-a-database-view-in-a-rails-way-without-activecouch/188355 "2010-05-11T01:12:33Z")

</div>

Is it possible to create a database view in a Rails way without ActiveCouch?

---

## [How RoR extract a http parameterfrom arequest?](https://www.ruby-forum.com/t/how-ror-extract-a-http-parameterfrom-arequest/188369)

<div class="topic-metadata">

**Author:** [@anaconda\_wly](https://www.ruby-forum.com/u/anaconda_wly)\
**Replies:** 0\
**Last updated:** [May 11, 2010, 12:41am UTC](https://www.ruby-forum.com/t/how-ror-extract-a-http-parameterfrom-arequest/188369 "2010-05-11T00:41:34Z")

</div>

This is request made from the client: new Ajax.Updater(“sip\_tab\_content”, “/rails/test\_modules/show/”+$F"boardid"), {method :‘get’, onFailure:displaySIPTabFailure, onComplete:displaySIPTabFailure }); This is contr…

---

## [How to run a cron file](https://www.ruby-forum.com/t/how-to-run-a-cron-file/188258)

<div class="topic-metadata">

**Author:** [@manish](https://www.ruby-forum.com/u/manish)\
**Replies:** 5\
**Last updated:** [May 11, 2010, 12:30am UTC](https://www.ruby-forum.com/t/how-to-run-a-cron-file/188258 "2010-05-11T00:30:24Z")

</div>

Hi all I want to run this in production mode. RAILS\_ENV=production ruby script/runner lib/camp.rb in cron file. what i have done in cron file is below RAILS\_ENV=production /usr/bin/ruby /mnt/apps/NearbyAd…

---

## [Anyone RoR users in Sarasota Florida Or Tampa want to networ](https://www.ruby-forum.com/t/anyone-ror-users-in-sarasota-florida-or-tampa-want-to-networ/82449)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 6\
**Last updated:** [May 10, 2010, 11:13pm UTC](https://www.ruby-forum.com/t/anyone-ror-users-in-sarasota-florida-or-tampa-want-to-networ/82449 "2010-05-10T23:13:42Z")

</div>

If your in my area drop me a line, I’m looking to get connected with other RoR, Python, Linux, BSD lving people!! OSX counts too :slight\_smile: – -mike

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

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