# Rails

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

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

---

## [Stoobie Noobie Roobie version ques tions redux â€¦](https://www.ruby-forum.com/t/stoobie-noobie-roobie-version-ques-tions-redux-a/168677)

<div class="topic-metadata">

**Author:** [@simon1](https://www.ruby-forum.com/u/simon1)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 1:52pm UTC](https://www.ruby-forum.com/t/stoobie-noobie-roobie-version-ques-tions-redux-a/168677 "2009-05-25T13:52:58Z")

</div>

â€˜Fossil fuels are for facile fools â€¦â€™. As Dr. Nick of the Simpsons Sez : Hi Everybody ! A couple of months ago (actually, around March 12th I asked a bunch of questions about what were the then most current v…

---

## [Update rails](https://www.ruby-forum.com/t/update-rails/168751)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 1:38pm UTC](https://www.ruby-forum.com/t/update-rails/168751 "2009-05-25T13:38:19Z")

</div>

I can’t update rail version 2.2.2 i have 2.1.0 what to do? i use command gem update rails -v 2.2.2 Also Firstly i use gem install -v= 2.2.2 rails it also take lot of time,but can’t process

---

## [Bulk SMS and Bulk Email](https://www.ruby-forum.com/t/bulk-sms-and-bulk-email/168755)

<div class="topic-metadata">

**Author:** [@cool](https://www.ruby-forum.com/u/cool)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/bulk-sms-and-bulk-email/168755 "2009-05-25T13:15:24Z")

</div>

Guys, How can we provide bulk sms and bulk email functionality in a merb application. Can you help me in this issue…

---

## [Periodic update related question](https://www.ruby-forum.com/t/periodic-update-related-question/168726)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 12:39pm UTC](https://www.ruby-forum.com/t/periodic-update-related-question/168726 "2009-05-25T12:39:17Z")

</div>

HI, I am looking to do something like the following – “Update a text area with the content of a file on the server every 5 second once. This activity should start once the “Run” button on my page is clicked” What is …

---

## [Validation with attribute\_accessor](https://www.ruby-forum.com/t/validation-with-attribute-accessor/168743)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 12:21pm UTC](https://www.ruby-forum.com/t/validation-with-attribute-accessor/168743 "2009-05-25T12:21:04Z")

</div>

hi I want to get country code for phone numbers in my form. I dont have database field for country\_code . So i created like below attr\_accessor :phone , :country\_code I have given for validation like below validate…

---

## [Counter cache column not updated by fixtures load](https://www.ruby-forum.com/t/counter-cache-column-not-updated-by-fixtures-load/168740)

<div class="topic-metadata">

**Author:** [@coriordan](https://www.ruby-forum.com/u/coriordan)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 11:27am UTC](https://www.ruby-forum.com/t/counter-cache-column-not-updated-by-fixtures-load/168740 "2009-05-25T11:27:03Z")

</div>

Hi, I’ve added a counter cache column to a model. When I load my models through fixtures, it doesn’t seem to affect the counter. regards, C.

---

## [How to pass arguments to functions in callbacks in model?](https://www.ruby-forum.com/t/how-to-pass-arguments-to-functions-in-callbacks-in-model/168684)

<div class="topic-metadata">

**Author:** [@arpit](https://www.ruby-forum.com/u/arpit)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 11:23am UTC](https://www.ruby-forum.com/t/how-to-pass-arguments-to-functions-in-callbacks-in-model/168684 "2009-05-25T11:23:33Z")

</div>

I need to pass attributes to the function called in callback in rails model. For example, after\_save :update\_something after\_destroy :update\_something, true #true is the argument that I need to pass private def …

---

## [Form\_for v/s field\_for](https://www.ruby-forum.com/t/form-for-v-s-field-for/168736)

<div class="topic-metadata">

**Author:** [@virendra](https://www.ruby-forum.com/u/virendra)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 11:17am UTC](https://www.ruby-forum.com/t/form-for-v-s-field-for/168736 "2009-05-25T11:17:42Z")

</div>

Hello I am trying to use complex-form in my application for which i have to use field\_for i want to know exactly the main difference of form\_for and field\_for and the logic behind field\_for thanks anyway

---

## [How to get selected value from select\_tag with params in remote\_function's url?](https://www.ruby-forum.com/t/how-to-get-selected-value-from-select-tag-with-params-in-remote-functions-url/168550)

<div class="topic-metadata">

**Author:** [@DelT](https://www.ruby-forum.com/u/DelT)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 11:03am UTC](https://www.ruby-forum.com/t/how-to-get-selected-value-from-select-tag-with-params-in-remote-functions-url/168550 "2009-05-25T11:03:38Z")

</div>

select\_tag(“skippage”, options\_for\_select ((first\_page…last\_page).to\_a), :onchange =\> remote\_function(:update =\> update, :url =\> {:controller =\> ‘user’ , :action =\> :list , :offset =\> ??? }, …

---

## [Dynamic drop down for subcategory based on 'On change' of ca](https://www.ruby-forum.com/t/dynamic-drop-down-for-subcategory-based-on-on-change-of-ca/168488)

<div class="topic-metadata">

**Author:** [@devirv](https://www.ruby-forum.com/u/devirv)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 10:53am UTC](https://www.ruby-forum.com/t/dynamic-drop-down-for-subcategory-based-on-on-change-of-ca/168488 "2009-05-25T10:53:16Z")

</div>

Hi, I am new to ror. I want to show ‘Dynamic drop down for subcategory based on ‘On change’ of category’ and below is the code I used. But I can make the sub category drop doen to be filtered based on category. Please…

---

## [Belongs\_to not saving foreign key](https://www.ruby-forum.com/t/belongs-to-not-saving-foreign-key/168687)

<div class="topic-metadata">

**Author:** [@Sean\_K](https://www.ruby-forum.com/u/Sean_K)\
**Replies:** 6\
**Last updated:** [May 25, 2009, 9:15am UTC](https://www.ruby-forum.com/t/belongs-to-not-saving-foreign-key/168687 "2009-05-25T09:15:10Z")

</div>

Under Rails 2.3.2 using a completely brand new project, I have 2 models: class Author \< ActiveRecord::Base name:string end class Book \< ActiveRecord::Base title:string belongs\_to :author # author\_id end And a simp…

---

## [STI Problem](https://www.ruby-forum.com/t/sti-problem/168650)

<div class="topic-metadata">

**Author:** [@nico](https://www.ruby-forum.com/u/nico)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 9:03am UTC](https://www.ruby-forum.com/t/sti-problem/168650 "2009-05-25T09:03:26Z")

</div>

Hi, I’m having trouble with some STI Classes in a test. When I create a new Class of an STI derived base class the type column is not set. If I do object = DerivedClass.create!(params) then object\[:type\] == nil for…

---

## [Nested habtm in views](https://www.ruby-forum.com/t/nested-habtm-in-views/168552)

<div class="topic-metadata">

**Author:** [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 9:02am UTC](https://www.ruby-forum.com/t/nested-habtm-in-views/168552 "2009-05-25T09:02:08Z")

</div>

Hi folks, hope someone can help me with this: There are four tables: Courses (has\_many) -\> CourseModules (has\_and\_belongs\_to\_many) -\> CourseModulesLectures (has\_and\_belongs\_to\_many) -\>Lectures. I’d like to get a tab…

---

## [Bug adapter firebird 2.1.2?](https://www.ruby-forum.com/t/bug-adapter-firebird-2-1-2/168238)

<div class="topic-metadata">

**Author:** [@mariarosaria](https://www.ruby-forum.com/u/mariarosaria)\
**Replies:** 5\
**Last updated:** [May 25, 2009, 8:41am UTC](https://www.ruby-forum.com/t/bug-adapter-firebird-2-1-2/168238 "2009-05-25T08:41:28Z")

</div>

mydb.fdb on windows firebird 2.0.3.12981 step\_1 gbak.exe -v -t -user sysdba -password \*\*\*\*\*\* 127.0.0.1/3050:D:\\webdb \\PROD\\mydb…fdb D:\\webdb\\back\\mydb.fbk on server linux firebird 2.1.2.18118 step\_2 linux-server:# …

---

## [onChange =\> remote\_function - Not able to get current id](https://www.ruby-forum.com/t/onchange-remote-function-not-able-to-get-current-id/168729)

<div class="topic-metadata">

**Author:** [@devirv](https://www.ruby-forum.com/u/devirv)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 8:35am UTC](https://www.ruby-forum.com/t/onchange-remote-function-not-able-to-get-current-id/168729 "2009-05-25T08:35:15Z")

</div>

Hi, Below is the code I am using to display drop down. This drop down is for displaying categories. \<% form\_for :category do |form| %\> \<%= form.collection\_select(:id,@categories, :id, :category\_name, {}, {:onChange…

---

## [Error running migration](https://www.ruby-forum.com/t/error-running-migration/196964)

<div class="topic-metadata">

**Author:** [@virendra](https://www.ruby-forum.com/u/virendra)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 7:29am UTC](https://www.ruby-forum.com/t/error-running-migration/196964 "2009-05-25T07:29:41Z")

</div>

Hello I generate a scaffold for the User it created a migration for me for user table now when iam trying to run that migration its give me a error a ran the migration command with --trace to crack down the source of …

---

## [Update page with results as they are scraped](https://www.ruby-forum.com/t/update-page-with-results-as-they-are-scraped/165005)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 8\
**Last updated:** [May 25, 2009, 7:12am UTC](https://www.ruby-forum.com/t/update-page-with-results-as-they-are-scraped/165005 "2009-05-25T07:12:17Z")

</div>

Hi, Im creating a screenscraper app that takes a users search term, scrapes several 3rd party sites and returns the aggregated results after a few seconds. Rather than wait for all the sites scraping to be completed …

---

## [Vote for Ruby on App Engine](https://www.ruby-forum.com/t/vote-for-ruby-on-app-engine/168727)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 5:24am UTC](https://www.ruby-forum.com/t/vote-for-ruby-on-app-engine/168727 "2009-05-25T05:24:34Z")

</div>

On the feature list for next languages to be supported by the App engine, ruby is losing to php. please go vote for ruby… http://code.google.com/p/googleappengine/issues/list?q=rails&updated=29&ts=1243221608 just “sta…

---

## [Passing a JavaScript variable through a Rails params hash](https://www.ruby-forum.com/t/passing-a-javascript-variable-through-a-rails-params-hash/168724)

<div class="topic-metadata">

**Author:** [@jbhruby](https://www.ruby-forum.com/u/jbhruby)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 4:04am UTC](https://www.ruby-forum.com/t/passing-a-javascript-variable-through-a-rails-params-hash/168724 "2009-05-25T04:04:16Z")

</div>

Hi guys, hoping someone can give me a pointer with this? I have a Javascript variable that I’m updating dynamically as a user interacts with the page. I want the user to be able to save it’s value at any time along wi…

---

## [Rails page caching with separately cached global elements](https://www.ruby-forum.com/t/rails-page-caching-with-separately-cached-global-elements/168723)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 3:50am UTC](https://www.ruby-forum.com/t/rails-page-caching-with-separately-cached-global-elements/168723 "2009-05-25T03:50:15Z")

</div>

I’m trying to build an optimized caching setup for my app. Large parts of the app will use full page caching (using something like Ben Scofield’s Progressive Enhancement approach http://www.slideshare.net/bscofield/p…

---

## [Is f.submit in a form\_for newer than submit\_tag?](https://www.ruby-forum.com/t/is-f-submit-in-a-form-for-newer-than-submit-tag/168716)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 12:54am UTC](https://www.ruby-forum.com/t/is-f-submit-in-a-form-for-newer-than-submit-tag/168716 "2009-05-25T00:54:14Z")

</div>

some books or even the rails api uses form\_for … … submit\_tag … end and i found that the Rails 2.3.2 Scaffold uses f.submit “Go” instead… and this is not in the rails api doc. Is this a new addition and is it s…

---

## [Rails 2.3 memcache performance drop](https://www.ruby-forum.com/t/rails-2-3-memcache-performance-drop/165015)

<div class="topic-metadata">

**Author:** [@Clinton](https://www.ruby-forum.com/u/Clinton)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 12:39am UTC](https://www.ruby-forum.com/t/rails-2-3-memcache-performance-drop/165015 "2009-05-25T00:39:02Z")

</div>

After much effort I upgraded our fairly large Rails app from 2.1 to 2.3. After deployment yesterday I noticed an across the board increase in response times. It seems that every call to memcache now takes 10x longer…

---

## [Voting and Polling](https://www.ruby-forum.com/t/voting-and-polling/168718)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 0\
**Last updated:** [May 24, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/voting-and-polling/168718 "2009-05-24T23:38:14Z")

</div>

I’m pretty new to this so hopefully this isn’t a redundant question as I couldn’t seem to find anything on it. How can I add voting capability to a site? I’m getting started building a site with Rails and I would li…

---

## [What is kENSURE and kEND in error message?](https://www.ruby-forum.com/t/what-is-kensure-and-kend-in-error-message/168711)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [May 24, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/what-is-kensure-and-kend-in-error-message/168711 "2009-05-24T22:56:01Z")

</div>

I sometimes get an error on the page as: compile error /Users/jian/ror/shov2/app/views/stories/index.html.erb:13: syntax error, unexpected kENSURE, expecting ‘)’ /Users/jian/ror/shov2/app/views/stories/index.html.erb:…

---

## [Index.erb vs rhtml](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710)

<div class="topic-metadata">

**Author:** [@rails\_n00b](https://www.ruby-forum.com/u/rails_n00b)\
**Replies:** 3\
**Last updated:** [May 24, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/index-erb-vs-rhtml/168710 "2009-05-24T22:13:38Z")

</div>

I am a total Ruby/RoR n00b having just started reading the ‘Ruby on Rails Bible’ book two days ago. I’ve been trying to work out through the introductory ‘Your first ruby on rails application’ section, but I’ve run in…

---

## [Problems with testing/Wrong table columns](https://www.ruby-forum.com/t/problems-with-testing-wrong-table-columns/168355)

<div class="topic-metadata">

**Author:** [@krani](https://www.ruby-forum.com/u/krani)\
**Replies:** 6\
**Last updated:** [May 24, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/problems-with-testing-wrong-table-columns/168355 "2009-05-24T20:25:23Z")

</div>

Hello, I’m new in rails developing and I’m just writing my first application. I already created some controllers and models and it works. But now I want to write some tests for my application, but I got problems. I …

---

## [Beginner](https://www.ruby-forum.com/t/beginner/168704)

<div class="topic-metadata">

**Author:** [@quark](https://www.ruby-forum.com/u/quark)\
**Replies:** 2\
**Last updated:** [May 24, 2009, 8:16pm UTC](https://www.ruby-forum.com/t/beginner/168704 "2009-05-24T20:16:33Z")

</div>

Hello everyone, I’m new to RoR, and I have a silly problem I can’t solve. I have a User class, with some attributes (login, password, online…). In the login form, I have a checkbox. I want to change the value of the …

---

## [!= not working in search query (thinking sphinx)](https://www.ruby-forum.com/t/not-working-in-search-query-thinking-sphinx/168701)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 3\
**Last updated:** [May 24, 2009, 8:06pm UTC](https://www.ruby-forum.com/t/not-working-in-search-query-thinking-sphinx/168701 "2009-05-24T20:06:34Z")

</div>

I have a int field in my database and would like to check if it’s not 0. Apparently the != in the condition is not working. I’m I doing something wrong? I tried different ways with no luck. Can anyone help? these are …

---

## [Sql Rand() returns same result](https://www.ruby-forum.com/t/sql-rand-returns-same-result/168664)

<div class="topic-metadata">

**Author:** [@jgjgjg](https://www.ruby-forum.com/u/jgjgjg)\
**Replies:** 4\
**Last updated:** [May 24, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/sql-rand-returns-same-result/168664 "2009-05-24T19:27:03Z")

</div>

I have a method that calls Model.find(:first, :order =\> “RAND()”) twice. I want it to return two different results but it always returns the same thing twice. Is there some kind of sql caching at work here? If so, can…

---

## [Preloading database tables](https://www.ruby-forum.com/t/preloading-database-tables/168691)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 5\
**Last updated:** [May 24, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/preloading-database-tables/168691 "2009-05-24T17:54:52Z")

</div>

Hello, as I write a little cms system, I need to preload some table with data. I don’t know, if ‘preloading’ is the right name for this. I know, that I can write into some tables right in the migration file, but I wa…

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

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