# Rails

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

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

---

## [Child to Parent Validation Errors](https://www.ruby-forum.com/t/child-to-parent-validation-errors/186609)

<div class="topic-metadata">

**Author:** [@smarter](https://www.ruby-forum.com/u/smarter)\
**Replies:** 0\
**Last updated:** [April 9, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/child-to-parent-validation-errors/186609 "2010-04-09T17:24:50Z")

</div>

Hi: Passing child virtual attribute validation error to parent… in case of nested attributes. So, I have a Parent Model say ‘Parent’. Nested Attributes it accepts for Child say ‘Child’ Now suppose there is a validat…

---

## [Switching between Rails 3 and Rails 2](https://www.ruby-forum.com/t/switching-between-rails-3-and-rails-2/186304)

<div class="topic-metadata">

**Author:** [@smarter](https://www.ruby-forum.com/u/smarter)\
**Replies:** 5\
**Last updated:** [April 9, 2010, 5:16pm UTC](https://www.ruby-forum.com/t/switching-between-rails-3-and-rails-2/186304 "2010-04-09T17:16:44Z")

</div>

Hi there: Any docs that show best ways (preferably on Mac) to switch between Rails 3 and Rails2…that is Upgrade and Downgrade both?

---

## [Openssl](https://www.ruby-forum.com/t/openssl/186602)

<div class="topic-metadata">

**Author:** [@halfbyte](https://www.ruby-forum.com/u/halfbyte)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 4:30pm UTC](https://www.ruby-forum.com/t/openssl/186602 "2010-04-09T16:30:03Z")

</div>

Hello, I have some kind of weird problem. I’d like to use new instalation of rails, I have installed the gems to the Ruby, then the Rails. When I use command script/generate there appear some error mesage, that I do…

---

## [Overall model /db design comments sought](https://www.ruby-forum.com/t/overall-model-db-design-comments-sought/186588)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 3:10pm UTC](https://www.ruby-forum.com/t/overall-model-db-design-comments-sought/186588 "2010-04-09T15:10:11Z")

</div>

Hi there, Im wondering how to best go about this and would appreciate some general pointers etc. Background: just a language learning site where users can can write posts both in their native language and the langua…

---

## [Giving up PHP. ...Can't decide between Rails & Django](https://www.ruby-forum.com/t/giving-up-php-cant-decide-between-rails-django/186597)

<div class="topic-metadata">

**Author:** [@UnclaimedBaggage](https://www.ruby-forum.com/u/UnclaimedBaggage)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/giving-up-php-cant-decide-between-rails-django/186597 "2010-04-09T14:20:52Z")

</div>

Hi folks, I’m a long-term (8 years) PHP developer who’s recently started dabbling with Ruby & Python. I REALLY like what I’ve seen from both frameworks and quite frankly, am a little miffed I didn’t jump on the bandw…

---

## [Rails 3 DEPRECATIONS](https://www.ruby-forum.com/t/rails-3-deprecations/186568)

<div class="topic-metadata">

**Author:** [@stevedogers](https://www.ruby-forum.com/u/stevedogers)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 11:53am UTC](https://www.ruby-forum.com/t/rails-3-deprecations/186568 "2010-04-09T11:53:21Z")

</div>

Rails 3 DEPRECATIONS I’m working my way through the transition from Rails 2 to Rails 3 and I came across the DEPRECATION warnings that we all will start seeing real soon. These are currently implemented as shortcuts t…

---

## [Best practise for overriding rails helpers](https://www.ruby-forum.com/t/best-practise-for-overriding-rails-helpers/186595)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [April 9, 2010, 11:42am UTC](https://www.ruby-forum.com/t/best-practise-for-overriding-rails-helpers/186595 "2010-04-09T11:42:35Z")

</div>

hey all. I just overrode rails’ ‘options\_for\_select’ helper to take a third argument in each subarray which is used as the title (ie tooltip) for each option tag. I’m wondering in cases like this if best practise is…

---

## [Ocra: can't execute the executable](https://www.ruby-forum.com/t/ocra-cant-execute-the-executable/186594)

<div class="topic-metadata">

**Author:** [@vecchiaspugna](https://www.ruby-forum.com/u/vecchiaspugna)\
**Replies:** 0\
**Last updated:** [April 9, 2010, 11:20am UTC](https://www.ruby-forum.com/t/ocra-cant-execute-the-executable/186594 "2010-04-09T11:20:45Z")

</div>

Hi all! I was very excited when i find out Ocra, that was exactly what i needed! but… unfortunately i can’t make my executable work. I create everything without any errors i make my rails app i create a file ini…

---

## [Populating a select box on changing another selectbox elemnt](https://www.ruby-forum.com/t/populating-a-select-box-on-changing-another-selectbox-elemnt/186528)

<div class="topic-metadata">

**Author:** [@veena](https://www.ruby-forum.com/u/veena)\
**Replies:** 2\
**Last updated:** [April 9, 2010, 11:10am UTC](https://www.ruby-forum.com/t/populating-a-select-box-on-changing-another-selectbox-elemnt/186528 "2010-04-09T11:10:57Z")

</div>

Hello frnds, I hav 2 select boxes. First select box is populated with all the “distinct states”.On selecting a state I want the 2nd selct box to be populated with its corresponding “districts”. On selecting the dist…

---

## [Habtm in nested form](https://www.ruby-forum.com/t/habtm-in-nested-form/186558)

<div class="topic-metadata">

**Author:** [@bebesuk](https://www.ruby-forum.com/u/bebesuk)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 11:10am UTC](https://www.ruby-forum.com/t/habtm-in-nested-form/186558 "2010-04-09T11:10:34Z")

</div>

Hi! I have next ====== models require ‘paperclip’ class User \< ActiveRecord::Base has\_one :user\_settings end class UserSettings \< ActiveRecord::Base has\_one :habits\_and\_past accepts\_nested\_attributes\_for :habits\_…

---

## [Overwriting modifiers methods with Rails](https://www.ruby-forum.com/t/overwriting-modifiers-methods-with-rails/186535)

<div class="topic-metadata">

**Author:** [@mffreire](https://www.ruby-forum.com/u/mffreire)\
**Replies:** 6\
**Last updated:** [April 9, 2010, 11:04am UTC](https://www.ruby-forum.com/t/overwriting-modifiers-methods-with-rails/186535 "2010-04-09T11:04:46Z")

</div>

Hi everyone! I’m a little bit new to Rails development and I am looking for a solution for this issue. Let’s say that I have a model called Person and the person has an attribute name. But I want to put a surname w…

---

## [Count(\*) in find :select returns a String? Why not Fixnum?](https://www.ruby-forum.com/t/count-in-find-select-returns-a-string-why-not-fixnum/186478)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 13\
**Last updated:** [April 9, 2010, 11:03am UTC](https://www.ruby-forum.com/t/count-in-find-select-returns-a-string-why-not-fixnum/186478 "2010-04-09T11:03:00Z")

</div>

clicks = Click.find(:all,:select=\>“count(\*) as count, date”, :group=\>“date”) =\> \[#\<Click date: “2010-04-05”\>, #\<Click date: “2010-04-06”\>, #\<Click date: “2010-04-07”\>\] clicks\[0\].count.class =\> String Should …

---

## [Getting rid of unwanted DB transactions?](https://www.ruby-forum.com/t/getting-rid-of-unwanted-db-transactions/186560)

<div class="topic-metadata">

**Author:** [@mari\_an](https://www.ruby-forum.com/u/mari_an)\
**Replies:** 5\
**Last updated:** [April 9, 2010, 10:25am UTC](https://www.ruby-forum.com/t/getting-rid-of-unwanted-db-transactions/186560 "2010-04-09T10:25:32Z")

</div>

It seems as if I am having trouble with Rails automatically wrapping multiple SQL INSERT statements into BEGIN and COMMIT. Is there a way to prevent Rails from doing this? I want to create a user object when creating …

---

## [Error in Mysql Connection](https://www.ruby-forum.com/t/error-in-mysql-connection/155673)

<div class="topic-metadata">

**Author:** [@angaps](https://www.ruby-forum.com/u/angaps)\
**Replies:** 13\
**Last updated:** [April 9, 2010, 9:59am UTC](https://www.ruby-forum.com/t/error-in-mysql-connection/155673 "2010-04-09T09:59:56Z")

</div>

Hai Iam getting error in mysql connection. C:\\Ruby\\addr\>ruby script/server =\> Booting WEBrick… =\> Rails 2.2.2 application started on http://0.0.0.0:3000 =\> Ctrl-C to shutdown server; call with --help for options \[2…

---

## [Can you explain reject(&:new\_record?)](https://www.ruby-forum.com/t/can-you-explain-reject-new-record/186545)

<div class="topic-metadata">

**Author:** [@droopy](https://www.ruby-forum.com/u/droopy)\
**Replies:** 4\
**Last updated:** [April 9, 2010, 9:49am UTC](https://www.ruby-forum.com/t/can-you-explain-reject-new-record/186545 "2010-04-09T09:49:50Z")

</div>

Hi there, I’ve been investigating the railscasts episodes which talk about complex forms and I ran across this notation in the example code provided in part 3 of the episode. at some point in a model method, there is…

---

## [Want to implement authetication of user id and password for my cms](https://www.ruby-forum.com/t/want-to-implement-authetication-of-user-id-and-password-for-my-cms/186586)

<div class="topic-metadata">

**Author:** [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 8:30am UTC](https://www.ruby-forum.com/t/want-to-implement-authetication-of-user-id-and-password-for-my-cms/186586 "2010-04-09T08:30:49Z")

</div>

any good script or plugin to implement user id and password authentication . thanks rahul

---

## [Problem in giving subdomain to one controller](https://www.ruby-forum.com/t/problem-in-giving-subdomain-to-one-controller/186584)

<div class="topic-metadata">

**Author:** [@rahul\_m](https://www.ruby-forum.com/u/rahul_m)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 8:02am UTC](https://www.ruby-forum.com/t/problem-in-giving-subdomain-to-one-controller/186584 "2010-04-09T08:02:43Z")

</div>

hello i want to give subdomain to one controller how can i give it … thanks rahul

---

## [How to stop postbacks in superrewards](https://www.ruby-forum.com/t/how-to-stop-postbacks-in-superrewards/186583)

<div class="topic-metadata">

**Author:** [@Rain1](https://www.ruby-forum.com/u/Rain1)\
**Replies:** 0\
**Last updated:** [April 9, 2010, 7:51am UTC](https://www.ruby-forum.com/t/how-to-stop-postbacks-in-superrewards/186583 "2010-04-09T07:51:35Z")

</div>

Hi Am currently working with integrating superrewards where i came up with all the steps included with superrewards but i didnt find the clear documentation for stopping the postbacks from superrewards (i.e., to wh…

---

## [Calendar\_date\_select : Ruby on Rails Datepicker Plugin](https://www.ruby-forum.com/t/calendar-date-select-ruby-on-rails-datepicker-plugin/106520)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 3\
**Last updated:** [April 9, 2010, 5:50am UTC](https://www.ruby-forum.com/t/calendar-date-select-ruby-on-rails-datepicker-plugin/106520 "2010-04-09T05:50:39Z")

</div>

Hello all! Just wanted to announce I released a date picker for rails plugin recently. Itâ€™s lean (~12kb)! Itâ€™s mean (it can pick dates and datetimes, popup or embedded!)! And itâ€™s easy to use (automatically …

---

## [OT: Country -\> (State) -\> City/Town (XML/JSON)](https://www.ruby-forum.com/t/ot-country-state-city-town-xml-json/186486)

<div class="topic-metadata">

**Author:** [@Ants\_P](https://www.ruby-forum.com/u/Ants_P)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 5:25am UTC](https://www.ruby-forum.com/t/ot-country-state-city-town-xml-json/186486 "2010-04-09T05:25:53Z")

</div>

Does anyone know where I can find Country -\> (State) -\> City/Town data in easy to read format (XML/JSON)? I need it for my application and would like a good base of countries/states/towns/cities before I start asking…

---

## [Unknown attribute: version (nested forms)](https://www.ruby-forum.com/t/unknown-attribute-version-nested-forms/186430)

<div class="topic-metadata">

**Author:** [@oreng](https://www.ruby-forum.com/u/oreng)\
**Replies:** 7\
**Last updated:** [April 9, 2010, 3:35am UTC](https://www.ruby-forum.com/t/unknown-attribute-version-nested-forms/186430 "2010-04-09T03:35:50Z")

</div>

I try to update a nested model (version) and get this error. any tips would be great! my models: location has\_many :versions view \<% form\_for location do |location\_form| %\> \<%= location\_form.label location.secti…

---

## [Problem running unit test](https://www.ruby-forum.com/t/problem-running-unit-test/186549)

<div class="topic-metadata">

**Author:** [@Everton\_L](https://www.ruby-forum.com/u/Everton_L)\
**Replies:** 7\
**Last updated:** [April 9, 2010, 1:41am UTC](https://www.ruby-forum.com/t/problem-running-unit-test/186549 "2010-04-09T01:41:04Z")

</div>

Hi Folks I’m brand new in rails. I’m trying to build a little application, and when I tried to run a unit test, I got an error. The error follows below: ActiveRecord::StatementInvalid: PGError: ERROR: value too long…

---

## [Advice on restructuring](https://www.ruby-forum.com/t/advice-on-restructuring/186546)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 1\
**Last updated:** [April 9, 2010, 12:13am UTC](https://www.ruby-forum.com/t/advice-on-restructuring/186546 "2010-04-09T00:13:17Z")

</div>

Ive inherited a table called contacts which is used throughout the site. There are a lot of duplicates in this table we want to remove(i.e. the email field was not set to unique so multiple accounts were created etc …

---

## [POST-only logic in protect\_from\_forgery considered harmful?](https://www.ruby-forum.com/t/post-only-logic-in-protect-from-forgery-considered-harmful/186155)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [April 9, 2010, 12:03am UTC](https://www.ruby-forum.com/t/post-only-logic-in-protect-from-forgery-considered-harmful/186155 "2010-04-09T00:03:20Z")

</div>

Hi folks, I am just getting into rails again after a multi-year stint of mod\_perl jobs, which might grant me some newbie-indemnity for the time being - but I’ve found an issue I think warrants discussion. As discusse…

---

## [Progressive output on the views](https://www.ruby-forum.com/t/progressive-output-on-the-views/186565)

<div class="topic-metadata">

**Author:** [@rorra](https://www.ruby-forum.com/u/rorra)\
**Replies:** 1\
**Last updated:** [April 8, 2010, 11:56pm UTC](https://www.ruby-forum.com/t/progressive-output-on-the-views/186565 "2010-04-08T23:56:18Z")

</div>

There is one web page that because it request data from several web services, it delays between 20 and 200 seconds. So my idea is to display the status of the data that is being fetched (or even the data as its being …

---

## [Undefined local variable or method \`globalize\_options'](https://www.ruby-forum.com/t/undefined-local-variable-or-method-globalize-options/186566)

<div class="topic-metadata">

**Author:** [@StuFF\_mc](https://www.ruby-forum.com/u/StuFF_mc)\
**Replies:** 0\
**Last updated:** [April 8, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-globalize-options/186566 "2010-04-08T23:36:59Z")

</div>

Hi, I was recommended to post my questions here by Sven F… I know I18n which I use since a couple of months for both http://radiopodcast.fr (+ it’s upcoming iPhone app) and the backend of the upcoming SevenSnap.com i…

---

## [Time\_select and MultiparameterAssignmentErrors](https://www.ruby-forum.com/t/time-select-and-multiparameterassignmenterrors/186493)

<div class="topic-metadata">

**Author:** [@khagimoto](https://www.ruby-forum.com/u/khagimoto)\
**Replies:** 7\
**Last updated:** [April 8, 2010, 10:08pm UTC](https://www.ruby-forum.com/t/time-select-and-multiparameterassignmenterrors/186493 "2010-04-08T22:08:00Z")

</div>

Hello, I have a couple of time field (MySQL data type: time) “start\_time” and “end\_time”, and I’m trying to use a time\_select helper to save the data. Here’s how I’m using it: \<%= form.time\_select :activity\_start\_ti…

---

## [Rspecs for a rails plugin](https://www.ruby-forum.com/t/rspecs-for-a-rails-plugin/186539)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 7\
**Last updated:** [April 8, 2010, 9:40pm UTC](https://www.ruby-forum.com/t/rspecs-for-a-rails-plugin/186539 "2010-04-08T21:40:05Z")

</div>

I have a Rails plugin, which is application independent, but depends on Rails, to be installed in a Rails app. (I have not yet converted it to a gem, but plan to eventually, and I’m not sure if that would change the a…

---

## [Webrick crashes randomy](https://www.ruby-forum.com/t/webrick-crashes-randomy/186554)

<div class="topic-metadata">

**Author:** [@khanmurtuza](https://www.ruby-forum.com/u/khanmurtuza)\
**Replies:** 0\
**Last updated:** [April 8, 2010, 9:08pm UTC](https://www.ruby-forum.com/t/webrick-crashes-randomy/186554 "2010-04-08T21:08:12Z")

</div>

I am trying Redmine application which is written in ruby. I have set it up on Windows and using mysql database which is remotely located. Every thing works fine except the application crashes randomly and I can’t see …

---

## [Pick up change to plain ol' Ruby file?](https://www.ruby-forum.com/t/pick-up-change-to-plain-ol-ruby-file/186551)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 1\
**Last updated:** [April 8, 2010, 8:43pm UTC](https://www.ruby-forum.com/t/pick-up-change-to-plain-ol-ruby-file/186551 "2010-04-08T20:43:40Z")

</div>

I have a .rb file without any controllers, models, etc. in it - in dev mode my instance picks up new changes to foo\_controller.rb, but it doesn’t pick up changes to my util.rb file. Is there a way to convince Rails t…

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

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