# Rails

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

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

---

## [I guess my configurations is fabar?](https://www.ruby-forum.com/t/i-guess-my-configurations-is-fabar/169525)

<div class="topic-metadata">

**Author:** [@rickm](https://www.ruby-forum.com/u/rickm)\
**Replies:** 4\
**Last updated:** [June 5, 2009, 3:43pm UTC](https://www.ruby-forum.com/t/i-guess-my-configurations-is-fabar/169525 "2009-06-05T15:43:13Z")

</div>

I am trying to put my development env on a new Ubuntu box. I use NetBeans as my IDE. When I attempt to launch the initial migration I get the following error: rake aborted! no such file to load – net/https Since I h…

---

## [How to send commission to affiliates at time of Renewal](https://www.ruby-forum.com/t/how-to-send-commission-to-affiliates-at-time-of-renewal/169575)

<div class="topic-metadata">

**Author:** [@ravikanth](https://www.ruby-forum.com/u/ravikanth)\
**Replies:** 0\
**Last updated:** [June 5, 2009, 2:27pm UTC](https://www.ruby-forum.com/t/how-to-send-commission-to-affiliates-at-time-of-renewal/169575 "2009-06-05T14:27:59Z")

</div>

Hi For renewal of the account i use crontab to execute renewal\_auto\_monthly\_transaction.rake file which make auto renewal for every 30 days billing cycle. My problem is for every renewal of the account means the amou…

---

## [Constant already initialized](https://www.ruby-forum.com/t/constant-already-initialized/169572)

<div class="topic-metadata">

**Author:** [@adrian](https://www.ruby-forum.com/u/adrian)\
**Replies:** 11\
**Last updated:** [June 5, 2009, 12:56pm UTC](https://www.ruby-forum.com/t/constant-already-initialized/169572 "2009-06-05T12:56:56Z")

</div>

Hi I’ve used a number of constants within my models to avoid magic numbers: class Order \< ActiveRecord::Base #snip DAYS\_ALLOWED\_FOR\_CHANGE = 2 DAYS\_PER\_WEEK = 7 #snip end However when running tests or starting t…

---

## [How do make the page refresh into the same position of the page previously?](https://www.ruby-forum.com/t/how-do-make-the-page-refresh-into-the-same-position-of-the-page-previously/169522)

<div class="topic-metadata">

**Author:** [@liyu](https://www.ruby-forum.com/u/liyu)\
**Replies:** 4\
**Last updated:** [June 5, 2009, 12:27pm UTC](https://www.ruby-forum.com/t/how-do-make-the-page-refresh-into-the-same-position-of-the-page-previously/169522 "2009-06-05T12:27:33Z")

</div>

I often have to save, delete, or update records. That could be a very long list, or multi pages. How can I come back to the same position I was before the page refresh? Thank you very much! suki

---

## [Reg Expression Help Please?](https://www.ruby-forum.com/t/reg-expression-help-please/166810)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 8\
**Last updated:** [June 5, 2009, 11:42am UTC](https://www.ruby-forum.com/t/reg-expression-help-please/166810 "2009-06-05T11:42:22Z")

</div>

Hi all I’m having a bit of trouble trying to acheive something, maybe someone can help? I have a model Article, which has an attribute ‘body’ The body is a text column in which people can add text and HTML. I’d like…

---

## [Nested params controller verification](https://www.ruby-forum.com/t/nested-params-controller-verification/169567)

<div class="topic-metadata">

**Author:** [@dimkaspb](https://www.ruby-forum.com/u/dimkaspb)\
**Replies:** 0\
**Last updated:** [June 5, 2009, 11:31am UTC](https://www.ruby-forum.com/t/nested-params-controller-verification/169567 "2009-06-05T11:31:47Z")

</div>

Is it possible to verify nested params in controller somehow, like: class SomeController \< ApplicationController verify :params =\> {:user =\> :login} end Thanks

---

## [Inner SELECT-s in Rails](https://www.ruby-forum.com/t/inner-select-s-in-rails/98723)

<div class="topic-metadata">

**Author:** [@roland](https://www.ruby-forum.com/u/roland)\
**Replies:** 4\
**Last updated:** [June 5, 2009, 11:28am UTC](https://www.ruby-forum.com/t/inner-select-s-in-rails/98723 "2009-06-05T11:28:48Z")

</div>

Is there a proper way of doing inner selects in rails. Basically, I run in issues where I need the count of a query and end up using find\_by\_sql. I was wondering if there was any elegant way of doing such queries. Ro…

---

## [Complex Association - Please help](https://www.ruby-forum.com/t/complex-association-please-help/169564)

<div class="topic-metadata">

**Author:** [@Hirak](https://www.ruby-forum.com/u/Hirak)\
**Replies:** 2\
**Last updated:** [June 5, 2009, 11:08am UTC](https://www.ruby-forum.com/t/complex-association-please-help/169564 "2009-06-05T11:08:11Z")

</div>

Hi All, I am a newbie in rails. I am creating a new rails application. Here I have 4 models. User Item Application Tag The concept is Item belongs to User Item has many Tags Item has many application through tags T…

---

## [Internal plugin architecture, where to start from](https://www.ruby-forum.com/t/internal-plugin-architecture-where-to-start-from/169566)

<div class="topic-metadata">

**Author:** [@nutsmuggler](https://www.ruby-forum.com/u/nutsmuggler)\
**Replies:** 0\
**Last updated:** [June 5, 2009, 11:01am UTC](https://www.ruby-forum.com/t/internal-plugin-architecture-where-to-start-from/169566 "2009-06-05T11:01:04Z")

</div>

Hello folks. I am refactoring a simple CMS, and looking to implement a simple internal plugin architecture. I have a MenuItem class. By default, menu items can be, say, ‘article’ or ‘sitemap’, or ‘newsroll’. I want t…

---

## [How to know the current weekday?](https://www.ruby-forum.com/t/how-to-know-the-current-weekday/169555)

<div class="topic-metadata">

**Author:** [@jnxgn](https://www.ruby-forum.com/u/jnxgn)\
**Replies:** 3\
**Last updated:** [June 5, 2009, 10:54am UTC](https://www.ruby-forum.com/t/how-to-know-the-current-weekday/169555 "2009-06-05T10:54:02Z")

</div>

I failed to find what is the weekday by following codes: timetoday = Time.now if timetoday =~ /Fri/ puts “Friday” end Please help to analysis what is the probleme$B!#e(B puts timetoday It will display: Fri Jun \*\*\*…

---

## [HELP attr\_accessor](https://www.ruby-forum.com/t/help-attr-accessor/169493)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 8\
**Last updated:** [June 5, 2009, 10:45am UTC](https://www.ruby-forum.com/t/help-attr-accessor/169493 "2009-06-05T10:45:10Z")

</div>

Hi… I use non modal attribute for companyinfo modal… For that i have created like below attr\_accessor :std\_code To validate that field i included the below code in to my companyinfo modal. validates\_presence\_of :st…

---

## [Find :include broken when upgrading to 2.2.2](https://www.ruby-forum.com/t/find-include-broken-when-upgrading-to-2-2-2/169499)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 2\
**Last updated:** [June 5, 2009, 10:40am UTC](https://www.ruby-forum.com/t/find-include-broken-when-upgrading-to-2-2-2/169499 "2009-06-05T10:40:42Z")

</div>

Hi, I’m upgrading an old 1.2 application to latest 2.2 and I got an error which is certainly due to :include @factures = Facture.find(:all, :include =\> \[\[:forfait =\> :vehicule\] =\> :client\], :conditions =\> \[“MONTH(fact…

---

## [How to add up an array's element with a rails way?](https://www.ruby-forum.com/t/how-to-add-up-an-arrays-element-with-a-rails-way/169558)

<div class="topic-metadata">

**Author:** [@Kevin\_Fu](https://www.ruby-forum.com/u/Kevin_Fu)\
**Replies:** 2\
**Last updated:** [June 5, 2009, 9:53am UTC](https://www.ruby-forum.com/t/how-to-add-up-an-arrays-element-with-a-rails-way/169558 "2009-06-05T09:53:19Z")

</div>

Hi, I have a method like this, calculating the sub\_total in an order model: def sub\_total result = 0 for item in self.order\_items result += item.price end result end Is there a rails way to make the method more …

---

## [Need a ROR Developer](https://www.ruby-forum.com/t/need-a-ror-developer/169556)

<div class="topic-metadata">

**Author:** [@FacebooksterS\_Inc](https://www.ruby-forum.com/u/FacebooksterS_Inc)\
**Replies:** 0\
**Last updated:** [June 5, 2009, 9:16am UTC](https://www.ruby-forum.com/t/need-a-ror-developer/169556 "2009-06-05T09:16:17Z")

</div>

Established in 2003, Facebookster pioneered social media application development in the U.S before opening offices in , London, India & Pakistan. With a staff of over 150 experienced and proven professionals, Facebook…

---

## [GlassFish gem 0.9.5 released](https://www.ruby-forum.com/t/glassfish-gem-0-9-5-released/196967)

<div class="topic-metadata">

**Author:** [@Vivek\_P](https://www.ruby-forum.com/u/Vivek_P)\
**Replies:** 2\
**Last updated:** [June 5, 2009, 1:43am UTC](https://www.ruby-forum.com/t/glassfish-gem-0-9-5-released/196967 "2009-06-05T01:43:47Z")

</div>

I am pleased to announce availability of GlassFish gem 0.9.5. It was released in quick succession of 0.9.4 as a fix in 0.9.4 version broke GlassFish gem integration with NetBeans 6.7. RC1. GlassFish gem documentation …

---

## [Suggestions for notifying user on changes?](https://www.ruby-forum.com/t/suggestions-for-notifying-user-on-changes/169533)

<div class="topic-metadata">

**Author:** [@carl](https://www.ruby-forum.com/u/carl)\
**Replies:** 2\
**Last updated:** [June 5, 2009, 1:36am UTC](https://www.ruby-forum.com/t/suggestions-for-notifying-user-on-changes/169533 "2009-06-05T01:36:10Z")

</div>

I’m working on an app for collectively writing stories and I have most of the basic functions done. Users can create Universes that act as containers for Characters, Locations, and Events. Characters have Experiences …

---

## [Ruby Mendicant 2.0 (An Effort To Make RubySpec even more awesome)](https://www.ruby-forum.com/t/ruby-mendicant-2-0-an-effort-to-make-rubyspec-even-more-awesome/169546)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [June 5, 2009, 1:22am UTC](https://www.ruby-forum.com/t/ruby-mendicant-2-0-an-effort-to-make-rubyspec-even-more-awesome/169546 "2009-06-05T01:22:09Z")

</div>

Hi folks, For those familiar with Ruby Mendicant (http://majesticseacreature.com/ mendicant/), this announcement is actually for a totally different project. :slight\_smile: But it does have to do with community funded…

---

## [Global Scope based on Subdomain](https://www.ruby-forum.com/t/global-scope-based-on-subdomain/169479)

<div class="topic-metadata">

**Author:** [@KnightOfNi](https://www.ruby-forum.com/u/KnightOfNi)\
**Replies:** 1\
**Last updated:** [June 5, 2009, 12:54am UTC](https://www.ruby-forum.com/t/global-scope-based-on-subdomain/169479 "2009-06-05T00:54:37Z")

</div>

Hi, I’m a noob trying to figure out the best way to limit queries by a particular condition that is dependent on the subdomain of the site. I have a table “places” with a field called “subdomain”. Say I have another t…

---

## [Replace numbers and leave one single whitespace](https://www.ruby-forum.com/t/replace-numbers-and-leave-one-single-whitespace/169532)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 4\
**Last updated:** [June 5, 2009, 12:12am UTC](https://www.ruby-forum.com/t/replace-numbers-and-leave-one-single-whitespace/169532 "2009-06-05T00:12:32Z")

</div>

This is a string “test1more32and444more22”. How do I remove the numbers and replace them with a single whitespace? I can do it but I’ll get a whitespace for each digit and consequently have three whitespaces when ther…

---

## [Rails issue when using Rails 2.3.2 and Ruby 1.9.1](https://www.ruby-forum.com/t/rails-issue-when-using-rails-2-3-2-and-ruby-1-9-1/169473)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 7\
**Last updated:** [June 5, 2009, 12:02am UTC](https://www.ruby-forum.com/t/rails-issue-when-using-rails-2-3-2-and-ruby-1-9-1/169473 "2009-06-05T00:02:07Z")

</div>

Hello, I’m having a problem with Rails since updating to Rails 2.3.2 and Ruby 1.9.1 on PPC MAC 10.5.6. I installed twice,but still get the same error when trying to create a new Rails app: /Users/douglilla/.gem/ruby…

---

## [For in loop with only one element not working](https://www.ruby-forum.com/t/for-in-loop-with-only-one-element-not-working/169535)

<div class="topic-metadata">

**Author:** [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Replies:** 1\
**Last updated:** [June 4, 2009, 11:29pm UTC](https://www.ruby-forum.com/t/for-in-loop-with-only-one-element-not-working/169535 "2009-06-04T23:29:09Z")

</div>

Hi I have the following code: @lunchtimes = Lunchtime.find\_by\_dayname("#{todayname}") for l in @lunchtimes do # i = lunch.lunchfrom # j = lunch.lunchto # while i \< j do # id="#{session\[:dateviewi…

---

## [Creating a dynamic form and referring to a page with dynamic parameters](https://www.ruby-forum.com/t/creating-a-dynamic-form-and-referring-to-a-page-with-dynamic-parameters/169524)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 5\
**Last updated:** [June 4, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/creating-a-dynamic-form-and-referring-to-a-page-with-dynamic-parameters/169524 "2009-06-04T23:06:15Z")

</div>

I want to create a form where a visitor can dynamically add more fields to it. The visitor will input a list of stuff and can be anywere from 1 to over ten. The user will be inputting name of a medication and then dos…

---

## [My Ajax form doen't work within a table. Any idea?](https://www.ruby-forum.com/t/my-ajax-form-doent-work-within-a-table-any-idea/169529)

<div class="topic-metadata">

**Author:** [@liyu](https://www.ruby-forum.com/u/liyu)\
**Replies:** 2\
**Last updated:** [June 4, 2009, 10:58pm UTC](https://www.ruby-forum.com/t/my-ajax-form-doent-work-within-a-table-any-idea/169529 "2009-06-04T22:58:37Z")

</div>

Somehow, my ajax form was working perfect without any format. After I put it into a pretty looking table, added , it did not work. It works with , but not . Anyone has any idea? Thanks,

---

## [Autotest FAIL](https://www.ruby-forum.com/t/autotest-fail/169523)

<div class="topic-metadata">

**Author:** [@dkanders](https://www.ruby-forum.com/u/dkanders)\
**Replies:** 1\
**Last updated:** [June 4, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/autotest-fail/169523 "2009-06-04T22:42:38Z")

</div>

Hi All, I recently did a gem cleanup and seem to be having trouble with autotest… any ideas??? rake runs fine, but autotest doesn’t run any of my tests: ################LOOK WHAT HAPPENS WHEN I RUN RAKE \_ EVERYTHING …

---

## [Source Code Beautifier or Formatter For Your blogger and websites](https://www.ruby-forum.com/t/source-code-beautifier-or-formatter-for-your-blogger-and-websites/169531)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 4, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/source-code-beautifier-or-formatter-for-your-blogger-and-websites/169531 "2009-06-04T22:13:19Z")

</div>

Hi Friends, We have build a javascript application for your source code that is a source code beautifier or formatter for your blogger and websites. You can format your source code using html tag or tag with diff…

---

## [Anybody interesting in sharing some rails tips?](https://www.ruby-forum.com/t/anybody-interesting-in-sharing-some-rails-tips/168558)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 3\
**Last updated:** [June 4, 2009, 9:51pm UTC](https://www.ruby-forum.com/t/anybody-interesting-in-sharing-some-rails-tips/168558 "2009-06-04T21:51:33Z")

</div>

Hi all, I’ve just lauched a site called handy rails tips. I built this app because I fancied having someplace to share rails ideas and also write about new stuff I’ve discovered. I figured there would be other rails…

---

## [Calling JavaScript](https://www.ruby-forum.com/t/calling-javascript/169374)

<div class="topic-metadata">

**Author:** [@knappe](https://www.ruby-forum.com/u/knappe)\
**Replies:** 15\
**Last updated:** [June 4, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/calling-javascript/169374 "2009-06-04T21:25:03Z")

</div>

Hey All, I’m trying to call a javascript function from my view: \<%= link\_to\_function ‘Next Week Test’, “testjs()” %\> Which should be calling this: I’ve included /public/javascripts/test.js in my layout, it shows up …

---

## [Map.resources with both :get and :post on an action](https://www.ruby-forum.com/t/map-resources-with-both-get-and-post-on-an-action/169425)

<div class="topic-metadata">

**Author:** [@deepak](https://www.ruby-forum.com/u/deepak)\
**Replies:** 5\
**Last updated:** [June 4, 2009, 9:17pm UTC](https://www.ruby-forum.com/t/map-resources-with-both-get-and-post-on-an-action/169425 "2009-06-04T21:17:23Z")

</div>

hi, using map.resources i want an action to have both :get and :post http verbs. map.resources :tickets, :path\_prefix =\> '/workflows, :collection =\> { :pending =\> \[:get, :post\], :download =\> :get } here the pendin…

---

## [Restful authentication - sending email activation](https://www.ruby-forum.com/t/restful-authentication-sending-email-activation/169520)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 0\
**Last updated:** [June 4, 2009, 8:23pm UTC](https://www.ruby-forum.com/t/restful-authentication-sending-email-activation/169520 "2009-06-04T20:23:41Z")

</div>

for some reason, when i run restful\_authentication on my development server, the server will generate the activation email, but when i run the same codebase on the production server, the activation email makes no atte…

---

## [Rails pagination problem](https://www.ruby-forum.com/t/rails-pagination-problem/53322)

<div class="topic-metadata">

**Author:** [@jeet](https://www.ruby-forum.com/u/jeet)\
**Replies:** 1\
**Last updated:** [June 4, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/rails-pagination-problem/53322 "2009-06-04T20:19:53Z")

</div>

I am having this problem with pagination query in my controller class. I am using SQL server and following code to create pagination fails, complains about column name ‘program\_name’ (which is valid column/attribute o…

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

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