# Rails

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

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

---

## [Has\_one through with new record](https://www.ruby-forum.com/t/has-one-through-with-new-record/160675)

<div class="topic-metadata">

**Author:** [@Tobias\_Schneider](https://www.ruby-forum.com/u/Tobias_Schneider)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/has-one-through-with-new-record/160675 "2009-02-18T18:49:02Z")

</div>

I need to set a has\_one through association to an unsaved record. In my code – class JobPositionPosting \< ActiveRecord::Base has\_one :job\_position\_posting\_hiring\_org has\_one :hiring\_org, :through =\> :job\_position\_po…

---

## [Question about belongs\_to](https://www.ruby-forum.com/t/question-about-belongs-to/160667)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/question-about-belongs-to/160667 "2009-02-18T17:56:30Z")

</div>

Hello guys, I am trying to create a belongs\_to relation between 2 tables. table users id login . table apps id admin . . I need to create a belongs\_to relation on the App model. The admin column in apps refer…

---

## [Dynamically generate fields in view](https://www.ruby-forum.com/t/dynamically-generate-fields-in-view/160659)

<div class="topic-metadata">

**Author:** [@mpathare](https://www.ruby-forum.com/u/mpathare)\
**Replies:** 3\
**Last updated:** [February 18, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/dynamically-generate-fields-in-view/160659 "2009-02-18T17:38:13Z")

</div>

Hello, what would be the best way to solve this? I have a view where I want users to be able to enter the score of a tennis match. The number of sets to be played is determined from a column in a database table. Each…

---

## [Check if controller action?](https://www.ruby-forum.com/t/check-if-controller-action/160644)

<div class="topic-metadata">

**Author:** [@rsm](https://www.ruby-forum.com/u/rsm)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 5:02pm UTC](https://www.ruby-forum.com/t/check-if-controller-action/160644 "2009-02-18T17:02:48Z")

</div>

Hi Chaps, How can I check if the page is using a controllers action. for example i got a helper method that needs to know if a certain controller action is run on the page or not so as to display different content for…

---

## [Validates\_inclusion\_of using model association?](https://www.ruby-forum.com/t/validates-inclusion-of-using-model-association/160662)

<div class="topic-metadata">

**Author:** [@wet](https://www.ruby-forum.com/u/wet)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 4:51pm UTC](https://www.ruby-forum.com/t/validates-inclusion-of-using-model-association/160662 "2009-02-18T16:51:04Z")

</div>

Hi I have three models: class Product \< ActiveRecord::Base has\_many :coupons has\_many :orders end class Coupon \< ActiveRecord::Base belongs\_to :product end class Order \< ActiveRecord::Base belongs\_to :product …

---

## [Editing multiple records at once](https://www.ruby-forum.com/t/editing-multiple-records-at-once/160642)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 4:34pm UTC](https://www.ruby-forum.com/t/editing-multiple-records-at-once/160642 "2009-02-18T16:34:56Z")

</div>

I want to be able to change a property on multiple records in my app. I thought about adding a checkbox so that one can pick which records to update. The question is how to implement the actual update - if the checkbo…

---

## [Rails erb in inline CSS(in layout file)](https://www.ruby-forum.com/t/rails-erb-in-inline-css-in-layout-file/160663)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 4\
**Last updated:** [February 18, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/rails-erb-in-inline-css-in-layout-file/160663 "2009-02-18T16:30:18Z")

</div>

Hi, How can we call rails erb tag in inline CSS app/layouts/base\_layout.rhtml: \<body\> \<style\> #header { background: url(http://www.google.ca/intl/en\_in/images/logo.gif) no-repeat; } I want to…

---

## [Rails Application vs AXIS Web Service(API)](https://www.ruby-forum.com/t/rails-application-vs-axis-web-service-api/160622)

<div class="topic-metadata">

**Author:** [@stevenreplica](https://www.ruby-forum.com/u/stevenreplica)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 3:57pm UTC](https://www.ruby-forum.com/t/rails-application-vs-axis-web-service-api/160622 "2009-02-18T15:57:42Z")

</div>

Guys, I want to integrate my Rails application with another web application that has a Web services - AXIS. is there anyone who has an idea how to do this? Thank you

---

## [Form to create multiple models](https://www.ruby-forum.com/t/form-to-create-multiple-models/160657)

<div class="topic-metadata">

**Author:** [@diarmuid](https://www.ruby-forum.com/u/diarmuid)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/form-to-create-multiple-models/160657 "2009-02-18T14:55:19Z")

</div>

Hi I’m a RoR beginner so excuse any potential stupid questions. I have 3 models in an attempt to model the following I have a Dayworkout which is a workout for one days workout (day of the week independent) Weekwork…

---

## [Model inheritance](https://www.ruby-forum.com/t/model-inheritance/160653)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/model-inheritance/160653 "2009-02-18T14:46:23Z")

</div>

Hi all, When I have class User :has\_many :events end class Event :belongs\_to :user end class Game \< Event end Why Can’t I do: user = User.find(1) user.games.build(params\[:game\]) I need to add to class Game \<…

---

## [Fields\_for and Conflicting types for parameter containers. Expected an instance of Hash but found a](https://www.ruby-forum.com/t/fields-for-and-conflicting-types-for-parameter-containers-expected-an-instance-of-hash-but-found-a/160619)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/fields-for-and-conflicting-types-for-parameter-containers-expected-an-instance-of-hash-but-found-a/160619 "2009-02-18T14:44:37Z")

</div>

I’m trying to use ‘fields\_for’ in a form. I want the same form to support both the creation of new obejcts as well as the editing of old ones. So - in my controller, sometimes I will pass to the form an object that al…

---

## [Masking sub-domain in routes?](https://www.ruby-forum.com/t/masking-sub-domain-in-routes/160648)

<div class="topic-metadata">

**Author:** [@ressister](https://www.ruby-forum.com/u/ressister)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 2:36pm UTC](https://www.ruby-forum.com/t/masking-sub-domain-in-routes/160648 "2009-02-18T14:36:54Z")

</div>

I have a rails app and a Mephisto CMS instance running on the same server. Currently I use the CMS to manage help articles related to the application. Mephisto runs on a sub-domain of the main domain, think articles.…

---

## [Screenshot of working desktop](https://www.ruby-forum.com/t/screenshot-of-working-desktop/160646)

<div class="topic-metadata">

**Author:** [@Christian\_WattengSS](https://www.ruby-forum.com/u/Christian_WattengSS)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/screenshot-of-working-desktop/160646 "2009-02-18T14:23:56Z")

</div>

This may exist somewhere, but I didn’t find any when searching. Does anyone have a screenshot of what their desktop(s) look like when developing in RoR? :slight\_smile: Christian…

---

## [Link\_to\_remote invoke javascript](https://www.ruby-forum.com/t/link-to-remote-invoke-javascript/160645)

<div class="topic-metadata">

**Author:** [@wfspoet](https://www.ruby-forum.com/u/wfspoet)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/link-to-remote-invoke-javascript/160645 "2009-02-18T14:00:46Z")

</div>

link\_to\_remote involves javascript already. What can I do to invoke an action with the link\_to\_remote when the javascript disabled.

---

## [Like conditions on associated tables (nested selects)](https://www.ruby-forum.com/t/like-conditions-on-associated-tables-nested-selects/160534)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 1:21pm UTC](https://www.ruby-forum.com/t/like-conditions-on-associated-tables-nested-selects/160534 "2009-02-18T13:21:11Z")

</div>

I’m trying to use the :conditions option on the activerecord find. For a simple query such as “SELECT \* FROM products WHERE name LIKE ‘%#{name}%’” it’s obviously :conditions =\> \[“name LIKE ?”, “’%#{name}%’”\] However,…

---

## [Personalized URL -- route.rb](https://www.ruby-forum.com/t/personalized-url-route-rb/160546)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 6\
**Last updated:** [February 18, 2009, 1:13pm UTC](https://www.ruby-forum.com/t/personalized-url-route-rb/160546 "2009-02-18T13:13:05Z")

</div>

Hello Friends, I want to configure personalized url for e.g. - http://localhost:3000/xyzhere xyz is a database value. Now for the same i have implemented the following syntax inside my route.rb file map.url ‘/:name’…

---

## [Email link not working](https://www.ruby-forum.com/t/email-link-not-working/160634)

<div class="topic-metadata">

**Author:** [@Shockmeister](https://www.ruby-forum.com/u/Shockmeister)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 12:31pm UTC](https://www.ruby-forum.com/t/email-link-not-working/160634 "2009-02-18T12:31:56Z")

</div>

Hi all, I’ve integrated a “reset password” facility on the site I’m developing allowing the user to reset their password if they forget it. The problem I am having is that the link to the reset page is not showing up…

---

## [Can Anybody Tell How to do Google Map Mashup?](https://www.ruby-forum.com/t/can-anybody-tell-how-to-do-google-map-mashup/160450)

<div class="topic-metadata">

**Author:** [@VrishaliSS](https://www.ruby-forum.com/u/VrishaliSS)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 11:50am UTC](https://www.ruby-forum.com/t/can-anybody-tell-how-to-do-google-map-mashup/160450 "2009-02-18T11:50:13Z")

</div>

Hi!!! I am using rails 2.2.2 , n want to mashup google map with mysql 5.0 database, can anybody please tell me this step by step??? Thanks!!!

---

## [Salted hash login generator](https://www.ruby-forum.com/t/salted-hash-login-generator/160566)

<div class="topic-metadata">

**Author:** [@brunopires](https://www.ruby-forum.com/u/brunopires)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 11:35am UTC](https://www.ruby-forum.com/t/salted-hash-login-generator/160566 "2009-02-18T11:35:28Z")

</div>

Hello all. Has anyone managed to use SaltedHashLoginGenerator with Rails 2.2.2? I’ve been following the simple steps on the README file. When I run script/generate salted\_login User Localization a /config/environmen…

---

## [Stuffing - A plugin to use CouchDB with ActiveRecord models](https://www.ruby-forum.com/t/stuffing-a-plugin-to-use-couchdb-with-activerecord-models/160638)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 11:31am UTC](https://www.ruby-forum.com/t/stuffing-a-plugin-to-use-couchdb-with-activerecord-models/160638 "2009-02-18T11:31:58Z")

</div>

Hey, Just a heads up on anyone wanting a quick way to start playing with CouchDB (http://couchdb.apache.org/) and Rails without leaving the comfort of ActiveRecord. Stuffing is a Rails plugin that I wrote to let you …

---

## [Upload multiple file with progress](https://www.ruby-forum.com/t/upload-multiple-file-with-progress/160637)

<div class="topic-metadata">

**Author:** [@venki](https://www.ruby-forum.com/u/venki)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 11:31am UTC](https://www.ruby-forum.com/t/upload-multiple-file-with-progress/160637 "2009-02-18T11:31:58Z")

</div>

How to upload multiple file with progress Bar using Ajax in Ruby on Rails

---

## [Pass a global variable from a partial from javascript](https://www.ruby-forum.com/t/pass-a-global-variable-from-a-partial-from-javascript/160606)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 9:39am UTC](https://www.ruby-forum.com/t/pass-a-global-variable-from-a-partial-from-javascript/160606 "2009-02-18T09:39:16Z")

</div>

I have a situation that I am not sure how to approach. I have a global variable @date which gets loaded in an ajax action: def calendar\_ajax @date = Time.parse("#{params\[:date\]} || Time.now.utc") This @date is used …

---

## [Restful S3 Explorer](https://www.ruby-forum.com/t/restful-s3-explorer/160629)

<div class="topic-metadata">

**Author:** [@manuel](https://www.ruby-forum.com/u/manuel)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 9:39am UTC](https://www.ruby-forum.com/t/restful-s3-explorer/160629 "2009-02-18T09:39:16Z")

</div>

Hi everyone, I’m working on a S3 Bucket Explorer. My problem is the identifier of a S3 Object, it’s a key like this: “Butterfly.wmv” or even “something/else.pdf” Now i try to make this restful, but the key confuses t…

---

## [E commece website](https://www.ruby-forum.com/t/e-commece-website/160584)

<div class="topic-metadata">

**Author:** [@lox323](https://www.ruby-forum.com/u/lox323)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 9:26am UTC](https://www.ruby-forum.com/t/e-commece-website/160584 "2009-02-18T09:26:17Z")

</div>

I just started on ruby on rails and i was asked by my supervisor to create a ecommerce website using ruby on rails. I have planned how the website is to be like. It will be like an ebay process but with no bidding and…

---

## [How to sort select tag options?](https://www.ruby-forum.com/t/how-to-sort-select-tag-options/160621)

<div class="topic-metadata">

**Author:** [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 8:42am UTC](https://www.ruby-forum.com/t/how-to-sort-select-tag-options/160621 "2009-02-18T08:42:56Z")

</div>

Hi, I have a select tag as : \<%= select(:feedbacks, :directedto , {"----Select One----"=\>“none”,“Business contact”=\>“Business Contact”,“Technical support”=\>“Technical Support”,“Payment Help”=\>“Payment Help”},{ :sele…

---

## [Foxy Fixtures making inconsistent ids](https://www.ruby-forum.com/t/foxy-fixtures-making-inconsistent-ids/160520)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 8:22am UTC](https://www.ruby-forum.com/t/foxy-fixtures-making-inconsistent-ids/160520 "2009-02-18T08:22:16Z")

</div>

I’m trying to set up some new unit tests for classes I’m adding to a project. Since I’m on Rails 2.1, I figured I’d make use of the Foxy Fixtures to make things oh so much easier. Except that’s not the way my day has …

---

## [user\_url(userId) view method in Rails2.2](https://www.ruby-forum.com/t/user-url-userid-view-method-in-rails2-2/160620)

<div class="topic-metadata">

**Author:** [@kumar\_a](https://www.ruby-forum.com/u/kumar_a)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 7:00am UTC](https://www.ruby-forum.com/t/user-url-userid-view-method-in-rails2-2/160620 "2009-02-18T07:00:46Z")

</div>

Hi, Previously, I worked using Rails-1.2.3 version. Present, I am using Rails 2.2. I have used command to generate scaffold. In scaffold generation, ‘users\_controller.rb’, ‘user.rb’ files were generated automaticall…

---

## [Interpolation](https://www.ruby-forum.com/t/interpolation/160612)

<div class="topic-metadata">

**Author:** [@northband](https://www.ruby-forum.com/u/northband)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 6:27am UTC](https://www.ruby-forum.com/t/interpolation/160612 "2009-02-18T06:27:32Z")

</div>

Hi - I am adding a series of records within a for loop using i as my counter. Rather than hard code the model attributes I would like to dynamically create them. Here’s what I’m trying to do: I have several fields …

---

## [Rails Helper](https://www.ruby-forum.com/t/rails-helper/160608)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 5:52am UTC](https://www.ruby-forum.com/t/rails-helper/160608 "2009-02-18T05:52:24Z")

</div>

hi… this is html generated code. image #1 is it possible to use Rails code instead of the above one. if possible to use Rails helper means which would generate html code like above

---

## [How to clear javascript cache on server](https://www.ruby-forum.com/t/how-to-clear-javascript-cache-on-server/160595)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 3:55am UTC](https://www.ruby-forum.com/t/how-to-clear-javascript-cache-on-server/160595 "2009-02-18T03:55:56Z")

</div>

I just updated one of my javascript libraries and restarted the thin server but I can see the old javascript file is still being cached somehow. How can I fix this? I cleared my local cache as well but it is still pu…

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

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