# Rails

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

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

---

## [Newbie Question: Howto insert a variable into a new form](https://www.ruby-forum.com/t/newbie-question-howto-insert-a-variable-into-a-new-form/143170)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 5\
**Last updated:** [July 16, 2008, 12:26am UTC](https://www.ruby-forum.com/t/newbie-question-howto-insert-a-variable-into-a-new-form/143170 "2008-07-16T00:26:28Z")

</div>

I am trying to populate some fields in a new form before I display it. I know that if I do this: @mapper = Mapper.new(:consultant\_id =\> ‘Fred’) It works and Fred is displayed in the form but in this case consultant\_id…

---

## [NoMethodError from ActiveRecord::Base#save](https://www.ruby-forum.com/t/nomethoderror-from-activerecord-base-save/143173)

<div class="topic-metadata">

**Author:** [@Orbipedis](https://www.ruby-forum.com/u/Orbipedis)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 11:54pm UTC](https://www.ruby-forum.com/t/nomethoderror-from-activerecord-base-save/143173 "2008-07-15T23:54:17Z")

</div>

I have a written a simple RoR program that accepts a plaintext upload from a user and then emails that file capitalized to an email address aquired through a form. I am trying to utilize ActiveRecord to create a list …

---

## [Paginating\_find Help anyone](https://www.ruby-forum.com/t/paginating-find-help-anyone/143095)

<div class="topic-metadata">

**Author:** [@THEBIGO](https://www.ruby-forum.com/u/THEBIGO)\
**Replies:** 3\
**Last updated:** [July 15, 2008, 11:20pm UTC](https://www.ruby-forum.com/t/paginating-find-help-anyone/143095 "2008-07-15T23:20:21Z")

</div>

Hello - I am using paginating\_find trying to paginate my records My CallsController index action is def index @calls = @current\_user.calls.find(:all, :page =\> {:size =\> 4, :current =\> params\[:page\]}) end then in …

---

## [Trying to write a lite Rails version of Yahoo Shortcuts or something similiar](https://www.ruby-forum.com/t/trying-to-write-a-lite-rails-version-of-yahoo-shortcuts-or-something-similiar/143167)

<div class="topic-metadata">

**Author:** [@walksalong](https://www.ruby-forum.com/u/walksalong)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/trying-to-write-a-lite-rails-version-of-yahoo-shortcuts-or-something-similiar/143167 "2008-07-15T22:15:57Z")

</div>

Has anyone ever seen Yahoo Shortcuts or something similiar? I would like to write my own in Rails, but I’m not sure the best approach… or is there something already out there that I’ve missed? The story goes I have a …

---

## [Trouble Connecting to SQL Server](https://www.ruby-forum.com/t/trouble-connecting-to-sql-server/142642)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 9:58pm UTC](https://www.ruby-forum.com/t/trouble-connecting-to-sql-server/142642 "2008-07-15T21:58:23Z")

</div>

Unfortunately for the project I am working on I am required to access an SQL Server database used by our parent company. They are .Net freaks and we haven’t been able to convert them yet. Anyway, I followed the instru…

---

## [How to get a \<select\> box to change the url?](https://www.ruby-forum.com/t/how-to-get-a-select-box-to-change-the-url/143147)

<div class="topic-metadata">

**Author:** [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 9:20pm UTC](https://www.ruby-forum.com/t/how-to-get-a-select-box-to-change-the-url/143147 "2008-07-15T21:20:18Z")

</div>

Hello all, I have a list of games that I want to filter by # of players and category. I want to be able to list either or both parameters and have it work. I don’t know how to make the players box generate the GET…

---

## [Permission System with groups, roles and users](https://www.ruby-forum.com/t/permission-system-with-groups-roles-and-users/143060)

<div class="topic-metadata">

**Author:** [@Pascal\_F](https://www.ruby-forum.com/u/Pascal_F)\
**Replies:** 6\
**Last updated:** [July 15, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/permission-system-with-groups-roles-and-users/143060 "2008-07-15T20:59:09Z")

</div>

Hi there, i have a serious problem here. Let me explain my situation: I have 3 Models: Group, Role, User Pretty self explaining. Every group has multiple roles (every group can define it’s own roles. some have 3, so…

---

## [\[ANN\] Lone Star Ruby Conference 2008 - Registration Now Open](https://www.ruby-forum.com/t/ann-lone-star-ruby-conference-2008-registration-now-open/196743)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/ann-lone-star-ruby-conference-2008-registration-now-open/196743 "2008-07-15T20:14:37Z")

</div>

The second annual Lone Star Ruby Conference is heating up and right around the corner, running for three days, September 4-6 in Austin, TX. http://LoneStarRubyConf.com The Lone Star Ruby Conference is dedicated to pro…

---

## [Fixtures and helper functions](https://www.ruby-forum.com/t/fixtures-and-helper-functions/143153)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 7:21pm UTC](https://www.ruby-forum.com/t/fixtures-and-helper-functions/143153 "2008-07-15T19:21:55Z")

</div>

I like the new fixture features for rails 2.1. However, I would like to define a mapper so I specify the IDs to be used, rather than a hash. This is for several simple reasons: For one, I can type the URLs out a lo…

---

## [RESTful design and many forms in one view](https://www.ruby-forum.com/t/restful-design-and-many-forms-in-one-view/142834)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/restful-design-and-many-forms-in-one-view/142834 "2008-07-15T19:16:04Z")

</div>

I have to admit I’m still wrapping my brain around not only MVS, but RESTful designs, so I’m sorry if this is a newbie question. I have these models: raid has\_many :raid\_drops has\_many :members, :through =\> :attenda…

---

## [Question on Designing Model Associtations](https://www.ruby-forum.com/t/question-on-designing-model-associtations/143125)

<div class="topic-metadata">

**Author:** [@christoph](https://www.ruby-forum.com/u/christoph)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/question-on-designing-model-associtations/143125 "2008-07-15T19:15:29Z")

</div>

Hi all, I try to create a little game, my first application in Ruby and Rails. And I’ve problems understanding polymorphic associations between models. I have a model called “Travel”. Two models, “Character” and “Tru…

---

## [Java Bridge Itext Example Anyone?](https://www.ruby-forum.com/t/java-bridge-itext-example-anyone/142263)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 18\
**Last updated:** [July 15, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/java-bridge-itext-example-anyone/142263 "2008-07-15T18:14:21Z")

</div>

I MAY be able to derive something out of the present example given here : http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/ but this deals with filling out forms. Is there a simpler ex…

---

## [File uploads via web service](https://www.ruby-forum.com/t/file-uploads-via-web-service/143146)

<div class="topic-metadata">

**Author:** [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/file-uploads-via-web-service/143146 "2008-07-15T18:01:33Z")

</div>

I need to write a web service that accepts file uploads (even large ones). My WS is REST based, so I have a create method that accepts only POST. My problem is passing the file to the method, so if someone already so…

---

## [ActiveRecord in Rails 2.1.0 misbehaving for Aggregate Attr](https://www.ruby-forum.com/t/activerecord-in-rails-2-1-0-misbehaving-for-aggregate-attr/142342)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 5:39pm UTC](https://www.ruby-forum.com/t/activerecord-in-rails-2-1-0-misbehaving-for-aggregate-attr/142342 "2008-07-15T17:39:17Z")

</div>

I am not sure if this is a bug in ActiveRecord or is this the intended behavior. If it is then it does not make sense to me. In a nutshell: If you change an aggregate object attribute created via composed\_of method (…

---

## [Controller Synchronisation - ways to decouple 'work' from the controller](https://www.ruby-forum.com/t/controller-synchronisation-ways-to-decouple-work-from-the-controller/143116)

<div class="topic-metadata">

**Author:** [@Wertster](https://www.ruby-forum.com/u/Wertster)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 4:48pm UTC](https://www.ruby-forum.com/t/controller-synchronisation-ways-to-decouple-work-from-the-controller/143116 "2008-07-15T16:48:43Z")

</div>

Hi all, I have been experimenting with rails and have hit a specific limitation that I need some opinions on. This isn’t a criticism or a gripe as I’m a big fan of the framework! First off, the answer to this questio…

---

## [Models added functionality](https://www.ruby-forum.com/t/models-added-functionality/143127)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 4\
**Last updated:** [July 15, 2008, 4:21pm UTC](https://www.ruby-forum.com/t/models-added-functionality/143127 "2008-07-15T16:21:30Z")

</div>

Hello. I have a piece of code (method) that I want all my models to have available. What would be the best way to implement it? Thanks

---

## [Drag/Drop with Image Maps](https://www.ruby-forum.com/t/drag-drop-with-image-maps/143133)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/drag-drop-with-image-maps/143133 "2008-07-15T15:41:16Z")

</div>

Hi all, Is it possible to use HTML area objects from an image map as droppables for a drag/drop interface? I want to get a different response depending on which part of an image I drop a draggable div object on. The …

---

## [Sex expire time for Sessions in memcached](https://www.ruby-forum.com/t/sex-expire-time-for-sessions-in-memcached/143129)

<div class="topic-metadata">

**Author:** [@stanislav](https://www.ruby-forum.com/u/stanislav)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/sex-expire-time-for-sessions-in-memcached/143129 "2008-07-15T15:23:40Z")

</div>

Hi all, I have a problem with expiring sessions in the case with using mem\_cache\_store. I’ve been using ActiveRecord session store till now and expired them with SQL query. Yesterday I switched to memcache for storin…

---

## [Polymorphic\_routes has\_one](https://www.ruby-forum.com/t/polymorphic-routes-has-one/143062)

<div class="topic-metadata">

**Author:** [@julian](https://www.ruby-forum.com/u/julian)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/polymorphic-routes-has-one/143062 "2008-07-15T15:15:25Z")

</div>

So in my config/routes.rb I have : map.resources :product\_lines, :has\_many =\> \[:products, :documents\], :has\_one =\> :image Note: Images are polymorphic (imageable) In my images controller I have: def new @imageable …

---

## [:url =\> mugshots\_path](https://www.ruby-forum.com/t/url-mugshots-path/143121)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 2:59pm UTC](https://www.ruby-forum.com/t/url-mugshots-path/143121 "2008-07-15T14:59:17Z")

</div>

Hi I am doing this tutorial http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu and I need help for this RESTful router in form :url =\> mugshots\_path I get error : undefined local variable or method \`mugshots\_pa…

---

## [Beginner Question](https://www.ruby-forum.com/t/beginner-question/143103)

<div class="topic-metadata">

**Author:** [@musicman](https://www.ruby-forum.com/u/musicman)\
**Replies:** 9\
**Last updated:** [July 15, 2008, 2:37pm UTC](https://www.ruby-forum.com/t/beginner-question/143103 "2008-07-15T14:37:35Z")

</div>

I’m just getting into RoR, coming from a long PHP background. So far I LOVE IT! I’m hitting a roadblock with updating my mysql database. For simplicities sake, I have 2 tables and here are the relevant columns. Table…

---

## [DB2 Driver for Mac](https://www.ruby-forum.com/t/db2-driver-for-mac/143090)

<div class="topic-metadata">

**Author:** [@smitty26](https://www.ruby-forum.com/u/smitty26)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 1:57pm UTC](https://www.ruby-forum.com/t/db2-driver-for-mac/143090 "2008-07-15T13:57:08Z")

</div>

I’ve been developing Rails applications using windows and am slowly transitioning to a Mac but face a slight problem; our back-end uses the AS/400. My question is, what are others doing to connect to an AS/ 400, is t…

---

## [Displaying array elements in order](https://www.ruby-forum.com/t/displaying-array-elements-in-order/143110)

<div class="topic-metadata">

**Author:** [@ganana\_srishti](https://www.ruby-forum.com/u/ganana_srishti)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/displaying-array-elements-in-order/143110 "2008-07-15T13:56:32Z")

</div>

Hi, for example a=\[12,354,633,68,85\] \<%for i in a%\> \<%z=Document.find(i)%\> \<%=z.name%\> \<%end%\> Here the result is displaying randomly in browser but i want to display the result in the array order i.e first 12 t…

---

## [PhP, RoR, Flex 3](https://www.ruby-forum.com/t/php-ror-flex-3/142996)

<div class="topic-metadata">

**Author:** [@Giovanni\_Salazar](https://www.ruby-forum.com/u/Giovanni_Salazar)\
**Replies:** 6\
**Last updated:** [July 15, 2008, 11:59am UTC](https://www.ruby-forum.com/t/php-ror-flex-3/142996 "2008-07-15T11:59:12Z")

</div>

I am evaluating on moving to rails for our main development platform. I would love to hear your experiences(good or bad) Thanks Guys. Giovanni

---

## [Accessing controller specific variables application-wide](https://www.ruby-forum.com/t/accessing-controller-specific-variables-application-wide/143085)

<div class="topic-metadata">

**Author:** [@adamdorsey](https://www.ruby-forum.com/u/adamdorsey)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 11:33am UTC](https://www.ruby-forum.com/t/accessing-controller-specific-variables-application-wide/143085 "2008-07-15T11:33:36Z")

</div>

Not sure if I described this the best in the subject, but here is my problem… I have a ‘settings’ table, that I am storing application configuration data. On my settings “edit” page, I am just grabbing the first entry …

---

## [non-ActiveRecord model structure through api calls](https://www.ruby-forum.com/t/non-activerecord-model-structure-through-api-calls/143079)

<div class="topic-metadata">

**Author:** [@nateleavitt](https://www.ruby-forum.com/u/nateleavitt)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 10:03am UTC](https://www.ruby-forum.com/t/non-activerecord-model-structure-through-api-calls/143079 "2008-07-15T10:03:58Z")

</div>

This question is more about strategy than a how-to. I have MyApplication which interfaces with ApplicationX through xml-rpc calls. In MyApplication I display information from ApplicationX. This information are from c…

---

## [\[Error\] responds\_to\_parent not respond rjs action](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/229170)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 9:49am UTC](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/229170 "2008-07-15T09:49:54Z")

</div>

Hi, (first of all, I have English as second language. I’m sorry for any mistake.) So, I’m getting used to RoR but there are quite things that I can’t do. I’m having a problem whit responds\_to\_parent. All the action …

---

## [Regex noob question](https://www.ruby-forum.com/t/regex-noob-question/143093)

<div class="topic-metadata">

**Author:** [@gsterndale](https://www.ruby-forum.com/u/gsterndale)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 9:42am UTC](https://www.ruby-forum.com/t/regex-noob-question/143093 "2008-07-15T09:42:52Z")

</div>

Using a regular expression, how would I match “howdy” in the following? “begin howdy end begin hello end” =~ /begin (.\*) end/ match = $1 current value of match = “howdy end begin hello” A handy regex tool: http://ww…

---

## [Can't get Globalize running](https://www.ruby-forum.com/t/cant-get-globalize-running/143102)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 9:41am UTC](https://www.ruby-forum.com/t/cant-get-globalize-running/143102 "2008-07-15T09:41:41Z")

</div>

Hey people, I just imported a rails project to my freshly installed NetBeans (used to use Eclipse before) and tried to “reintegrate” Globalize. I tried it by simply typing “rake globalize:setup” while in projects fold…

---

## [Sorting in ruby](https://www.ruby-forum.com/t/sorting-in-ruby/141769)

<div class="topic-metadata">

**Author:** [@seb](https://www.ruby-forum.com/u/seb)\
**Replies:** 7\
**Last updated:** [July 15, 2008, 9:32am UTC](https://www.ruby-forum.com/t/sorting-in-ruby/141769 "2008-07-15T09:32:25Z")

</div>

I am new in ruby.I want to know how sorting can be done in ruby based on some fields like customer name,location etc.what i meant is i have to sort the table based on some fields.how can i.?Can anybody help me.

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

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