# Rails

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

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

---

## [Default\_scope and scoped\_methods in 2.2.2?](https://www.ruby-forum.com/t/default-scope-and-scoped-methods-in-2-2-2/174566)

<div class="topic-metadata">

**Author:** [@throwern](https://www.ruby-forum.com/u/throwern)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 7:53pm UTC](https://www.ruby-forum.com/t/default-scope-and-scoped-methods-in-2-2-2/174566 "2009-08-28T19:53:33Z")

</div>

I am running rails 2.2.2 and cannot upgrade to 2.3 at this time. However, I would like to use a default\_scope and so I have installed the default\_scope plugin. This works great for standard AR classes but does not car…

---

## [Instance variables added in rails helpers are not available](https://www.ruby-forum.com/t/instance-variables-added-in-rails-helpers-are-not-available/174556)

<div class="topic-metadata">

**Author:** [@satynos](https://www.ruby-forum.com/u/satynos)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/instance-variables-added-in-rails-helpers-are-not-available/174556 "2009-08-28T17:13:16Z")

</div>

I am trying to add some instance variables in helpers like the following: module ApplicationHelper def title=(title) @title = title end def title @title end end and when I assign title in views/pages/index.html…

---

## [Rake db:test:clone\_structure and related tasks fail](https://www.ruby-forum.com/t/rake-dbclone-structure-and-related-tasks-fail/174514)

<div class="topic-metadata">

**Author:** [@tomuhs](https://www.ruby-forum.com/u/tomuhs)\
**Replies:** 3\
**Last updated:** [August 28, 2009, 4:51pm UTC](https://www.ruby-forum.com/t/rake-dbclone-structure-and-related-tasks-fail/174514 "2009-08-28T16:51:27Z")

</div>

Judging by the exception’s location, the test environment config is not getting loaded. Do I need to do something else to activate this environment? 341 case abcs\[“test”\]\[“adapter”\] 342 when “mysql” 343 …

---

## [Sum won't seem to add the fields?!](https://www.ruby-forum.com/t/sum-wont-seem-to-add-the-fields/174461)

<div class="topic-metadata">

**Author:** [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Replies:** 5\
**Last updated:** [August 28, 2009, 4:44pm UTC](https://www.ruby-forum.com/t/sum-wont-seem-to-add-the-fields/174461 "2009-08-28T16:44:25Z")

</div>

I have the code which creates the following made up of an array of 3 TreatLists each with a number of Treatlistitems (I’ve broken it up to make it easier to read). ?\> @breakdown =\> \[ #\<Treatlist:0x23b98ac @items=\[ …

---

## [Gauge](https://www.ruby-forum.com/t/gauge/69052)

<div class="topic-metadata">

**Author:** [@cole.jeff](https://www.ruby-forum.com/u/cole.jeff)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 4:42pm UTC](https://www.ruby-forum.com/t/gauge/69052 "2009-08-28T16:42:40Z")

</div>

I would love to have some performance monitoring for my production site. Does anyone know what the status of gauge is? I’ve downloaded the subversion repository for it. Is it possible to somehow deploy it in what…

---

## [Open flash chart](https://www.ruby-forum.com/t/open-flash-chart/174332)

<div class="topic-metadata">

**Author:** [@seja](https://www.ruby-forum.com/u/seja)\
**Replies:** 3\
**Last updated:** [August 28, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/open-flash-chart/174332 "2009-08-28T15:40:02Z")

</div>

Hi, I am very much impressed with open flash chart, but when i try to use in rails 1.2.3… I am getting blank page instead of the flash graph. Any one fixed or faces this error. If any one having suggestion for graph…

---

## [A resource named "image" gives problems](https://www.ruby-forum.com/t/a-resource-named-image-gives-problems/174545)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 1\
**Last updated:** [August 28, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/a-resource-named-image-gives-problems/174545 "2009-08-28T15:33:10Z")

</div>

Hi. I can’t be the only one in the world having the wonderful idea to have a resource named “image”. I have a controller named images\_controller I have a route named “image”, and therefore a helper called image\_path…

---

## [How to insert value to the extra field in join model](https://www.ruby-forum.com/t/how-to-insert-value-to-the-extra-field-in-join-model/174547)

<div class="topic-metadata">

**Author:** [@akramwasim1234](https://www.ruby-forum.com/u/akramwasim1234)\
**Replies:** 1\
**Last updated:** [August 28, 2009, 3:28pm UTC](https://www.ruby-forum.com/t/how-to-insert-value-to-the-extra-field-in-join-model/174547 "2009-08-28T15:28:53Z")

</div>

hi all, consider that I’m having 3 models 1)user 2)doc 3)udoc user model=\>(id,name) has\_many:udocs has\_many:docs ,through:udocs doc Model=\>(id,name) has\_many:udocs has\_many:users ,through:udocs udoc Model=\>(id…

---

## [SWF multiple file upload](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529)

<div class="topic-metadata">

**Author:** [@mahesh](https://www.ruby-forum.com/u/mahesh)\
**Replies:** 5\
**Last updated:** [August 28, 2009, 1:00pm UTC](https://www.ruby-forum.com/t/swf-multiple-file-upload/174529 "2009-08-28T13:00:48Z")

</div>

Hi guys Im new to rails i would like to create app with swf file upload with multiple file upload, is that any sample app is available with multiple file uploads plz give me some reference for me Ur’s Mahesh

---

## [How to run rake thinking\_sphinx:index in test environment?](https://www.ruby-forum.com/t/how-to-run-rake-thinking-sphinx-index-in-test-environment/174543)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/how-to-run-rake-thinking-sphinx-index-in-test-environment/174543 "2009-08-28T12:42:21Z")

</div>

Hi, I tried ‘rake thinking\_sphinx:index RAILS\_ENV=test’ but it throws following error F:\\test\_sarasaves\\sarasaves\>rake thinking\_sphinx:index RAILS\_ENV=test (in F:/test\_sarasaves/sarasaves) Generating Configuration t…

---

## [No route matches "/%20questions/showans/1" with {:method=\>:g](https://www.ruby-forum.com/t/no-route-matches-20questions-showans-1-with-method-g/174531)

<div class="topic-metadata">

**Author:** [@salman](https://www.ruby-forum.com/u/salman)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 11:49am UTC](https://www.ruby-forum.com/t/no-route-matches-20questions-showans-1-with-method-g/174531 "2009-08-28T11:49:58Z")

</div>

Hi i face this problem when i submit the information while evaluating the a new page in a already done scaffold…the new page is “showans”…i write the link\_to tag like this " \<%= link\_to ‘Submit’, :controller =\> " que…

---

## [Authorize.net CIM(Customer Information Manager)](https://www.ruby-forum.com/t/authorize-net-cim-customer-information-manager/174530)

<div class="topic-metadata">

**Author:** [@ghanshyam\_6786](https://www.ruby-forum.com/u/ghanshyam_6786)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 10:47am UTC](https://www.ruby-forum.com/t/authorize-net-cim-customer-information-manager/174530 "2009-08-28T10:47:20Z")

</div>

Hi all, Please help me out for authorize.net CIM(customer information manager) implementation. thanks

---

## [Setting @request.env\["HTTP\_REFERER"\] in an integration test](https://www.ruby-forum.com/t/setting-request-env-http-referer-in-an-integration-test/174491)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 10:18am UTC](https://www.ruby-forum.com/t/setting-request-env-http-referer-in-an-integration-test/174491 "2009-08-28T10:18:03Z")

</div>

Hi. I would like to set @request.env\[“HTTP\_REFERER”\] in an integration test, but due to its nature, I would naturally set this value to the previousle request url. How do I do that. Thanks. Jarl

---

## [Asserting PUT methods](https://www.ruby-forum.com/t/asserting-put-methods/174489)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 10:12am UTC](https://www.ruby-forum.com/t/asserting-put-methods/174489 "2009-08-28T10:12:12Z")

</div>

Hi. In my view I have a line like this: link\_to(‘Update timestamp’, order\_path(@order, :update\_timestamp =\> true), :method =\> :put This generates HTML like this Update timestamp Basically it creates a normal link, …

---

## [Has\_and\_belongs\_to\_many with default](https://www.ruby-forum.com/t/has-and-belongs-to-many-with-default/174532)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 9:43am UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-with-default/174532 "2009-08-28T09:43:42Z")

</div>

hi, i have used a relaction has\_and\_belongs\_to\_many to implementing a backoffice where the customer settings categories and products: the products can have multiple categories, it selet them with a combobox. Now the …

---

## [Date precedence validation (ex. Round Trip travel dates)](https://www.ruby-forum.com/t/date-precedence-validation-ex-round-trip-travel-dates/174512)

<div class="topic-metadata">

**Author:** [@Axinte\_L](https://www.ruby-forum.com/u/Axinte_L)\
**Replies:** 3\
**Last updated:** [August 28, 2009, 9:39am UTC](https://www.ruby-forum.com/t/date-precedence-validation-ex-round-trip-travel-dates/174512 "2009-08-28T09:39:31Z")

</div>

Hello, I’m trying to validate 2 dates that were provided by the user using a form that wraps a model. I want to do the following 2 validations in the model: \*\*\*\* validate the date format =\> That I know how to do! …

---

## [How to connect to Tandem SQL/MX database from ruby on rails](https://www.ruby-forum.com/t/how-to-connect-to-tandem-sql-mx-database-from-ruby-on-rails/174533)

<div class="topic-metadata">

**Author:** [@saravanan](https://www.ruby-forum.com/u/saravanan)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 9:35am UTC](https://www.ruby-forum.com/t/how-to-connect-to-tandem-sql-mx-database-from-ruby-on-rails/174533 "2009-08-28T09:35:19Z")

</div>

How to connect to Tandem SQL/MX database from ruby on rails? Is there any driver available ? Please reply asap Regards, Saravanan A

---

## [Alert box before Redirecting](https://www.ruby-forum.com/t/alert-box-before-redirecting/174528)

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 8:47am UTC](https://www.ruby-forum.com/t/alert-box-before-redirecting/174528 "2009-08-28T08:47:22Z")

</div>

Hi all I have a form.On filling the details and clicking submit,i would like to pop up an alert box if the form was saved successfully before redirecting to the entry’s show page. Kindly Help.

---

## [How to Generate Tags from Description (input)?](https://www.ruby-forum.com/t/how-to-generate-tags-from-description-input/174497)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 3\
**Last updated:** [August 28, 2009, 4:04am UTC](https://www.ruby-forum.com/t/how-to-generate-tags-from-description-input/174497 "2009-08-28T04:04:37Z")

</div>

My users provide some description ( TEXT field) and I would like to generate tags automatically from them? are there any plugins available?. Any directions would be appreciated. cheers

---

## [Best approach to providing app congurations?](https://www.ruby-forum.com/t/best-approach-to-providing-app-congurations/174471)

<div class="topic-metadata">

**Author:** [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Replies:** 2\
**Last updated:** [August 28, 2009, 3:51am UTC](https://www.ruby-forum.com/t/best-approach-to-providing-app-congurations/174471 "2009-08-28T03:51:35Z")

</div>

This is more about theory than coding so I hope I have the right place. I would very much appreciate some input as to the best approach on how to offer different options in my app depending on configuration criteria a…

---

## [JQuery + Rails problem retreiving JSON](https://www.ruby-forum.com/t/jquery-rails-problem-retreiving-json/174522)

<div class="topic-metadata">

**Author:** [@lpdahito](https://www.ruby-forum.com/u/lpdahito)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 2:28am UTC](https://www.ruby-forum.com/t/jquery-rails-problem-retreiving-json/174522 "2009-08-28T02:28:37Z")

</div>

Hi guys, I have a problem retrieving data in JSON format using Ajax with JQuery. Here’s the code I use: /app/controllers/stories\_controller.rb: def index @stories = Story.all respond\_to do |format| format.html #…

---

## [Problem with links](https://www.ruby-forum.com/t/problem-with-links/174509)

<div class="topic-metadata">

**Author:** [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Replies:** 5\
**Last updated:** [August 28, 2009, 2:16am UTC](https://www.ruby-forum.com/t/problem-with-links/174509 "2009-08-28T02:16:55Z")

</div>

Hello all… I am on Chapter 4 of RailsSpace and I have hit a problem when it comes to linking in the document. To start with in an earlier chapter I created a page called site.rhtml which used these attributes: \<%= l…

---

## [Mbleigh / acts-as-taggable-on migration error for MySQL](https://www.ruby-forum.com/t/mbleigh-acts-as-taggable-on-migration-error-for-mysql/174521)

<div class="topic-metadata">

**Author:** [@Pavan\_Kulkarni](https://www.ruby-forum.com/u/Pavan_Kulkarni)\
**Replies:** 0\
**Last updated:** [August 28, 2009, 1:16am UTC](https://www.ruby-forum.com/t/mbleigh-acts-as-taggable-on-migration-error-for-mysql/174521 "2009-08-28T01:16:36Z")

</div>

Hi, I installed acts-as-taggable-on plugin and generated acts\_as\_taggable\_on\_migration (Mac OS X, Rails 2.3.3, MySQL). The migration generated has t.column :taggable\_id, :integer t.column :tagger\_id, :integer MySQL…

---

## [How to stop a user submitting the same data more than once](https://www.ruby-forum.com/t/how-to-stop-a-user-submitting-the-same-data-more-than-once/174417)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 27\
**Last updated:** [August 28, 2009, 12:44am UTC](https://www.ruby-forum.com/t/how-to-stop-a-user-submitting-the-same-data-more-than-once/174417 "2009-08-28T00:44:59Z")

</div>

I have a standard form built with rails, which a user to my site can use to submit data. Unfortunately one user just managed to submit exactly the the same data three times in a row. From the server logs it seems as t…

---

## [How to refactor the following 2 function (4 lines each)](https://www.ruby-forum.com/t/how-to-refactor-the-following-2-function-4-lines-each/174493)

<div class="topic-metadata">

**Author:** [@Axinte\_L](https://www.ruby-forum.com/u/Axinte_L)\
**Replies:** 6\
**Last updated:** [August 28, 2009, 12:05am UTC](https://www.ruby-forum.com/t/how-to-refactor-the-following-2-function-4-lines-each/174493 "2009-08-28T00:05:10Z")

</div>

Hello I’m trying to DRY my code and I think It could be done even better. The following 2 functions are “before\_save” callbacks that practically do the same thing, but on a different set of attributes. Since the cod…

---

## [Redirect to domain from subdomain](https://www.ruby-forum.com/t/redirect-to-domain-from-subdomain/174291)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 6\
**Last updated:** [August 27, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/redirect-to-domain-from-subdomain/174291 "2009-08-27T23:38:13Z")

</div>

Hello Friends, Just wanted to know how can i execute the following task My requirement is Let say the main domain is www.maindomain.com And a subdomain is e.g. xyz.maindomain.com and Every subdomain have a correspo…

---

## [HAML/SASS Auto Updater for $2](https://www.ruby-forum.com/t/haml-sass-auto-updater-for-2/174516)

<div class="topic-metadata">

**Author:** [@lazukars](https://www.ruby-forum.com/u/lazukars)\
**Replies:** 0\
**Last updated:** [August 27, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/haml-sass-auto-updater-for-2/174516 "2009-08-27T23:31:33Z")

</div>

The recession has hit my family hard, so I’ve decided to sell an application that I use quite often when designing websites. Screenshot: http://img195.imageshack.us/img195/5440/screenshotisl.png With this application,…

---

## [Do a set of records have the same value for one of the fields?](https://www.ruby-forum.com/t/do-a-set-of-records-have-the-same-value-for-one-of-the-fields/174495)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 2\
**Last updated:** [August 27, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/do-a-set-of-records-have-the-same-value-for-one-of-the-fields/174495 "2009-08-27T23:07:47Z")

</div>

Hi Folks, I’m looking for an elegant Ruby one-liner… I have a set of records in my database that I want to check to see if the :description field is identical. And, because it’s Thursday morning (where I live), I wou…

---

## [Partials in innerHTML?](https://www.ruby-forum.com/t/partials-in-innerhtml/174510)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 0\
**Last updated:** [August 27, 2009, 9:59pm UTC](https://www.ruby-forum.com/t/partials-in-innerhtml/174510 "2009-08-27T21:59:18Z")

</div>

I have a set of javascript functions that are reading json data periodically to create innerHTML in a view. Within that innerHTML, I need to put form(s) based on the structure and content of a row in a table. I am thi…

---

## [Any plugin for admin related tasks](https://www.ruby-forum.com/t/any-plugin-for-admin-related-tasks/174507)

<div class="topic-metadata">

**Author:** [@rubala](https://www.ruby-forum.com/u/rubala)\
**Replies:** 0\
**Last updated:** [August 27, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/any-plugin-for-admin-related-tasks/174507 "2009-08-27T21:42:02Z")

</div>

I am creating a web app with ruby on rails. I have a user account database and looking for any plugin that i can use to do standard admin tasks like. scrubbing the database to look for expiring accounts and send not…

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

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