# Rails

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

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

---

## [\[JOB\] RoR Lead Engineer, San Francisco | Relo OK - 150-250k](https://www.ruby-forum.com/t/job-ror-lead-engineer-san-francisco-relo-ok-150-250k/154135)

<div class="topic-metadata">

**Author:** [@superiorss](https://www.ruby-forum.com/u/superiorss)\
**Replies:** 0\
**Last updated:** [November 25, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/job-ror-lead-engineer-san-francisco-relo-ok-150-250k/154135 "2008-11-25T19:10:35Z")

</div>

Job Title: Engineering Lead Location: San Francisco - Relocation assistance provided Duration: Full Time/Permanent Salary: 150-250k DOE \*\* Applicants coming from big name companies like Yahoo!, Google, Amazon, Ask.c…

---

## [\[JOBS\] Excellent Job Opportunity: Lead Engineering (Ruby on Rails), New Delhi](https://www.ruby-forum.com/t/jobs-excellent-job-opportunity-lead-engineering-ruby-on-rails-new-delhi/154090)

<div class="topic-metadata">

**Author:** [@Jitendra\_Singh](https://www.ruby-forum.com/u/Jitendra_Singh)\
**Replies:** 4\
**Last updated:** [November 25, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/jobs-excellent-job-opportunity-lead-engineering-ruby-on-rails-new-delhi/154090 "2008-11-25T18:52:14Z")

</div>

We are looking for motivated Ruby on Rails/Java technology professionals with 3+ years of relevant experience and a strong background in computer science, in particular Internet technologies. The role would involve bo…

---

## [Making arrays of valid values user-editable--best practice?](https://www.ruby-forum.com/t/making-arrays-of-valid-values-user-editable-best-practice/154134)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 0\
**Last updated:** [November 25, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/making-arrays-of-valid-values-user-editable-best-practice/154134 "2008-11-25T18:44:00Z")

</div>

Hey All, I’ve got a couple of valid-value lists that I would keep as arrays in the appropriate model. So for instance: class Person \< ActiveRecord::Base ROLE\_NAMES = \[‘Admin Assistant’, ‘Programmer’, ‘Investigator’, …

---

## [How to make named\_scope aware of association context?](https://www.ruby-forum.com/t/how-to-make-named-scope-aware-of-association-context/154034)

<div class="topic-metadata">

**Author:** [@sven](https://www.ruby-forum.com/u/sven)\
**Replies:** 4\
**Last updated:** [November 25, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/how-to-make-named-scope-aware-of-association-context/154034 "2008-11-25T18:33:24Z")

</div>

Given these models class Category \< ActiveRecord has\_many :category\_assignments has\_many :posts, :through =\> :category\_assignments end class CategoryAssignment \< ActiveRecord::Base belongs\_to :post belongs\_to :cat…

---

## [Easy way](https://www.ruby-forum.com/t/easy-way/154125)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/easy-way/154125 "2008-11-25T18:19:16Z")

</div>

Best way to do this: Pseudo code (word is unique) 1 Select \* from words where word = “test” 2 If result \> 0 then update words set count = coun +1 3 else Insert into words (word, count) values (“test”, 1)

---

## [Routing to a new action of a nested resource](https://www.ruby-forum.com/t/routing-to-a-new-action-of-a-nested-resource/152468)

<div class="topic-metadata">

**Author:** [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Replies:** 4\
**Last updated:** [November 25, 2008, 6:07pm UTC](https://www.ruby-forum.com/t/routing-to-a-new-action-of-a-nested-resource/152468 "2008-11-25T18:07:36Z")

</div>

Hi, can anyone help with a routing problem for nested resources: My models are User (has\_one :house) and House (belongs\_to :user). I have a houses\_controller and a user\_house\_controller. house\_controller is for the ad…

---

## [Ruby on Rails Glasgow](https://www.ruby-forum.com/t/ruby-on-rails-glasgow/154133)

<div class="topic-metadata">

**Author:** [@richardfairhurst](https://www.ruby-forum.com/u/richardfairhurst)\
**Replies:** 0\
**Last updated:** [November 25, 2008, 6:06pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-glasgow/154133 "2008-11-25T18:06:14Z")

</div>

Hi, I will keep this short and sweet. I am recruiting for a role in Glasgow for a Ruby on Rails developer. The salary is negotiable and all I am looking for is good ruby on rail development experience. If you would li…

---

## [ActiveRecord query in initializer file](https://www.ruby-forum.com/t/activerecord-query-in-initializer-file/154123)

<div class="topic-metadata">

**Author:** [@Jej](https://www.ruby-forum.com/u/Jej)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/activerecord-query-in-initializer-file/154123 "2008-11-25T17:52:50Z")

</div>

Hi all, I set up a constant in an initializer file (under /config/initializers/ myfile.rb) like this: MYCONST = Model.find(:all).size The problem is that rake fails to run some operations like db:migrate or db:reset…

---

## [Recognize frozen gems without loading rails environment?](https://www.ruby-forum.com/t/recognize-frozen-gems-without-loading-rails-environment/154127)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 25, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/recognize-frozen-gems-without-loading-rails-environment/154127 "2008-11-25T17:21:07Z")

</div>

Hi all, Does anyone know of a simple way to recognize frozen gems without loading the entire rails environment? One thought is to just modify ENV\[‘GEM\_PATH’\] and then call Gem.clear\_paths. But I know that a lot of …

---

## [Destroy method not working (routing question)](https://www.ruby-forum.com/t/destroy-method-not-working-routing-question/153954)

<div class="topic-metadata">

**Author:** [@cardinallijr](https://www.ruby-forum.com/u/cardinallijr)\
**Replies:** 16\
**Last updated:** [November 25, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/destroy-method-not-working-routing-question/153954 "2008-11-25T16:31:03Z")

</div>

Hi all, I’m trying to implement an admin control panel for my application and everything seems to work fine, except when I try to call the destroy method from the view. I really tried to search for a solution, reading …

---

## [An RSpec Model Example](https://www.ruby-forum.com/t/an-rspec-model-example/153250)

<div class="topic-metadata">

**Author:** [@torm3nt](https://www.ruby-forum.com/u/torm3nt)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/an-rspec-model-example/153250 "2008-11-25T16:26:55Z")

</div>

Testing is currently my hobby, it’s just something I LOVE doing, watching all the code be tested automagically… I dunno, kinda helps me sleep at night. A lot of people (including myself) seem to have trouble with test…

---

## [Cannot use "Application" as a model?](https://www.ruby-forum.com/t/cannot-use-application-as-a-model/154106)

<div class="topic-metadata">

**Author:** [@tick](https://www.ruby-forum.com/u/tick)\
**Replies:** 3\
**Last updated:** [November 25, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/cannot-use-application-as-a-model/154106 "2008-11-25T15:41:01Z")

</div>

I tried creating an application that has an “Application” model. This seems to collide with the “ApplicationController” defined in application.rb. For example… rails appgoboom cd appgoboom script/generate scaffold …

---

## [Full text search with complicated conditions](https://www.ruby-forum.com/t/full-text-search-with-complicated-conditions/154114)

<div class="topic-metadata">

**Author:** [@Hubert\_SSSSSSSSSpic](https://www.ruby-forum.com/u/Hubert_SSSSSSSSSpic)\
**Replies:** 0\
**Last updated:** [November 25, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/full-text-search-with-complicated-conditions/154114 "2008-11-25T15:28:39Z")

</div>

Hi all, I am going to do full text search, but only on records that match quite complicated conditions. I have implemented these as custom named\_scopes, with some SQL. Does anyone know if I can use these named scopes…

---

## [Apche + SSL Configuration Issue](https://www.ruby-forum.com/t/apche-ssl-configuration-issue/153712)

<div class="topic-metadata">

**Author:** [@Piyush\_with\_Rails](https://www.ruby-forum.com/u/Piyush_with_Rails)\
**Replies:** 7\
**Last updated:** [November 25, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/apche-ssl-configuration-issue/153712 "2008-11-25T15:09:15Z")

</div>

Hi, I am trying to setup the SSL for my site. i am using apache as webserver and mongrel cluster as application server and Ubuntu as server OS. I have configured my apache server for the SSL setup as per the certifi…

---

## [Strange (for me) Scaffold source code generated](https://www.ruby-forum.com/t/strange-for-me-scaffold-source-code-generated/154097)

<div class="topic-metadata">

**Author:** [@jujuju](https://www.ruby-forum.com/u/jujuju)\
**Replies:** 5\
**Last updated:** [November 25, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/strange-for-me-scaffold-source-code-generated/154097 "2008-11-25T14:27:08Z")

</div>

Hello :slight\_smile: I generated model, view and controler for products database table using scaffold I try to change controler name from product to admin but I can’t :frowning: (I didn’t know how to specifi diferent…

---

## [Mislav-will\_paginate & complicated SQL made up from params](https://www.ruby-forum.com/t/mislav-will-paginate-complicated-sql-made-up-from-params/154055)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/mislav-will-paginate-complicated-sql-made-up-from-params/154055 "2008-11-25T14:26:10Z")

</div>

I have a search form which sends a set of params to a controller. The params are unpacked and SQL generated which is then fed into (1) MyModel.paginate\_by\_sql \[sql\],:page =\> params\[:page\], :per\_page =\> 30 Which all w…

---

## [Distinct selection](https://www.ruby-forum.com/t/distinct-selection/153804)

<div class="topic-metadata">

**Author:** [@yan-oleg](https://www.ruby-forum.com/u/yan-oleg)\
**Replies:** 7\
**Last updated:** [November 25, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/distinct-selection/153804 "2008-11-25T14:14:37Z")

</div>

I have the following code: members.select {|m| m.role.assignable?}.collect {|m| m.role}.sort There are two tables: “roles” and “members”. One role record may have many foreign member records. But in this case I get m…

---

## [Ajax problem](https://www.ruby-forum.com/t/ajax-problem/154105)

<div class="topic-metadata">

**Author:** [@smartee](https://www.ruby-forum.com/u/smartee)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/ajax-problem/154105 "2008-11-25T13:47:36Z")

</div>

hi friends… my rhtml page is: Post Blog \<%= form\_remote\_tag(:update =\> "my\_list", :url =\> { :action =\> :preview\_blog }, :position =\> "top" ) %\> \<%= link\_to\_remote(image\_…

---

## [UK Opportunities for Ruby People](https://www.ruby-forum.com/t/uk-opportunities-for-ruby-people/154103)

<div class="topic-metadata">

**Author:** [@micky](https://www.ruby-forum.com/u/micky)\
**Replies:** 0\
**Last updated:** [November 25, 2008, 1:07pm UTC](https://www.ruby-forum.com/t/uk-opportunities-for-ruby-people/154103 "2008-11-25T13:07:06Z")

</div>

Dear All, I am a Web D. recruiter and Web Master of www.Ruby-People.com, a division of Open Spaces IT, the UK’s #1 supplier of Ruby on Rails and MERB professionals. I currently have multiple opportunities throughout …

---

## [Rails 2.1.2 =\> 2.2.2 Attempt to call private method](https://www.ruby-forum.com/t/rails-2-1-2-2-2-2-attempt-to-call-private-method/153996)

<div class="topic-metadata">

**Author:** [@se\_pavel](https://www.ruby-forum.com/u/se_pavel)\
**Replies:** 8\
**Last updated:** [November 25, 2008, 11:00am UTC](https://www.ruby-forum.com/t/rails-2-1-2-2-2-2-attempt-to-call-private-method/153996 "2008-11-25T11:00:57Z")

</div>

Hello All, Controller code @dates = Q.find(:all, :select =\> ‘year(q.approved\_at) as y, month(q.approved\_at) as m, day (q.approved\_at) as d, count(\*) as cnt’, other conditions View code \<% y = ‘’ %\> \<% for d in @dat…

---

## [Hooks on ror?](https://www.ruby-forum.com/t/hooks-on-ror/154061)

<div class="topic-metadata">

**Author:** [@ponto](https://www.ruby-forum.com/u/ponto)\
**Replies:** 1\
**Last updated:** [November 25, 2008, 10:35am UTC](https://www.ruby-forum.com/t/hooks-on-ror/154061 "2008-11-25T10:35:07Z")

</div>

Hi, i am adding functionality to the redmine’s (a ror apps) repository feature. changing some of the user interaction workflow. I’ve modified some of the views and added some js and css. What i would like to know, is…

---

## [Rails::Plugin::Dependencies in rails-2.2](https://www.ruby-forum.com/t/rails-dependencies-in-rails-2-2/154011)

<div class="topic-metadata">

**Author:** [@thaniyarasu](https://www.ruby-forum.com/u/thaniyarasu)\
**Replies:** 4\
**Last updated:** [November 25, 2008, 10:32am UTC](https://www.ruby-forum.com/t/rails-dependencies-in-rails-2-2/154011 "2008-11-25T10:32:11Z")

</div>

i got “Rails::Plugin::Dependencies” error after updating my gem version to rails -2.2.0 any idea?

---

## [Using replace\_html and fade with rjs](https://www.ruby-forum.com/t/using-replace-html-and-fade-with-rjs/154091)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [November 25, 2008, 10:31am UTC](https://www.ruby-forum.com/t/using-replace-html-and-fade-with-rjs/154091 "2008-11-25T10:31:35Z")

</div>

I have run into a problem using replace\_html and fade together to display an error message. The error message is displayed when a user enters the wrong username or password and then fades away. The problem is that i…

---

## [Localizing the views](https://www.ruby-forum.com/t/localizing-the-views/154057)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 3\
**Last updated:** [November 25, 2008, 9:45am UTC](https://www.ruby-forum.com/t/localizing-the-views/154057 "2008-11-25T09:45:16Z")

</div>

Hi, Using I18n, how would you localize the hard-coded html that is inside a view? I can’t find a way to do that in a clean manner.

---

## [After\_save woes](https://www.ruby-forum.com/t/after-save-woes/154088)

<div class="topic-metadata">

**Author:** [@ryank](https://www.ruby-forum.com/u/ryank)\
**Replies:** 1\
**Last updated:** [November 25, 2008, 9:32am UTC](https://www.ruby-forum.com/t/after-save-woes/154088 "2008-11-25T09:32:57Z")

</div>

Two models, a game, and a player. The game should start as soon as there are enough players in the game ##################################################### class Game \< ActiveRecord::Base has\_many :players should…

---

## [Installing the ruby on windows](https://www.ruby-forum.com/t/installing-the-ruby-on-windows/154084)

<div class="topic-metadata">

**Author:** [@napster](https://www.ruby-forum.com/u/napster)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 8:43am UTC](https://www.ruby-forum.com/t/installing-the-ruby-on-windows/154084 "2008-11-25T08:43:46Z")

</div>

hi guys i just want to install ruby1.8.6 on my windowsxp plz let me know urgently?

---

## [What to do when a user logs out, then presses the back button?](https://www.ruby-forum.com/t/what-to-do-when-a-user-logs-out-then-presses-the-back-button/153977)

<div class="topic-metadata">

**Author:** [@carpeliam](https://www.ruby-forum.com/u/carpeliam)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 7:42am UTC](https://www.ruby-forum.com/t/what-to-do-when-a-user-logs-out-then-presses-the-back-button/153977 "2008-11-25T07:42:55Z")

</div>

There are two cases I’m concerned about here when a user logs out, then clicks the back button: the user presses the “back” button and goes back to a page that would otherwise require authentication Right now, the e…

---

## [How to clone model's data](https://www.ruby-forum.com/t/how-to-clone-models-data/154082)

<div class="topic-metadata">

**Author:** [@nuugii](https://www.ruby-forum.com/u/nuugii)\
**Replies:** 1\
**Last updated:** [November 25, 2008, 6:49am UTC](https://www.ruby-forum.com/t/how-to-clone-models-data/154082 "2008-11-25T06:49:28Z")

</div>

Hey’ guys. How to clone model’s data.

---

## [Hidden file](https://www.ruby-forum.com/t/hidden-file/153970)

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 3\
**Last updated:** [November 25, 2008, 5:51am UTC](https://www.ruby-forum.com/t/hidden-file/153970 "2008-11-25T05:51:10Z")

</div>

Does anyone know the purpose of a hidden file called “.gems” in my home folder on os x?

---

## [Switching the version of Rails that an app uses](https://www.ruby-forum.com/t/switching-the-version-of-rails-that-an-app-uses/153868)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 15\
**Last updated:** [November 25, 2008, 5:05am UTC](https://www.ruby-forum.com/t/switching-the-version-of-rails-that-an-app-uses/153868 "2008-11-25T05:05:00Z")

</div>

Hi All, I’ve got a few versions or Rails installed and I’d like to run an App I’m developing with various versions of Rails. I heard of two ways to switch the version of Rails that an app uses: Use GitHub as descr…

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

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