# Rails

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

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

---

## [Doubt in retrieving data to html?](https://www.ruby-forum.com/t/doubt-in-retrieving-data-to-html/173540)

<div class="topic-metadata">

**Author:** [@karthik](https://www.ruby-forum.com/u/karthik)\
**Replies:** 3\
**Last updated:** [August 11, 2009, 7:03am UTC](https://www.ruby-forum.com/t/doubt-in-retrieving-data-to-html/173540 "2009-08-11T07:03:47Z")

</div>

hi I have a controller def showagencies @getdata=Agency.all(:joins=\>:contracts, :select=\>“agencies.\*”,:conditions=\>\[“contract\_id in (?) and agencies.status =?”,contracts.id,1 \]) end @getdata is not visible in html…

---

## [How to backup VPS?](https://www.ruby-forum.com/t/how-to-backup-vps/173532)

<div class="topic-metadata">

**Author:** [@bbqbaker](https://www.ruby-forum.com/u/bbqbaker)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 6:25am UTC](https://www.ruby-forum.com/t/how-to-backup-vps/173532 "2009-08-11T06:25:26Z")

</div>

hi, i was wondering if there is a easy way to backup my vps account? basically grab the ubuntu image and all the packages i installed? thanks!

---

## [ActiveRecord to\_json encoding](https://www.ruby-forum.com/t/activerecord-to-json-encoding/173521)

<div class="topic-metadata">

**Author:** [@calvin98115](https://www.ruby-forum.com/u/calvin98115)\
**Replies:** 4\
**Last updated:** [August 11, 2009, 3:55am UTC](https://www.ruby-forum.com/t/activerecord-to-json-encoding/173521 "2009-08-11T03:55:49Z")

</div>

Question: Hi, our company is using Ruby 1.8.6 with Rails 2.2.2. Does anyone know how we can explicitly specify what encoding to use when calling .to\_json on an ActiveRecord? Description: We have some multibyte char…

---

## [LDAP - binding and selection lists](https://www.ruby-forum.com/t/ldap-binding-and-selection-lists/173527)

<div class="topic-metadata">

**Author:** [@KTKTKT](https://www.ruby-forum.com/u/KTKTKT)\
**Replies:** 0\
**Last updated:** [August 10, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/ldap-binding-and-selection-lists/173527 "2009-08-10T23:56:29Z")

</div>

Hi all, Let me apologize in advance if I’m overcomplicating my post… I currently use AuthLogic along with this LDAP validation method in the User model : class User \< ActiveRecord::Base def valid\_ldap\_credentials?(…

---

## [ActiveRecord - \<%= and \<% yielding different records](https://www.ruby-forum.com/t/activerecord-and-yielding-different-records/173339)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 22\
**Last updated:** [August 10, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/activerecord-and-yielding-different-records/173339 "2009-08-10T23:04:23Z")

</div>

I have a problem of gut-wrenching proportions that can easily be illustrated by the following snippit of template code: \<% member=Member.find(params\[‘id’\]) %\> ID: \<%= member.id %\> \<% outfile=File.open('/tmp/look1','…

---

## [Speeding up ActiveRecord Querying on very large joins?](https://www.ruby-forum.com/t/speeding-up-activerecord-querying-on-very-large-joins/173327)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 27\
**Last updated:** [August 10, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/speeding-up-activerecord-querying-on-very-large-joins/173327 "2009-08-10T22:42:14Z")

</div>

When I first started my project, I thought long and hard about the exact information I would need. Because my site works largely on statistical analysis and virtual matchups can be done by any number of scenarios, it …

---

## [QA & testingtools jobs](https://www.ruby-forum.com/t/qa-testingtools-jobs/173516)

<div class="topic-metadata">

**Author:** [@eprojecthelp](https://www.ruby-forum.com/u/eprojecthelp)\
**Replies:** 0\
**Last updated:** [August 10, 2009, 10:37pm UTC](https://www.ruby-forum.com/t/qa-testingtools-jobs/173516 "2009-08-10T22:37:12Z")

</div>

Are you looking for Jobs in QA & Testing Tools, Interact with recruiters and trainers @ eprojecthelp.com

---

## [Using Net::HTTP::Proxy Object](https://www.ruby-forum.com/t/using-net-proxy-object/173514)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 10:36pm UTC](https://www.ruby-forum.com/t/using-net-proxy-object/173514 "2009-08-10T22:36:10Z")

</div>

I have been testing some web service calls that I am able to successfully make as long as I am connecting to the development environment which is on the inside of our corporate firewall, but when I attempt to connect …

---

## [Why can't I run a Rake task inside my migration?](https://www.ruby-forum.com/t/why-cant-i-run-a-rake-task-inside-my-migration/173497)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 4\
**Last updated:** [August 10, 2009, 10:27pm UTC](https://www.ruby-forum.com/t/why-cant-i-run-a-rake-task-inside-my-migration/173497 "2009-08-10T22:27:30Z")

</div>

I have a Rake task which I’ve developed as part of a set of data migrations. The task has to be run after a particular migration has run. The migration changes the table structure and then the Rake task comes in and p…

---

## [Best way to copy a table using ActiveRecord](https://www.ruby-forum.com/t/best-way-to-copy-a-table-using-activerecord/173510)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 2\
**Last updated:** [August 10, 2009, 9:51pm UTC](https://www.ruby-forum.com/t/best-way-to-copy-a-table-using-activerecord/173510 "2009-08-10T21:51:55Z")

</div>

Hey guys, I’m trying to copy the entire content of table “actives” to the table “olds”. What I’ve done in the past is use regular SQL statements, but I’d like to make my code more Ruby-ish I suppose. Using SQL, I woul…

---

## [Rails based Point of Sale?](https://www.ruby-forum.com/t/rails-based-point-of-sale/186745)

<div class="topic-metadata">

**Author:** [@sfwalter](https://www.ruby-forum.com/u/sfwalter)\
**Replies:** 9\
**Last updated:** [August 10, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/rails-based-point-of-sale/186745 "2009-08-10T21:44:28Z")

</div>

Hello, The company I work for is a national franchisor of about 100 retail stores across Canada. We currently use proprietary, firmware based point of sale hardware that costs us thousands of dollars per store and s…

---

## [Best Practices Question](https://www.ruby-forum.com/t/best-practices-question/173311)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 18\
**Last updated:** [August 10, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/best-practices-question/173311 "2009-08-10T18:31:35Z")

</div>

Should models call action mailers, or should those calls always originate from controllers? For example, should user.forgot\_password send the email, or should the user\_controller.forgot\_password? Just looking for som…

---

## [Scalability problem](https://www.ruby-forum.com/t/scalability-problem/172745)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 8\
**Last updated:** [August 10, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/scalability-problem/172745 "2009-08-10T18:08:46Z")

</div>

Hi, I have heard that ROR has scalability problems. I have heard that Twitter which used rails has abandoned it and is moving to PHP. Is it true?

---

## [How to pass a checkbox list values to controller](https://www.ruby-forum.com/t/how-to-pass-a-checkbox-list-values-to-controller/173479)

<div class="topic-metadata">

**Author:** [@akramwasim1234](https://www.ruby-forum.com/u/akramwasim1234)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 5:24pm UTC](https://www.ruby-forum.com/t/how-to-pass-a-checkbox-list-values-to-controller/173479 "2009-08-10T17:24:54Z")

</div>

hi all, can anybody say me how to pass a checkbox list values to controller using "submit\_remote\_to"and how to use the same thing in controller

---

## [Default route + URL](https://www.ruby-forum.com/t/default-route-url/173499)

<div class="topic-metadata">

**Author:** [@jai](https://www.ruby-forum.com/u/jai)\
**Replies:** 0\
**Last updated:** [August 10, 2009, 4:16pm UTC](https://www.ruby-forum.com/t/default-route-url/173499 "2009-08-10T16:16:07Z")

</div>

Hi, I am new to Ruby on Rails and I was wondering about this… If the default route in routes.rb file is map.connect ‘:controller/:action/:id’ map.connect ‘:controller/:action/:id.:format’ Why is the edit URL when ge…

---

## [Calendardateselect + observe\_form?](https://www.ruby-forum.com/t/calendardateselect-observe-form/173242)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 3:50pm UTC](https://www.ruby-forum.com/t/calendardateselect-observe-form/173242 "2009-08-10T15:50:05Z")

</div>

=begin I am using Google Code Archive - Long-term storage for Google Code Project Hosting. to make date-selection easier. This is my current code. I’d like the selection of a date to trigger the observe\_form and call…

---

## [Active record multiple table inheritance with abstract parent](https://www.ruby-forum.com/t/active-record-multiple-table-inheritance-with-abstract-parent/173453)

<div class="topic-metadata">

**Author:** [@boblu](https://www.ruby-forum.com/u/boblu)\
**Replies:** 5\
**Last updated:** [August 10, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/active-record-multiple-table-inheritance-with-abstract-parent/173453 "2009-08-10T15:27:04Z")

</div>

I have four tables: jp\_properties, cn\_properties, jp\_dictionaries and cn\_dictioanries. And every jp\_property belongs to a jp\_dictionary with foreign key “dictionary\_id” in table. Similarly, every cn\_property belongs …

---

## [How (and where) is implemented validation errors in forms](https://www.ruby-forum.com/t/how-and-where-is-implemented-validation-errors-in-forms/173491)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/how-and-where-is-implemented-validation-errors-in-forms/173491 "2009-08-10T15:22:36Z")

</div>

Hello everybody ! I’m building up an application which export ads to partners; So I’ve a hbtm association between the 2 models ad and partner; on the view side, the ad form contains several checkboxes (one per partner…

---

## [Relationships on a non ID field](https://www.ruby-forum.com/t/relationships-on-a-non-id-field/173492)

<div class="topic-metadata">

**Author:** [@pmckinstry](https://www.ruby-forum.com/u/pmckinstry)\
**Replies:** 2\
**Last updated:** [August 10, 2009, 2:54pm UTC](https://www.ruby-forum.com/t/relationships-on-a-non-id-field/173492 "2009-08-10T14:54:02Z")

</div>

Hi Guys, I am a total newbie to rails - so please go easy :slight\_smile: So I have 2 models Country and City - the Country Model will have a ‘name’ and a ‘code’ field (so a record would be ID name …

---

## [Rails: Flush HTML head](https://www.ruby-forum.com/t/rails-flush-html-head/196989)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/rails-flush-html-head/196989 "2009-08-10T14:53:13Z")

</div>

Hi Guys, What command I should use to flush html head to client in my layout.rhtml? I’ve tried “$stdout.flush” but weird, the CSS total time seems to be longer after using the flush. Thanks! Arthur

---

## [Deploying Rails book](https://www.ruby-forum.com/t/deploying-rails-book/173464)

<div class="topic-metadata">

**Author:** [@Paulo\_JSMatos](https://www.ruby-forum.com/u/Paulo_JSMatos)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/deploying-rails-book/173464 "2009-08-10T14:03:26Z")

</div>

Hi all, With the fast changing rails, it is always hard to know how up to date Ruby books are. As far as I could tell, Rails recipes is basically obsolete and Advanced Rails recipes is a better choice. But what about…

---

## [Query](https://www.ruby-forum.com/t/query/173482)

<div class="topic-metadata">

**Author:** [@hunt](https://www.ruby-forum.com/u/hunt)\
**Replies:** 3\
**Last updated:** [August 10, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/query/173482 "2009-08-10T13:55:49Z")

</div>

Hi friends, I have two table… users id(pri) | user\_name | email| posts post\_id | user\_id(foreign\_key)| title | body Relations is A user has many posts. I created a form for post. with titl…

---

## [Using Haml with Edge Rails](https://www.ruby-forum.com/t/using-haml-with-edge-rails/173489)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 0\
**Last updated:** [August 10, 2009, 1:46pm UTC](https://www.ruby-forum.com/t/using-haml-with-edge-rails/173489 "2009-08-10T13:46:22Z")

</div>

Hello Does anyone know if Haml is usable in Edge Rails (V 3.0 PRE)? As soon as I installed the plugin, I have errors in some ERB templates, even before writing my first haml template.

---

## [Paging in ror](https://www.ruby-forum.com/t/paging-in-ror/173481)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 3\
**Last updated:** [August 10, 2009, 1:45pm UTC](https://www.ruby-forum.com/t/paging-in-ror/173481 "2009-08-10T13:45:25Z")

</div>

hello all, any one known how to do paging in ror

---

## [Scaffolding w/ existing DB Tables](https://www.ruby-forum.com/t/scaffolding-w-existing-db-tables/173483)

<div class="topic-metadata">

**Author:** [@ratking](https://www.ruby-forum.com/u/ratking)\
**Replies:** 3\
**Last updated:** [August 10, 2009, 1:25pm UTC](https://www.ruby-forum.com/t/scaffolding-w-existing-db-tables/173483 "2009-08-10T13:25:45Z")

</div>

I am sure many people have asked this already… But I could not find anything helpful. I am trying to use RoR with an existing database with tables already defined. I used script/generate scaffold account But when I p…

---

## [Redirect after login](https://www.ruby-forum.com/t/redirect-after-login/173294)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 13\
**Last updated:** [August 10, 2009, 12:54pm UTC](https://www.ruby-forum.com/t/redirect-after-login/173294 "2009-08-10T12:54:56Z")

</div>

Hi, I’m new to Ruby/RoR so please bare with me! I’m trying to adapt a ruby setup where someone logs in to a bonjour service via a web browser. I have the login screen which asks for host and password. There is only o…

---

## [Calling a jQuery function from RJS/onclick](https://www.ruby-forum.com/t/calling-a-jquery-function-from-rjs-onclick/173368)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 2\
**Last updated:** [August 10, 2009, 11:17am UTC](https://www.ruby-forum.com/t/calling-a-jquery-function-from-rjs-onclick/173368 "2009-08-10T11:17:47Z")

</div>

Hi, I have the following jQuery function on the head of my page. On page load, this gets called correctly. Now there’s a link on the page that lets me add more rows and i do this via RJS. Here’s the code. \<%= …

---

## [Call AR belongs\_to association accessor ID method on object assignment](https://www.ruby-forum.com/t/call-ar-belongs-to-association-accessor-id-method-on-object-assignment/173470)

<div class="topic-metadata">

**Author:** [@dukael](https://www.ruby-forum.com/u/dukael)\
**Replies:** 1\
**Last updated:** [August 10, 2009, 9:30am UTC](https://www.ruby-forum.com/t/call-ar-belongs-to-association-accessor-id-method-on-object-assignment/173470 "2009-08-10T09:30:40Z")

</div>

Hi, Haven’t been able to find this raised before but I’m sure it must have been. When assigning an object to a belongs\_to association I would like it to call the association\_id= method instead of directly updating th…

---

## [Rake db:create](https://www.ruby-forum.com/t/rake-db-create/173474)

<div class="topic-metadata">

**Author:** [@bogea](https://www.ruby-forum.com/u/bogea)\
**Replies:** 0\
**Last updated:** [August 10, 2009, 9:25am UTC](https://www.ruby-forum.com/t/rake-db-create/173474 "2009-08-10T09:25:28Z")

</div>

Hey, I cannot run the db:create command. However it doesn’t give any errors if I run it with the -S tag. What does the -S mean? … it seems to skip since no database is created. if I run it without the -S I get a segm…

---

## [Doubt in submit\_to\_remote?](https://www.ruby-forum.com/t/doubt-in-submit-to-remote/173475)

<div class="topic-metadata">

**Author:** [@karthik](https://www.ruby-forum.com/u/karthik)\
**Replies:** 2\
**Last updated:** [August 10, 2009, 9:12am UTC](https://www.ruby-forum.com/t/doubt-in-submit-to-remote/173475 "2009-08-10T09:12:32Z")

</div>

hi i have one page where i have check boxes , when i select one check box and click the below \<%= submit\_to\_remote ‘activate’, ‘Activate’, :url =\> {:action =\> ‘search\_activate’} %\> below is my check box \<%= check\_…

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

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