# Rails

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

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

---

## [ActionView::CaptureHelper#capture error](https://www.ruby-forum.com/t/actionview-capturehelper-capture-error/149778)

<div class="topic-metadata">

**Author:** [@Coder2000](https://www.ruby-forum.com/u/Coder2000)\
**Replies:** 0\
**Last updated:** [September 29, 2008, 7:35pm UTC](https://www.ruby-forum.com/t/actionview-capturehelper-capture-error/149778 "2008-09-29T19:35:32Z")

</div>

I am using edge rails and a plugin that uses capture and I am getting an error that block\_called\_from\_erb? doesn’t exist. Where should it be declared and what should it contain? Dieter

---

## [Named\_scope not retrieving id](https://www.ruby-forum.com/t/named-scope-not-retrieving-id/196813)

<div class="topic-metadata">

**Author:** [@dave](https://www.ruby-forum.com/u/dave)\
**Replies:** 3\
**Last updated:** [September 29, 2008, 7:34pm UTC](https://www.ruby-forum.com/t/named-scope-not-retrieving-id/196813 "2008-09-29T19:34:22Z")

</div>

Hi all, I was having a problem with a named\_scope and wondered if anyone else had the same problem before and if there was a way to keep the named\_scope and work around this. I had the following code in a Student mo…

---

## [Autocomplete for](https://www.ruby-forum.com/t/autocomplete-for/149765)

<div class="topic-metadata">

**Author:** [@vanight](https://www.ruby-forum.com/u/vanight)\
**Replies:** 2\
**Last updated:** [September 29, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/autocomplete-for/149765 "2008-09-29T18:23:46Z")

</div>

Hi, I’ve got an old ruby app to update. I’ve got 2.1.0 Rails and the controllers to update has an autocomplete\_for macro. How can I update this, the API says it’s deprecated. Thanks

---

## [Comment Generator](https://www.ruby-forum.com/t/comment-generator/112205)

<div class="topic-metadata">

**Author:** [@Chuob.Sok](https://www.ruby-forum.com/u/Chuob.Sok)\
**Replies:** 3\
**Last updated:** [September 29, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/comment-generator/112205 "2008-09-29T17:50:52Z")

</div>

Hi all, I just want to know that is there any comment generator for RoR? I actually, I have comment my classes, method and parameter, Controller, Modal, etc. but I couldn’t find the comment generator that work with r…

---

## [Problem with single form and two models](https://www.ruby-forum.com/t/problem-with-single-form-and-two-models/149742)

<div class="topic-metadata">

**Author:** [@indu](https://www.ruby-forum.com/u/indu)\
**Replies:** 4\
**Last updated:** [September 29, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/problem-with-single-form-and-two-models/149742 "2008-09-29T17:32:20Z")

</div>

Hello everyone Just started to learn ROR.Does anyone have an idea on how to store fields in two tables using a single form? I wish to store the registration details in ‘users’ table and the langauges selected by the …

---

## [Capistrano Remote Deployment](https://www.ruby-forum.com/t/capistrano-remote-deployment/149740)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 2\
**Last updated:** [September 29, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/capistrano-remote-deployment/149740 "2008-09-29T17:01:37Z")

</div>

Hi, I want to deploy the code on remote server. For that I want to user the Capistrano’s remote cap deployment. I don’t know about what configuration and steps for remote deployment? Please, anyone tell me about the …

---

## [Has\_one :through with :source. How to alias association?](https://www.ruby-forum.com/t/has-one-through-with-source-how-to-alias-association/149770)

<div class="topic-metadata">

**Author:** [@carminem](https://www.ruby-forum.com/u/carminem)\
**Replies:** 1\
**Last updated:** [September 29, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/has-one-through-with-source-how-to-alias-association/149770 "2008-09-29T16:55:59Z")

</div>

Hi to everyone, I have the following models: class Attachment \< ActiveRecord::Base has\_attachment :content\_type =\> \[:image, ‘application/pdf’\], :max\_size =\> 3.megabytes, :path\_prefix =\> ‘…/private/attachments’, :s…

---

## [Which version of Rails?](https://www.ruby-forum.com/t/which-version-of-rails/149762)

<div class="topic-metadata">

**Author:** [@risknet](https://www.ruby-forum.com/u/risknet)\
**Replies:** 4\
**Last updated:** [September 29, 2008, 4:51pm UTC](https://www.ruby-forum.com/t/which-version-of-rails/149762 "2008-09-29T16:51:04Z")

</div>

Hello all, Which version of Rails do you recommend if I start a new project using RoR? I studied RoR with Agile Web D. with Rails (1st edition) last year, and found that there is new version 2.x out there - but, it w…

---

## [Log\_out problem](https://www.ruby-forum.com/t/log-out-problem/149677)

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 3\
**Last updated:** [September 29, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/log-out-problem/149677 "2008-09-29T15:15:31Z")

</div>

In my layout have : \<%= link\_to ‘Log Out Now’, { :action =\> :log\_out }%\> In my application.rb i have: def log\_out session\[:login\]=nil redirect\_to ‘/inventory’ end for some reason it keeps redirecting to “http://lo…

---

## [\[ActiveRecord\] wrong number of arguments (0 for 2) ?!](https://www.ruby-forum.com/t/activerecord-wrong-number-of-arguments-0-for-2/149760)

<div class="topic-metadata">

**Author:** [@mrdamien](https://www.ruby-forum.com/u/mrdamien)\
**Replies:** 3\
**Last updated:** [September 29, 2008, 3:10pm UTC](https://www.ruby-forum.com/t/activerecord-wrong-number-of-arguments-0-for-2/149760 "2008-09-29T15:10:13Z")

</div>

Hi all, I have a basic model as follow, but when I try to query the database, I get the following error: ‘wrong number of arguments (0 for 2)’ I don’t see any problem, I am becoming crazy o\_O’ Migration class Create…

---

## [\[NEWBIE\] Error redirection](https://www.ruby-forum.com/t/newbie-error-redirection/149746)

<div class="topic-metadata">

**Author:** [@FMFMFM](https://www.ruby-forum.com/u/FMFMFM)\
**Replies:** 5\
**Last updated:** [September 29, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/newbie-error-redirection/149746 "2008-09-29T14:10:05Z")

</div>

Dear all, I am learning Rails and to do so I am writing a blogging system. So far everything is going well but now I have a problem and I don’t know how to solve it. Basically the “article” page presents the current …

---

## [Environment + DB Connection](https://www.ruby-forum.com/t/environment-db-connection/149670)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 4\
**Last updated:** [September 29, 2008, 1:50pm UTC](https://www.ruby-forum.com/t/environment-db-connection/149670 "2008-09-29T13:50:08Z")

</div>

Hello Experts, Is there way to disable DB connection to load rails, when i need i can connect manually? That too in production mode. Thanks, Bala

---

## [Error while redirecting](https://www.ruby-forum.com/t/error-while-redirecting/149757)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 0\
**Last updated:** [September 29, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/error-while-redirecting/149757 "2008-09-29T13:48:18Z")

</div>

In my application when user clicks on button I am calling one controller method and from that controller i am redirecting to another controller and corresponding view but doing this i got a following error #\<EOFError…

---

## [How to send messages to mobile deveices from ruby on rails?](https://www.ruby-forum.com/t/how-to-send-messages-to-mobile-deveices-from-ruby-on-rails/149571)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 3\
**Last updated:** [September 29, 2008, 1:29pm UTC](https://www.ruby-forum.com/t/how-to-send-messages-to-mobile-deveices-from-ruby-on-rails/149571 "2008-09-29T13:29:23Z")

</div>

how to send messages to mobile deveices from ruby on rails ?

---

## [Mailing solution](https://www.ruby-forum.com/t/mailing-solution/149754)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [September 29, 2008, 12:38pm UTC](https://www.ruby-forum.com/t/mailing-solution/149754 "2008-09-29T12:38:36Z")

</div>

Hi, I have been using Action Mailer and Mailer Queue as a mailing solution on my website. But since we foresee lot of email marketing such as notifications, daily,weekly and monthly updates, I was wondering I should …

---

## [Building 1U Rails Server - Power Calculations?](https://www.ruby-forum.com/t/building-1u-rails-server-power-calculations/130655)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 14\
**Last updated:** [September 29, 2008, 12:38pm UTC](https://www.ruby-forum.com/t/building-1u-rails-server-power-calculations/130655 "2008-09-29T12:38:23Z")

</div>

Hi all, With all the mini-apps i’m writing I’ve decided to build my own 1U rack server, but need a few pointers on calculating power consumption. Basically the colocation place i’ve selected for the device has a limit …

---

## [Ruby 1.8.7 & rails 2.0.2](https://www.ruby-forum.com/t/ruby-1-8-7-rails-2-0-2/149752)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 0\
**Last updated:** [September 29, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-rails-2-0-2/149752 "2008-09-29T12:33:45Z")

</div>

If you do string.last or string.first it fails in access.rb line 43 I found the answer on another mailing list. Ruby 1.8.7 has String#chars. It returns an Enumerator object but Rails 2.0.2 expects an ActiveSupport::M…

---

## [Rails calenders](https://www.ruby-forum.com/t/rails-calenders/149748)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [September 29, 2008, 11:43am UTC](https://www.ruby-forum.com/t/rails-calenders/149748 "2008-09-29T11:43:34Z")

</div>

Hi Could anybody please suggect me a good calender which I can use in the rails application .Till now I have been using one DHTML calender but when tested it has problem with some browsers…So now searching for a good…

---

## [Will\_paginate, not overriding order on has\_many](https://www.ruby-forum.com/t/will-paginate-not-overriding-order-on-has-many/149741)

<div class="topic-metadata">

**Author:** [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Replies:** 1\
**Last updated:** [September 29, 2008, 9:42am UTC](https://www.ruby-forum.com/t/will-paginate-not-overriding-order-on-has-many/149741 "2008-09-29T09:42:11Z")

</div>

I have a paginate call like this: @person.chats.paginate :per\_page =\> 50, :page =\> params\[:page\], :order =\> “created\_at ASC” which you’d think would order by created\_at in ascending order… Wrong! If I have has\_many…

---

## [Limiting Access of Nested Resources](https://www.ruby-forum.com/t/limiting-access-of-nested-resources/149735)

<div class="topic-metadata">

**Author:** [@sinkva](https://www.ruby-forum.com/u/sinkva)\
**Replies:** 5\
**Last updated:** [September 29, 2008, 7:42am UTC](https://www.ruby-forum.com/t/limiting-access-of-nested-resources/149735 "2008-09-29T07:42:33Z")

</div>

So I’m using nested routes for a users model that has measurements and journals… like this: map.resources :users do |users| users.resources :journals users.resources :measurements end This of course builds routes a…

---

## [Rails dates and times, 40.years.ago](https://www.ruby-forum.com/t/rails-dates-and-times-40-years-ago/75171)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 29, 2008, 7:01am UTC](https://www.ruby-forum.com/t/rails-dates-and-times-40-years-ago/75171 "2008-09-29T07:01:33Z")

</div>

Simple test case: require ‘rubygems’ require ‘active\_support’ puts 5.years.ago puts 40.years.ago It seems to be an issue on windows, as the linux version of the test below works just fine, but windows will crash wi…

---

## [Will Engines drop tables on downward migration?](https://www.ruby-forum.com/t/will-engines-drop-tables-on-downward-migration/149598)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 1\
**Last updated:** [September 29, 2008, 6:26am UTC](https://www.ruby-forum.com/t/will-engines-drop-tables-on-downward-migration/149598 "2008-09-29T06:26:03Z")

</div>

Greetings fellow Railites, Last night I converted an existing Rails app to be Engines based. The transition was very easy, which was great, but I was left scratching my head with Engines’ migration handling. After mo…

---

## [Having trouble writing the right view to generate the desire](https://www.ruby-forum.com/t/having-trouble-writing-the-right-view-to-generate-the-desire/149687)

<div class="topic-metadata">

**Author:** [@maxbohr](https://www.ruby-forum.com/u/maxbohr)\
**Replies:** 3\
**Last updated:** [September 29, 2008, 3:25am UTC](https://www.ruby-forum.com/t/having-trouble-writing-the-right-view-to-generate-the-desire/149687 "2008-09-29T03:25:56Z")

</div>

I’m doing a small toy app to learn rails, and I ran into some difficulty with one of my views, specifically with the parameters hash that is returned to me during the create action Currently, given the form I have now…

---

## [Summing child rows in HABTM table](https://www.ruby-forum.com/t/summing-child-rows-in-habtm-table/149132)

<div class="topic-metadata">

**Author:** [@dschruth](https://www.ruby-forum.com/u/dschruth)\
**Replies:** 14\
**Last updated:** [September 29, 2008, 1:43am UTC](https://www.ruby-forum.com/t/summing-child-rows-in-habtm-table/149132 "2008-09-29T01:43:16Z")

</div>

Hi, I’m trying to sum up the records in a related table that used to just be a child table. This line used to work: table1.sum(:enrich\_bead\_count\_hemo, :conditions =\> "table2\_id = " + id.to\_s) now I’ve got an inter…

---

## [Controller issue](https://www.ruby-forum.com/t/controller-issue/149678)

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 5\
**Last updated:** [September 29, 2008, 1:06am UTC](https://www.ruby-forum.com/t/controller-issue/149678 "2008-09-29T01:06:25Z")

</div>

in my controller inventory\_Controller I have a variable called @cart that is set to @cart=find\_cart in the beginning of each method. The cart is displayed on the left hand sidemenu, so each page like inventory/review…

---

## [Europe mirror for the official Rails repository](https://www.ruby-forum.com/t/europe-mirror-for-the-official-rails-repository/149722)

<div class="topic-metadata">

**Author:** [@mislav](https://www.ruby-forum.com/u/mislav)\
**Replies:** 0\
**Last updated:** [September 28, 2008, 11:30pm UTC](https://www.ruby-forum.com/t/europe-mirror-for-the-official-rails-repository/149722 "2008-09-28T23:30:21Z")

</div>

Hey Rails devs, We’re in Slovenia (southern Europe) and sometimes we get very slow speeds when pulling from the official Rails repository (GitHub). Speed can drop down to under 20 KiB/s, and the top I’ve seen is aroun…

---

## [Observer not picking state change in user](https://www.ruby-forum.com/t/observer-not-picking-state-change-in-user/149698)

<div class="topic-metadata">

**Author:** [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Replies:** 2\
**Last updated:** [September 28, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/observer-not-picking-state-change-in-user/149698 "2008-09-28T21:29:05Z")

</div>

Hello,- does anyone have a good idea of how to trace a fault in the following: I have a User model (user.rb) with these methods: def create\_reset\_code code = User.get\_random\_string(10) #working class method self.pas…

---

## [Is it just me or all all engines links set up as only\_path =\> false?](https://www.ruby-forum.com/t/is-it-just-me-or-all-all-engines-links-set-up-as-only-path-false/149709)

<div class="topic-metadata">

**Author:** [@yossarian](https://www.ruby-forum.com/u/yossarian)\
**Replies:** 1\
**Last updated:** [September 28, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/is-it-just-me-or-all-all-engines-links-set-up-as-only-path-false/149709 "2008-09-28T21:14:11Z")

</div>

Hi there, Is it the case that all links in engines seem to ignore the default Rails only\_path =\> false option? Every link\_to in my Engine results in links like: Back to articles whereas the non-engine views in the …

---

## [H() doesn't have any parameter for encoding being used?](https://www.ruby-forum.com/t/h-doesnt-have-any-parameter-for-encoding-being-used/149682)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [September 28, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/h-doesnt-have-any-parameter-for-encoding-being-used/149682 "2008-09-28T21:14:10Z")

</div>

it seems that there is no parameter for the function h() (html\_escape()) to indicate the character encoding being used? for PHP, its htmlspecialchars() function has a dozen encoding possible, such as UTF-8, Chinese Bi…

---

## [Http request inside controller?](https://www.ruby-forum.com/t/http-request-inside-controller/149442)

<div class="topic-metadata">

**Author:** [@Kodak](https://www.ruby-forum.com/u/Kodak)\
**Replies:** 2\
**Last updated:** [September 28, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/http-request-inside-controller/149442 "2008-09-28T20:59:32Z")

</div>

hi all, i got problem with net/http inside controller. I need to respond to action using some remote (not REST compatible) http server (actually returning pdf file) so inside action i use: response = Net::HTTP.new(…

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

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