# Rails

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

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

---

## [Drop down box in ruby](https://www.ruby-forum.com/t/drop-down-box-in-ruby/192633)

<div class="topic-metadata">

**Author:** [@superwick](https://www.ruby-forum.com/u/superwick)\
**Replies:** 3\
**Last updated:** [August 3, 2010, 5:13pm UTC](https://www.ruby-forum.com/t/drop-down-box-in-ruby/192633 "2010-08-03T17:13:24Z")

</div>

Hello I’ve only been playing with ruby and rails for a few short weeks, I have an class called time in my libs folder and I want to call an array from this class and populate a drop down box/select box in rails in one…

---

## [Rails 3: Update responding with empty json](https://www.ruby-forum.com/t/rails-3-update-responding-with-empty-json/185498)

<div class="topic-metadata">

**Author:** [@fabiokr](https://www.ruby-forum.com/u/fabiokr)\
**Replies:** 11\
**Last updated:** [August 3, 2010, 4:13pm UTC](https://www.ruby-forum.com/t/rails-3-update-responding-with-empty-json/185498 "2010-08-03T16:13:51Z")

</div>

Hi all! I’m playing with Rails 3, and on one of my controllers I have the following update method defined: def update @category = @user.categories.find(params\[:id\]) @category.update\_attributes(params\[:ecategory\]) @…

---

## [Adding data as a transaction](https://www.ruby-forum.com/t/adding-data-as-a-transaction/192621)

<div class="topic-metadata">

**Author:** [@pipplo](https://www.ruby-forum.com/u/pipplo)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/adding-data-as-a-transaction/192621 "2010-08-03T14:27:44Z")

</div>

Hey Everyone I’m new to RoR and this group so please let me know if I’m not being descriptive enough, or if I’m asking questions when I should RTFM. I have a basic understanding of RoR, but I’m kinda missing the next …

---

## [File creation in Rails](https://www.ruby-forum.com/t/file-creation-in-rails/192479)

<div class="topic-metadata">

**Author:** [@silver-spoon](https://www.ruby-forum.com/u/silver-spoon)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 12:32pm UTC](https://www.ruby-forum.com/t/file-creation-in-rails/192479 "2010-08-03T12:32:58Z")

</div>

I am passing the contents of a textarea in my rails view to the server by a POST call. How can I store the contents as a separate file, say contents\_userId.txt on my server and at the same time store my file in databa…

---

## [Rails3-beta4: Calling to\_json on an ActiveRecord::Relation causes an error](https://www.ruby-forum.com/t/rails3-beta4-calling-to-json-on-an-activerecord-relation-causes-an-error/192619)

<div class="topic-metadata">

**Author:** [@wprater](https://www.ruby-forum.com/u/wprater)\
**Replies:** 3\
**Last updated:** [August 3, 2010, 12:30pm UTC](https://www.ruby-forum.com/t/rails3-beta4-calling-to-json-on-an-activerecord-relation-causes-an-error/192619 "2010-08-03T12:30:38Z")

</div>

Here is my model and an attempt to convert to json. Whether there is data returned or not, a circular reference error is thrown. How can I avoid this? ruby-1.8.7-p249 \> PayPeriod =\> PayPeriod(id: integer, start\_dat…

---

## [Generating .mo with Rails 2.1.0](https://www.ruby-forum.com/t/generating-mo-with-rails-2-1-0/192620)

<div class="topic-metadata">

**Author:** [@BrSSSSulio\_Bhavamit](https://www.ruby-forum.com/u/BrSSSSulio_Bhavamit)\
**Replies:** 1\
**Last updated:** [August 3, 2010, 11:18am UTC](https://www.ruby-forum.com/t/generating-mo-with-rails-2-1-0/192620 "2010-08-03T11:18:37Z")

</div>

Hello all, I’m a newbie to Ruby/Rails world, and also to the application I’m trying to use: Noosfero. The thing is, i’m trying to run ‘rake makemo’ with no success… $/usr/bin/ruby1.8 -rconfig/boot -rgettext -rgettext…

---

## [JOBS: Experienced Rails Developer](https://www.ruby-forum.com/t/jobs-experienced-rails-developer/192623)

<div class="topic-metadata">

**Author:** [@redbasin32](https://www.ruby-forum.com/u/redbasin32)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 8:22am UTC](https://www.ruby-forum.com/t/jobs-experienced-rails-developer/192623 "2010-08-03T08:22:26Z")

</div>

Over the last two years, Bonanzle has been amongst the fastest growing marketplaces in all of ecommerce. Since launching in late 2008, we have grown to nearly 2 million monthly visitors and more than 3 million items p…

---

## [How to create local subroutines properly in rails?](https://www.ruby-forum.com/t/how-to-create-local-subroutines-properly-in-rails/192617)

<div class="topic-metadata">

**Author:** [@ct9a](https://www.ruby-forum.com/u/ct9a)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 8:01am UTC](https://www.ruby-forum.com/t/how-to-create-local-subroutines-properly-in-rails/192617 "2010-08-03T08:01:22Z")

</div>

hi guys, Using breadcrumbs on rails (weppos (Simone Carletti) · GitHub breadcrumbs\_on\_rails), I have added a method, “set\_breadcrumb” in my application controller. That will set up my home breadcrumb. In my other fe…

---

## [Curl works when testing JSON response but the functional and integration tests do not work](https://www.ruby-forum.com/t/curl-works-when-testing-json-response-but-the-functional-and-integration-tests-do-not-work/192614)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 0\
**Last updated:** [August 3, 2010, 6:35am UTC](https://www.ruby-forum.com/t/curl-works-when-testing-json-response-but-the-functional-and-integration-tests-do-not-work/192614 "2010-08-03T06:35:19Z")

</div>

I am trying to test an action which is supposed to give a json response The url goes something line /blah/model.json When I POST to that URL using curl like this curl -H “Content-Type:application/json” -H “Accept:appn…

---

## [Prefix a drop-down with "Select Item" -- Rails way?](https://www.ruby-forum.com/t/prefix-a-drop-down-with-select-item-rails-way/191927)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 9\
**Last updated:** [August 3, 2010, 4:18am UTC](https://www.ruby-forum.com/t/prefix-a-drop-down-with-select-item-rails-way/191927 "2010-08-03T04:18:22Z")

</div>

Hi, I’m finally a happy developer of a Rails app that’s got a working drop- down. In short, I prefixed the array of Vendors (which all have integer IDs \> 0) with an new Vendor with in ID of 0 and a string “Select …”…

---

## [Development Environment (Beginners Question)?](https://www.ruby-forum.com/t/development-environment-beginners-question/192531)

<div class="topic-metadata">

**Author:** [@ncage](https://www.ruby-forum.com/u/ncage)\
**Replies:** 3\
**Last updated:** [August 3, 2010, 2:09am UTC](https://www.ruby-forum.com/t/development-environment-beginners-question/192531 "2010-08-03T02:09:37Z")

</div>

Hello people. I’m just getting into cutting my teeth in ROR development. Currently all my machines are Windows 7 machines. I know most of the hard core ROR in general use Macs. I definitely won’t be able to use a mac.…

---

## [Problem with "Thinking Sphinx"](https://www.ruby-forum.com/t/problem-with-thinking-sphinx/192579)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 4\
**Last updated:** [August 3, 2010, 1:40am UTC](https://www.ruby-forum.com/t/problem-with-thinking-sphinx/192579 "2010-08-03T01:40:56Z")

</div>

Hi, I am implementing the “sphinx” search using “Thinking Sphinx” search. I have done everything configured. I have added the index fields in my model like this " define\_index do indexes :name,:sortable =\> true in…

---

## [Setting the size of a textarea](https://www.ruby-forum.com/t/setting-the-size-of-a-textarea/192600)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 5\
**Last updated:** [August 2, 2010, 11:52pm UTC](https://www.ruby-forum.com/t/setting-the-size-of-a-textarea/192600 "2010-08-02T23:52:21Z")

</div>

i have noticed this a few times in the past, but right now, i need to get this fixed so that my form will fit inside a div… i currently have this code: \<%= text\_area @project, :description, :rows =\> “2”, :cols =\> “20”…

---

## [OT: how to deal with gender](https://www.ruby-forum.com/t/ot-how-to-deal-with-gender/192591)

<div class="topic-metadata">

**Author:** [@mariachi77](https://www.ruby-forum.com/u/mariachi77)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 10:57pm UTC](https://www.ruby-forum.com/t/ot-how-to-deal-with-gender/192591 "2010-08-02T22:57:40Z")

</div>

On 2 August 2010 17:29, Marnen Laibow-Koser removed\_email\_address@domain.invalid wrote: probably use a model or at least an enumeration for that. As the OP said, s/he needs to store either Male or Female - those are …

---

## [Admin interface for Rails?](https://www.ruby-forum.com/t/admin-interface-for-rails/192524)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 4\
**Last updated:** [August 2, 2010, 10:34pm UTC](https://www.ruby-forum.com/t/admin-interface-for-rails/192524 "2010-08-02T22:34:13Z")

</div>

Hello folks, I am currently working on a project that has to deliver an admin interface like the Django’s one, I wanna know if you know/ recommend any gem or plugin for that. Cheers, Rodrigo Alves V.

---

## [Tables deleted when running rake test:units](https://www.ruby-forum.com/t/tables-deleted-when-running-rake-test-units/192596)

<div class="topic-metadata">

**Author:** [@simaofreitas](https://www.ruby-forum.com/u/simaofreitas)\
**Replies:** 6\
**Last updated:** [August 2, 2010, 10:03pm UTC](https://www.ruby-forum.com/t/tables-deleted-when-running-rake-test-units/192596 "2010-08-02T22:03:04Z")

</div>

Hi there! I’m creating an application in RoR and I’m implementing unit testing in all my models. When I run every test on his own (by running ruby test/unit/some\_test.rb) all tests are successful. But when I run all …

---

## [Trying to do a user list and getting double render errors](https://www.ruby-forum.com/t/trying-to-do-a-user-list-and-getting-double-render-errors/229181)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/trying-to-do-a-user-list-and-getting-double-render-errors/229181 "2010-08-02T21:55:34Z")

</div>

Here is where I am now. A render :partial at the \*\*\*\* would solve my problem, but another render doesn’t seem to be allowed. Render\_pdf uses the only one allowed. Is there another way to do this? At the moment, it wor…

---

## [Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT](https://www.ruby-forum.com/t/problem-with-non-ascii-characters-in-forms-incompatible-character-encodings-utf-8-and-ascii-8bit/192519)

<div class="topic-metadata">

**Author:** [@Rolf\_P](https://www.ruby-forum.com/u/Rolf_P)\
**Replies:** 3\
**Last updated:** [August 2, 2010, 9:47pm UTC](https://www.ruby-forum.com/t/problem-with-non-ascii-characters-in-forms-incompatible-character-encodings-utf-8-and-ascii-8bit/192519 "2010-08-02T21:47:57Z")

</div>

Hi First off, I’m using Ruby 1.9.1p378 and Rails 2.3.8. I was creating a minimal application to test handling of Norwegian special characters when I bumped into this strange problem… I have a simple Car model with f…

---

## [If then within \<% %\> region in html](https://www.ruby-forum.com/t/if-then-within-region-in-html/192532)

<div class="topic-metadata">

**Author:** [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Replies:** 8\
**Last updated:** [August 2, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/if-then-within-region-in-html/192532 "2010-08-02T21:39:53Z")

</div>

I’m returning a value from the db which is true/false and I’d like to convert that to something more meaningful - how can I incorporate an if then into the inline html? I have tried if … puts “xxx”, but to no avail. S…

---

## [Delayed)\_job gem installation issue](https://www.ruby-forum.com/t/delayed-job-gem-installation-issue/192598)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [August 2, 2010, 9:12pm UTC](https://www.ruby-forum.com/t/delayed-job-gem-installation-issue/192598 "2010-08-02T21:12:14Z")

</div>

here is my environment.rb config.gem ‘collectiveidea-delayed\_job’, :source =\> ‘http:// gems.github.com’ gem list | grep coll collectiveidea-delayed\_job (1.8.2) The gem infact got installed via rake gems:install.…

---

## [How to monitor Cron jobs?](https://www.ruby-forum.com/t/how-to-monitor-cron-jobs/192575)

<div class="topic-metadata">

**Author:** [@PierreW](https://www.ruby-forum.com/u/PierreW)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 9:06pm UTC](https://www.ruby-forum.com/t/how-to-monitor-cron-jobs/192575 "2010-08-02T21:06:23Z")

</div>

Hi guys, I understand how to monitor long running processes with monit or god, but I don’t understand how to monitor Cron jobs (for memory bloating notably) since such processes always have different PIDs when they …

---

## [Any way around using only 1 render per action?](https://www.ruby-forum.com/t/any-way-around-using-only-1-render-per-action/192597)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 8:30pm UTC](https://www.ruby-forum.com/t/any-way-around-using-only-1-render-per-action/192597 "2010-08-02T20:30:41Z")

</div>

My program needs to use a render in a controller action. The problem is that the action makes a user list and sends it to wicked\_pdf, which uses a render, causing an error if I use one also. Does anyone know a way aro…

---

## [Drop down boxes from table data](https://www.ruby-forum.com/t/drop-down-boxes-from-table-data/192590)

<div class="topic-metadata">

**Author:** [@disruptive](https://www.ruby-forum.com/u/disruptive)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 7:22pm UTC](https://www.ruby-forum.com/t/drop-down-boxes-from-table-data/192590 "2010-08-02T19:22:50Z")

</div>

Hi I have another question for how best to do this. Now I have been following the tutorial at: http://www.tunaslut.com/learning-ruby-drop-down-lists-in-one-to-many-relationships, however when I change the view over f…

---

## [How to test response from RJS](https://www.ruby-forum.com/t/how-to-test-response-from-rjs/192594)

<div class="topic-metadata">

**Author:** [@arigo](https://www.ruby-forum.com/u/arigo)\
**Replies:** 0\
**Last updated:** [August 2, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/how-to-test-response-from-rjs/192594 "2010-08-02T19:08:44Z")

</div>

From a controller rendering and RJS template I get (by printing @response.body): window.location.href = “/management/53/questions? participant\_id=41&question\_status=MODERATOR\_INBOX”; I ma trying to test that response…

---

## [OT ... Pot, meet Kettle (was "if then within \<% %\> region in html")](https://www.ruby-forum.com/t/ot-pot-meet-kettle-was-if-then-within-region-in-html/192583)

<div class="topic-metadata">

**Author:** [@mariachi77](https://www.ruby-forum.com/u/mariachi77)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 6:37pm UTC](https://www.ruby-forum.com/t/ot-pot-meet-kettle-was-if-then-within-region-in-html/192583 "2010-08-02T18:37:42Z")

</div>

On 2 August 2010 16:43, Marnen Laibow-Koser removed\_email\_address@domain.invalid wrote: I think it’s a guru thinking that it’s all right to be uncivil if you know enough – an opinion I do not really subscribe to co…

---

## [Rails Forms...Calculations and things](https://www.ruby-forum.com/t/rails-forms-calculations-and-things/192588)

<div class="topic-metadata">

**Author:** [@crashbangboom](https://www.ruby-forum.com/u/crashbangboom)\
**Replies:** 0\
**Last updated:** [August 2, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/rails-forms-calculations-and-things/192588 "2010-08-02T18:24:14Z")

</div>

I have a partial form for tank tickets that requires end user input…It is designed to minimize said input to reduce the possibility for error…There are several other fields where calculation results need to go before …

---

## [Multiple flow\_paginator in same view](https://www.ruby-forum.com/t/multiple-flow-paginator-in-same-view/192482)

<div class="topic-metadata">

**Author:** [@strube](https://www.ruby-forum.com/u/strube)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 5:16pm UTC](https://www.ruby-forum.com/t/multiple-flow-paginator-in-same-view/192482 "2010-08-02T17:16:32Z")

</div>

Hello, I’m a Rails developer from Brazil and would like to use your gem flow\_paginator, but would like to have three buttons displaying the contents of three different divs, for example in github saw that I can only u…

---

## [The {{key}} interpolation syntax in I18n messages is deprecated](https://www.ruby-forum.com/t/the-key-interpolation-syntax-in-i18n-messages-is-deprecated/192539)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 3\
**Last updated:** [August 2, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/the-key-interpolation-syntax-in-i18n-messages-is-deprecated/192539 "2010-08-02T17:08:42Z")

</div>

All, Has anyone seen this - I am getting the following deprecation warning when running my functional tests under rails 2.3.8 (just moved an app from 2.3.4 up to 2.3.8 in prep to move to Rails 3 — if you think this …

---

## [Radio box validation](https://www.ruby-forum.com/t/radio-box-validation/192526)

<div class="topic-metadata">

**Author:** [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Replies:** 2\
**Last updated:** [August 2, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/radio-box-validation/192526 "2010-08-02T16:52:51Z")

</div>

I have created some radio boxes as follows: \<% f.radio\_button :usertype, “false” %\>False \<% f.radio\_button :usertype, “true” %\>True where usertpe is a boolean in the db I want to be able to create a default selection…

---

## [Check box for terms and conditions](https://www.ruby-forum.com/t/check-box-for-terms-and-conditions/192530)

<div class="topic-metadata">

**Author:** [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Replies:** 1\
**Last updated:** [August 2, 2010, 4:14pm UTC](https://www.ruby-forum.com/t/check-box-for-terms-and-conditions/192530 "2010-08-02T16:14:47Z")

</div>

Is there a smart way or example for listing terms and conditions and ensuring that they have been read? I’m a relative noob to RonR and I’d like to find a good way to do this? I don’t want to store anything in the db,…

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

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