# Rails

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

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

---

## [Noob question on associated records and their controller structure](https://www.ruby-forum.com/t/noob-question-on-associated-records-and-their-controller-structure/184816)

<div class="topic-metadata">

**Author:** [@Grary](https://www.ruby-forum.com/u/Grary)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/noob-question-on-associated-records-and-their-controller-structure/184816 "2010-03-09T18:55:00Z")

</div>

Hi, I have controllers for two models between which there exists a belongs\_to/has\_one relationship. How do I reference the parent model object in the child controller so that I can later recover the child object in t…

---

## [Efficiently building collections of nested sets](https://www.ruby-forum.com/t/efficiently-building-collections-of-nested-sets/184762)

<div class="topic-metadata">

**Author:** [@DGerton](https://www.ruby-forum.com/u/DGerton)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 6:40pm UTC](https://www.ruby-forum.com/t/efficiently-building-collections-of-nested-sets/184762 "2010-03-09T18:40:31Z")

</div>

This is question deals with the common example where Category has\_many Products. (We’ll use Species instead of Products here.) Assume Category is a nested class. Let’s use this as the example: \[Categories\] Animals (i…

---

## [Code Cleaning](https://www.ruby-forum.com/t/code-cleaning/184849)

<div class="topic-metadata">

**Author:** [@christophe1](https://www.ruby-forum.com/u/christophe1)\
**Replies:** 7\
**Last updated:** [March 9, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/code-cleaning/184849 "2010-03-09T18:36:52Z")

</div>

Hi there, I’m kind of a newbie on RoR and on this group and I was wondering if someone could help to clean this bit of code: \<%= link\_to\_remote (image\_tag(“hide.png”, :size=\>“16x16”), :url=\>"/message/#{message.id}/hi…

---

## [Redirect to the url after login](https://www.ruby-forum.com/t/redirect-to-the-url-after-login/184844)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 6:28pm UTC](https://www.ruby-forum.com/t/redirect-to-the-url-after-login/184844 "2010-03-09T18:28:14Z")

</div>

Hi, I am using authlogic as a authentication mechanism. I am sending out an email to user if he has any new friend request. I am giving a URL in the email from which he can accept the invitation. My problem is whenev…

---

## [\[JOBS\] Ruby On Rails Developer](https://www.ruby-forum.com/t/jobs-ruby-on-rails-developer/184864)

<div class="topic-metadata">

**Author:** [@Dominika](https://www.ruby-forum.com/u/Dominika)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 6:08pm UTC](https://www.ruby-forum.com/t/jobs-ruby-on-rails-developer/184864 "2010-03-09T18:08:46Z")

</div>

RUBY ON RAILS DEVELOPER: BIBLIOCOMMONS The Position: We are seeking an experienced and passionate Ruby developer who will be a major contributor to our innovative social discovery platform for libraries. The Ideal C…

---

## [Noob issue with virtual attributes](https://www.ruby-forum.com/t/noob-issue-with-virtual-attributes/184825)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 2\
**Last updated:** [March 9, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/noob-issue-with-virtual-attributes/184825 "2010-03-09T17:32:46Z")

</div>

Hello, I have 2 models, city and tip. A city an have only one tip. So what i am trying to do is to add my tip properties to the city form and create or update the city with his child the tip. but what i’ve done so fa…

---

## [Desired: webdav](https://www.ruby-forum.com/t/desired-webdav/184860)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 4:42pm UTC](https://www.ruby-forum.com/t/desired-webdav/184860 "2010-03-09T16:42:09Z")

</div>

hi does anyone know / use / etc of a current webdav implementation / library? thx tom

---

## [Plugin for uploading a folder of images?](https://www.ruby-forum.com/t/plugin-for-uploading-a-folder-of-images/184834)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 4\
**Last updated:** [March 9, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/plugin-for-uploading-a-folder-of-images/184834 "2010-03-09T16:39:53Z")

</div>

Hi - can anyone recommend a plugin/gem for uploading a bunch of image files at once, and converting them to attachments? Ideally one that lets you select a folder and then uploads all of the images in that folder? tha…

---

## [Periodically\_call\_remote doesnÂ´t work properly](https://www.ruby-forum.com/t/periodically-call-remote-doesna-t-work-properly/184858)

<div class="topic-metadata">

**Author:** [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 4:31pm UTC](https://www.ruby-forum.com/t/periodically-call-remote-doesna-t-work-properly/184858 "2010-03-09T16:31:37Z")

</div>

Hi everyone: I have some problems using periodically\_call\_remote, here is my code: \<%=periodically\_call\_remote(:url =\> ‘http://localhost:3000’, :frequency =\> ‘0.5’, :update =\> {:success=\>‘imagen’})%\> \<%=image\_tag("/…

---

## [Translation key escape suggestion](https://www.ruby-forum.com/t/translation-key-escape-suggestion/184859)

<div class="topic-metadata">

**Author:** [@ginger72](https://www.ruby-forum.com/u/ginger72)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 4:19pm UTC](https://www.ruby-forum.com/t/translation-key-escape-suggestion/184859 "2010-03-09T16:19:20Z")

</div>

Hi, while working on globalize\_bridge, a plugin that is supposed to provide a seamless migration path to I18n from Globalize1, I discovered what might be a useful feature in future versions of I18n. My app uses trans…

---

## [Edit existing PDF as template](https://www.ruby-forum.com/t/edit-existing-pdf-as-template/184814)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 5\
**Last updated:** [March 9, 2010, 3:06pm UTC](https://www.ruby-forum.com/t/edit-existing-pdf-as-template/184814 "2010-03-09T15:06:45Z")

</div>

Hi, I am new to rails. I need to edit an existing pdf file and fill in some data and send it to browser, how to implement this? Is there an example online I can look at it? Thanks!

---

## [Making a generic comment model](https://www.ruby-forum.com/t/making-a-generic-comment-model/184820)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 1:50pm UTC](https://www.ruby-forum.com/t/making-a-generic-comment-model/184820 "2010-03-09T13:50:37Z")

</div>

I have a Comment model obviously to make comments. I have also a Person and Family class and I want to make comments on bother a person and a family. How can I set this up. I want to use the same generic comments tabl…

---

## [Fast growing startup looking for a Senior Stud Rails Developer in India](https://www.ruby-forum.com/t/fast-growing-startup-looking-for-a-senior-stud-rails-developer-in-india/184841)

<div class="topic-metadata">

**Author:** [@msubhas](https://www.ruby-forum.com/u/msubhas)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 12:59pm UTC](https://www.ruby-forum.com/t/fast-growing-startup-looking-for-a-senior-stud-rails-developer-in-india/184841 "2010-03-09T12:59:06Z")

</div>

Do you have what it takes to be part of a Startup where only the best succeeds? Then this job is for you. Chronus Corporation is looking for energetic and dedicated individuals with a passion for software development,…

---

## [Acts as list and passenger](https://www.ruby-forum.com/t/acts-as-list-and-passenger/184840)

<div class="topic-metadata">

**Author:** [@lis2](https://www.ruby-forum.com/u/lis2)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 12:45pm UTC](https://www.ruby-forum.com/t/acts-as-list-and-passenger/184840 "2010-03-09T12:45:44Z")

</div>

Hello, i have problem with acts\_as\_list plugin. Everything works fine on development server, but it doesnt work on production (passenger) . I set RailsSpawnMethod to conservative but it doesnt help Thanks for your hel…

---

## [Time picker help](https://www.ruby-forum.com/t/time-picker-help/184835)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 12:29pm UTC](https://www.ruby-forum.com/t/time-picker-help/184835 "2010-03-09T12:29:23Z")

</div>

I have installed time picker in my application using the below url. ruby script/plugin install http://timepicker.rubyforge.org/svn/trunk/ \<%=time\_picker(Time.now, {:time\_format =\> ‘12’, :minute\_step =\> 30})%\> when i u…

---

## [Authlogic and Aegis, current\_user nil problem, Guest user](https://www.ruby-forum.com/t/authlogic-and-aegis-current-user-nil-problem-guest-user/184831)

<div class="topic-metadata">

**Author:** [@analogue40](https://www.ruby-forum.com/u/analogue40)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 10:15am UTC](https://www.ruby-forum.com/t/authlogic-and-aegis-current-user-nil-problem-guest-user/184831 "2010-03-09T10:15:12Z")

</div>

Hi All, I have set up Authlogic and Aegis for role based authorization. Each time I check if a user has permission to do something, as it stands now I have to check ‘current\_user’ isn’t empty first, like this: \<% if…

---

## [To get only the updated fields](https://www.ruby-forum.com/t/to-get-only-the-updated-fields/184474)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 12\
**Last updated:** [March 9, 2010, 9:31am UTC](https://www.ruby-forum.com/t/to-get-only-the-updated-fields/184474 "2010-03-09T09:31:32Z")

</div>

Hi I remember once I read about to get only updated fields from an update\_attributes method. Means say I have a model user with name,age,sex etc And when the user updates the information I have to first check whether…

---

## [What is the use of the type information in the serialized xml](https://www.ruby-forum.com/t/what-is-the-use-of-the-type-information-in-the-serialized-xml/184826)

<div class="topic-metadata">

**Author:** [@deepak](https://www.ruby-forum.com/u/deepak)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 9:14am UTC](https://www.ruby-forum.com/t/what-is-the-use-of-the-type-information-in-the-serialized-xml/184826 "2010-03-09T09:14:55Z")

</div>

hi, i had a general question, what is the use of the type information in the serialized xml? \<?xml version="1.0" encoding="UTF-8"?\> \</posts what is the use of saying that posts is of type ‘array’, any use to Activ…

---

## [Scaffolding oddities -- any ideas?](https://www.ruby-forum.com/t/scaffolding-oddities-any-ideas/184786)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 1\
**Last updated:** [March 9, 2010, 6:31am UTC](https://www.ruby-forum.com/t/scaffolding-oddities-any-ideas/184786 "2010-03-09T06:31:04Z")

</div>

Hi All, I’ve got a couple of problems and solutions I’ll try unless I get guidance for more Rails-like approaches. Details follow. Thanks is advance, Richard I. Problems and possible solutions: The user CRUD work…

---

## [Need to DRY views for a global menu](https://www.ruby-forum.com/t/need-to-dry-views-for-a-global-menu/184813)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 5\
**Last updated:** [March 9, 2010, 4:21am UTC](https://www.ruby-forum.com/t/need-to-dry-views-for-a-global-menu/184813 "2010-03-09T04:21:07Z")

</div>

Hi All, I’ve got a bunch of views for Vendors and Users, e.g. app\\views\\vendors \\index.html.erb: Listing vendors \<div id="menu"\> \<%= link\_to 'Vendor', :controller=\>'vendors', :action=\>'index' %\> &n…

---

## [Routes & Link\_to](https://www.ruby-forum.com/t/routes-link-to/184819)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 2:44am UTC](https://www.ruby-forum.com/t/routes-link-to/184819 "2010-03-09T02:44:02Z")

</div>

Hi, I really don’t know if i am doing this correctly, so please tell me if so. I have a product model who has many ingredients. So in my product form i’ve added a text\_field to put the ingredient, and create or find…

---

## [Google Analytics and partials](https://www.ruby-forum.com/t/google-analytics-and-partials/184748)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 2\
**Last updated:** [March 9, 2010, 12:02am UTC](https://www.ruby-forum.com/t/google-analytics-and-partials/184748 "2010-03-09T00:02:57Z")

</div>

I have been tracking users with Google Analytics via the javascript code in the header of my main template and that works very well. I’ve come to realize that there are a few places where I have will\_paginate and some…

---

## [How to access local parameters in partials?](https://www.ruby-forum.com/t/how-to-access-local-parameters-in-partials/184805)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 3\
**Last updated:** [March 9, 2010, 12:00am UTC](https://www.ruby-forum.com/t/how-to-access-local-parameters-in-partials/184805 "2010-03-09T00:00:56Z")

</div>

In my template, I call this partial with an additional parameter: \<%= render :partial =\> "shared/finder\_list\_header.html.erb", :locals =\> { :selectFinder =\> true } %\> ... Inside the partial I try to access selectFinde…

---

## [Install problems on fedora 12](https://www.ruby-forum.com/t/install-problems-on-fedora-12/184808)

<div class="topic-metadata">

**Author:** [@Jedrin](https://www.ruby-forum.com/u/Jedrin)\
**Replies:** 4\
**Last updated:** [March 8, 2010, 11:44pm UTC](https://www.ruby-forum.com/t/install-problems-on-fedora-12/184808 "2010-03-08T23:44:13Z")

</div>

I just got set up with fedora 12 and am a new user for that distro. I got ruby 1.8.6 installed. Then I tried to install rails using yum which gave me rails 2.3.4. When I tried to start a rails project I had an error s…

---

## [ActiveRecord::ReadOnlyRecord on attributes\_update](https://www.ruby-forum.com/t/activerecord-readonlyrecord-on-attributes-update/184797)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 11:37pm UTC](https://www.ruby-forum.com/t/activerecord-readonlyrecord-on-attributes-update/184797 "2010-03-08T23:37:51Z")

</div>

Hi, I have a ActiveRecord::ReadOnlyRecord error when i update child attributes whereas when i create a new one it works fine. Someone had this error? Best, greg

---

## [Validation and STI](https://www.ruby-forum.com/t/validation-and-sti/184804)

<div class="topic-metadata">

**Author:** [@eugenio](https://www.ruby-forum.com/u/eugenio)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 11:02pm UTC](https://www.ruby-forum.com/t/validation-and-sti/184804 "2010-03-08T23:02:04Z")

</div>

i got a problem with validation and sti class Account \< ActiveRecord::Base validates\_uniqueness\_of :field1 … end User \< Account … end i created a few User models in the bootstrap file and i noticed that the vali…

---

## [Instantiating Controller Object on Rails3 for unit testing](https://www.ruby-forum.com/t/instantiating-controller-object-on-rails3-for-unit-testing/184806)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 11:00pm UTC](https://www.ruby-forum.com/t/instantiating-controller-object-on-rails3-for-unit-testing/184806 "2010-03-08T23:00:18Z")

</div>

Dear all, I am experiencing this error when doing unit testing: Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating ob…

---

## [Modelling question](https://www.ruby-forum.com/t/modelling-question/184801)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 10:33pm UTC](https://www.ruby-forum.com/t/modelling-question/184801 "2010-03-08T22:33:23Z")

</div>

Hi, I have these 3 models: City :name Product :name city\_preference :city\_id, :product\_id, :min, :max How do i create the associations between these tables? Best Greg

---

## [Attaching, literally, a link](https://www.ruby-forum.com/t/attaching-literally-a-link/184802)

<div class="topic-metadata">

**Author:** [@theduz](https://www.ruby-forum.com/u/theduz)\
**Replies:** 1\
**Last updated:** [March 8, 2010, 10:04pm UTC](https://www.ruby-forum.com/t/attaching-literally-a-link/184802 "2010-03-08T22:04:42Z")

</div>

Hi, I’m trying to avoid sending large PDF’s via email. My current strategy is to put a link to the document or web page into the e-mail, and it works just fine, but I’m getting complaints that “the attachment is mis…

---

## [Calling save changes a date field in my model instance to 2000](https://www.ruby-forum.com/t/calling-save-changes-a-date-field-in-my-model-instance-to-2000/184791)

<div class="topic-metadata">

**Author:** [@prichard](https://www.ruby-forum.com/u/prichard)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 9:11pm UTC](https://www.ruby-forum.com/t/calling-save-changes-a-date-field-in-my-model-instance-to-2000/184791 "2010-03-08T21:11:26Z")

</div>

Hi, I’m having a problem with dates (laugh if you must :). $ rails --version Rails 2.3.5 $ ruby --version ruby 1.8.7 (2010-01-10 patchlevel 249) \[x86\_64-linux\] I have a bunch of data in a text file that I’d like to…

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

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