# Rails

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

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

---

## [People(:sam) should be saved to a @sam variable?](https://www.ruby-forum.com/t/people-sam-should-be-saved-to-a-sam-variable/177086)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [October 12, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/people-sam-should-be-saved-to-a-sam-variable/177086 "2009-10-12T19:59:03Z")

</div>

Hi all When creating unit tests, I wondered whether I should rather use the following… people(:sam).name = “Sammy” people(:sam).city = “Blah” …or rather the following form: @sam = people(:sam) @sam.name = “Sammy” …

---

## [Model Security Gem](https://www.ruby-forum.com/t/model-security-gem/177159)

<div class="topic-metadata">

**Author:** [@marli03](https://www.ruby-forum.com/u/marli03)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 5:43pm UTC](https://www.ruby-forum.com/t/model-security-gem/177159 "2009-10-12T17:43:27Z")

</div>

Anyone using it? I’m running rails 2.3.2 and am having problems with a SystemStackError: stack level too deep error every time I enable one of the let\_access, let\_display filters

---

## [Processing an XML list in a controller](https://www.ruby-forum.com/t/processing-an-xml-list-in-a-controller/176785)

<div class="topic-metadata">

**Author:** [@saxosurfin](https://www.ruby-forum.com/u/saxosurfin)\
**Replies:** 4\
**Last updated:** [October 12, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/processing-an-xml-list-in-a-controller/176785 "2009-10-12T17:31:02Z")

</div>

Hi I have posted an XML list to a rails controller from a flex client along the lines of The itemList is a parmeter passed to the controller, what I would like to know is how I process the itemList as an XM…

---

## [Walk with Nokogiri through whole DOM?](https://www.ruby-forum.com/t/walk-with-nokogiri-through-whole-dom/177107)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 3\
**Last updated:** [October 12, 2009, 5:29pm UTC](https://www.ruby-forum.com/t/walk-with-nokogiri-through-whole-dom/177107 "2009-10-12T17:29:35Z")

</div>

Hi all I want to walk with Nokogiri through the whole DOM of an HTML document and want to do some stuff to the elements; then save the whole DOM again (with the changes applied). I need something like that: dom.each…

---

## [Re: Overwriting default accessors](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177131)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 5:24pm UTC](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177131 "2009-10-12T17:24:56Z")

</div>

Hi Marnen On Oct 12, 3:04 pm, Marnen Laibow-Koser removed\_email\_address@domain.invalid wrote: hoping that this accessors would be able to set or change the value of :status. But the behaviours doesn’t seems to be l…

---

## [Telephone number validation and formatting](https://www.ruby-forum.com/t/telephone-number-validation-and-formatting/177158)

<div class="topic-metadata">

**Author:** [@raffil](https://www.ruby-forum.com/u/raffil)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 5:22pm UTC](https://www.ruby-forum.com/t/telephone-number-validation-and-formatting/177158 "2009-10-12T17:22:55Z")

</div>

I’m working to build a telephone number validation and formatting method. I’m attaching an address\_helper I use for this. I’d like to get comments on it. The method is based on extending the country model by adding 4…

---

## [May AR objects contain "invalid" data when not saved yet?](https://www.ruby-forum.com/t/may-ar-objects-contain-invalid-data-when-not-saved-yet/177095)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 3\
**Last updated:** [October 12, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/may-ar-objects-contain-invalid-data-when-not-saved-yet/177095 "2009-10-12T17:12:17Z")

</div>

Hi all I have a question about good ActiveRecord style. I have a model Page with two attributes, named “title” and “body”. The title is never set by the user directly, but is extracted from the body, which includes an …

---

## [Suggestion for how to batch add records & photos](https://www.ruby-forum.com/t/suggestion-for-how-to-batch-add-records-photos/177105)

<div class="topic-metadata">

**Author:** [@northband](https://www.ruby-forum.com/u/northband)\
**Replies:** 3\
**Last updated:** [October 12, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/suggestion-for-how-to-batch-add-records-photos/177105 "2009-10-12T16:58:49Z")

</div>

Hi - I’m about to embark on a project where a client will upload a csv file of records (anywhere from 10-1000). Each record can have one or multiple files. I am reaching out to the community for some ideas on how t…

---

## [Render\_component plugin installation](https://www.ruby-forum.com/t/render-component-plugin-installation/177150)

<div class="topic-metadata">

**Author:** [@subashinikumar](https://www.ruby-forum.com/u/subashinikumar)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/render-component-plugin-installation/177150 "2009-10-12T16:47:06Z")

</div>

tried to install render\_component plugin with: ruby script/plugin install git://github.com/lackac/render\_component.git -r rails-edge This generates a directory in vendors/plugin/render\_component but it’s empty. Plea…

---

## [XML into database](https://www.ruby-forum.com/t/xml-into-database/176984)

<div class="topic-metadata">

**Author:** [@jhaagmans](https://www.ruby-forum.com/u/jhaagmans)\
**Replies:** 7\
**Last updated:** [October 12, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/xml-into-database/176984 "2009-10-12T16:45:56Z")

</div>

Hi, I’ve already talked about this in another topic, but I’ve found another approach. We have some complex definitions and structures in our database and I’d like to make it possible to simplify adding items to the …

---

## [Migrations concensus?](https://www.ruby-forum.com/t/migrations-concensus/176995)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [October 12, 2009, 3:04pm UTC](https://www.ruby-forum.com/t/migrations-concensus/176995 "2009-10-12T15:04:39Z")

</div>

It appears from http://rails-engines.org/news/2009/02/02/engines-in-rails-2-3/ that migrations and copying public assets are no longer supported. However, from it appears that migrations are still supported via a r…

---

## [Nested\_attributes](https://www.ruby-forum.com/t/nested-attributes/177132)

<div class="topic-metadata">

**Author:** [@Jeff\_McFadden](https://www.ruby-forum.com/u/Jeff_McFadden)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 2:56pm UTC](https://www.ruby-forum.com/t/nested-attributes/177132 "2009-10-12T14:56:27Z")

</div>

I have a user object, and a user\_profile object. In my form I have: \<% form\_for(:user, :url =\> object\_url, :html =\> { :method =\> :put }) do |f| %\> \<% f.fields\_for :user\_profile do |profile\_form| %\> \<div\> \<%= pro…

---

## [Edit HMT with fields\_for](https://www.ruby-forum.com/t/edit-hmt-with-fields-for/177117)

<div class="topic-metadata">

**Author:** [@arwed](https://www.ruby-forum.com/u/arwed)\
**Replies:** 2\
**Last updated:** [October 12, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/edit-hmt-with-fields-for/177117 "2009-10-12T14:53:31Z")

</div>

Hi, I have 3 models: hotel has\_many :ratings has\_many :categories, :through =\> :ratings category has\_many :ratings has\_many :hotels, :through =\> :ratings rating belongs\_to :hotel belongs\_to :category I have ca…

---

## [Flash / Flex on Rails (Ruby AMF)](https://www.ruby-forum.com/t/flash-flex-on-rails-ruby-amf/177136)

<div class="topic-metadata">

**Author:** [@adinda\_p](https://www.ruby-forum.com/u/adinda_p)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 10:38am UTC](https://www.ruby-forum.com/t/flash-flex-on-rails-ruby-amf/177136 "2009-10-12T10:38:52Z")

</div>

Hi All, I repost my message on RubyAMF group to you all because the group seems dead and i can’t get help. I hope anyone here has done Flash - Rails development can answer my question. I’m creating a Flash - Rails …

---

## [Flex/AIR and Rails](https://www.ruby-forum.com/t/flex-air-and-rails/177124)

<div class="topic-metadata">

**Author:** [@Kreas](https://www.ruby-forum.com/u/Kreas)\
**Replies:** 2\
**Last updated:** [October 12, 2009, 10:36am UTC](https://www.ruby-forum.com/t/flex-air-and-rails/177124 "2009-10-12T10:36:32Z")

</div>

I’m looking at creating an application using a desktop component built with Flex/air that communicates with a site running Ruby on Rails. Does anyone in the group have experience with this, and could you pass on a few…

---

## [Re: Overwriting default accessors](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177125)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 6:04am UTC](https://www.ruby-forum.com/t/re-overwriting-default-accessors/177125 "2009-10-12T06:04:03Z")

</div>

On Oct 12, 10:31 am, Marnen Laibow-Koser removed\_email\_address@domain.invalid wrote: end This won’t quite work. But before I try to improve it…what are you trying to do? Set status to P no matter the argument th…

---

## [Passing model data to a plugin called within that model](https://www.ruby-forum.com/t/passing-model-data-to-a-plugin-called-within-that-model/177112)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 3:54am UTC](https://www.ruby-forum.com/t/passing-model-data-to-a-plugin-called-within-that-model/177112 "2009-10-12T03:54:15Z")

</div>

I am making a plugin which extends ActiveRecord::Base I have the plugin working in my models in other aspects. I would like to pass in some data to the plugin, but I can’t get the data I would like. so if I have: cl…

---

## [Overwriting default accessors](https://www.ruby-forum.com/t/overwriting-default-accessors/177119)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [October 12, 2009, 1:31am UTC](https://www.ruby-forum.com/t/overwriting-default-accessors/177119 "2009-10-12T01:31:10Z")

</div>

Hi all, Coming from the Java & Hibernate world, I was confused when trying out this piece of line of code: class Task \< ActiveRecord::Base def status=(status) status = ‘P’ write\_attribute(:status, status) end end …

---

## [Updating a form.select based whenever another form.select change \[ajax\]](https://www.ruby-forum.com/t/updating-a-form-select-based-whenever-another-form-select-change-ajax/177121)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [October 12, 2009, 1:26am UTC](https://www.ruby-forum.com/t/updating-a-form-select-based-whenever-another-form-select-change-ajax/177121 "2009-10-12T01:26:53Z")

</div>

I have the following form : \<% form\_for :registration, @registration, :url =\> { :action =\> “create” } , :html =\> {:class =\> ‘generalform’} do |form| %\> \<%= render :partial =\> “form”, :object =\> form %\> \<%= form.submi…

---

## [ActiveRecord fails to update without a pause](https://www.ruby-forum.com/t/activerecord-fails-to-update-without-a-pause/177110)

<div class="topic-metadata">

**Author:** [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Replies:** 0\
**Last updated:** [October 11, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/activerecord-fails-to-update-without-a-pause/177110 "2009-10-11T23:06:58Z")

</div>

Hi there, I’m having a strange issue with active record in 2.3.2 development env whereby an update\_ attribute within a loop only gets written to the db if I write (anything) to the logfile, or set a sleep of somewhere …

---

## [Help Finding Lead RoR Developer to manage team](https://www.ruby-forum.com/t/help-finding-lead-ror-developer-to-manage-team/177109)

<div class="topic-metadata">

**Author:** [@madhun](https://www.ruby-forum.com/u/madhun)\
**Replies:** 0\
**Last updated:** [October 11, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/help-finding-lead-ror-developer-to-manage-team/177109 "2009-10-11T22:26:03Z")

</div>

We are currently looking to move from a outsource contractor model to in-house programmers to lead a team of in-house or contract developers and also code themselves. We have a major build which uses: Ruby on Rails, P…

---

## [Share code between unit and functional tests?](https://www.ruby-forum.com/t/share-code-between-unit-and-functional-tests/177089)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [October 11, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/share-code-between-unit-and-functional-tests/177089 "2009-10-11T21:18:39Z")

</div>

Hi all I have the following helper that I use both in the unit and functional tests for my model Page: class PagesControllerTest \< ActionController::TestCase … private def valid\_attributes { :short\_title =\> “Valid…

---

## [Dojo with Rails](https://www.ruby-forum.com/t/dojo-with-rails/177091)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 5\
**Last updated:** [October 11, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091 "2009-10-11T20:12:56Z")

</div>

Hello Group, I am a PHP programmer eager to use Rails. I want to know weather there is any tutorials on how to use Dojo with Rails? I checked out d-rails Google Group, it was in mess! It gives me a impression that d-r…

---

## [Errors when freezing rails](https://www.ruby-forum.com/t/errors-when-freezing-rails/165816)

<div class="topic-metadata">

**Author:** [@skt](https://www.ruby-forum.com/u/skt)\
**Replies:** 9\
**Last updated:** [October 11, 2009, 7:07pm UTC](https://www.ruby-forum.com/t/errors-when-freezing-rails/165816 "2009-10-11T19:07:31Z")

</div>

Folks, I am trying to freeze rails but am running into some errors that I don’t understand. I have tried couple ways based on results I got from searching on the web as below. I thought freezing rails would be a simp…

---

## [AJAX/RJS Same as mailing address type function](https://www.ruby-forum.com/t/ajax-rjs-same-as-mailing-address-type-function/177070)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 1\
**Last updated:** [October 11, 2009, 6:57pm UTC](https://www.ruby-forum.com/t/ajax-rjs-same-as-mailing-address-type-function/177070 "2009-10-11T18:57:11Z")

</div>

Hello everyone! How are you doing? I am creating a rails app that handles customer records, etc. But, I am having trouble with some javascript/ajax stuff. When creating a customer, the employee will enter in the maili…

---

## [AJAX/RJS Question](https://www.ruby-forum.com/t/ajax-rjs-question/177100)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 1\
**Last updated:** [October 11, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/ajax-rjs-question/177100 "2009-10-11T18:56:36Z")

</div>

Hello everyone! How are you doing? I am creating a rails app that handles customer records, etc. But, I am having trouble with some javascript/ajax stuff. When creating a customer, the employee will enter in the maili…

---

## [Values from update action too model](https://www.ruby-forum.com/t/values-from-update-action-too-model/177099)

<div class="topic-metadata">

**Author:** [@gorter9](https://www.ruby-forum.com/u/gorter9)\
**Replies:** 0\
**Last updated:** [October 11, 2009, 6:12pm UTC](https://www.ruby-forum.com/t/values-from-update-action-too-model/177099 "2009-10-11T18:12:53Z")

</div>

How can i get the parameters from the update action into my model? In this case i need the size from the update action Because each attachment has his own size. has\_attached\_file :photo, :styles =\> { :small =\> size --…

---

## [Nested Attributes and find\_or\_create](https://www.ruby-forum.com/t/nested-attributes-and-find-or-create/177097)

<div class="topic-metadata">

**Author:** [@yankees26](https://www.ruby-forum.com/u/yankees26)\
**Replies:** 0\
**Last updated:** [October 11, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/nested-attributes-and-find-or-create/177097 "2009-10-11T17:48:01Z")

</div>

Hi, I’m using the new Nested Attributes to edit my models. It’s a complicated relationship between 5 different models which are subclassed from a ‘Metadata’ model. They all have has\_and\_belongs\_to\_many relationships …

---

## [Extjs with rails](https://www.ruby-forum.com/t/extjs-with-rails/177093)

<div class="topic-metadata">

**Author:** [@disturb](https://www.ruby-forum.com/u/disturb)\
**Replies:** 1\
**Last updated:** [October 11, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/extjs-with-rails/177093 "2009-10-11T14:41:36Z")

</div>

Hi, I start to use extjs with rails, I begin with this tutorial : http://www.extjs.com/learn/Tutorial:Using\_Ext\_Grid\_with\_Ruby\_on\_Rails but the grid with data is not display in the screen,the file “grid-paging.js” in…

---

## [Pass multiple form element values with link\_to\_remote?](https://www.ruby-forum.com/t/pass-multiple-form-element-values-with-link-to-remote/125787)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [October 11, 2009, 11:35am UTC](https://www.ruby-forum.com/t/pass-multiple-form-element-values-with-link-to-remote/125787 "2009-10-11T11:35:25Z")

</div>

Let me preface this by noting that I’m new to Rails and hardly know anything about Javascript…hence why I need help. :slight\_smile: That said, I have a form which contains three text fields: site\_id, start\_date, and…

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

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