# Rails

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

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

---

## [Undefined Method error](https://www.ruby-forum.com/t/undefined-method-error/156478)

<div class="topic-metadata">

**Author:** [@jette](https://www.ruby-forum.com/u/jette)\
**Replies:** 2\
**Last updated:** [December 28, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/undefined-method-error/156478 "2008-12-28T18:16:16Z")

</div>

OK. I have 4 models, item/category/subcategory/brand association like following item belongs\_to :brands belongs\_to :categories belongs\_to :subcategories brand has\_many :items category has\_many :items has\_many :…

---

## [Menu table in Rails](https://www.ruby-forum.com/t/menu-table-in-rails/156474)

<div class="topic-metadata">

**Author:** [@cgommel](https://www.ruby-forum.com/u/cgommel)\
**Replies:** 2\
**Last updated:** [December 28, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/menu-table-in-rails/156474 "2008-12-28T17:59:12Z")

</div>

Hello, being a very early beginner I want to build my first little rails app. I want to show the users (my co-workers) the menu table of our catering service. We can choose between five different dishes, some salads …

---

## [One question about Dynamic Select Menus](https://www.ruby-forum.com/t/one-question-about-dynamic-select-menus/156349)

<div class="topic-metadata">

**Author:** [@jette](https://www.ruby-forum.com/u/jette)\
**Replies:** 5\
**Last updated:** [December 28, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/one-question-about-dynamic-select-menus/156349 "2008-12-28T17:52:10Z")

</div>

Hi all, Merry X’mas first :slight\_smile: I have “Product”,“Category”,“Subcategory” 3 Model, and when new “Product”, I want to use “Dynamic Select Menus” just like Ryan mentioned in #88 Dynamic Select Menus - RailsCas…

---

## [Trouble with MacPorts install, .profile file not created/ need help](https://www.ruby-forum.com/t/trouble-with-macports-install-profile-file-not-created-need-help/156450)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 1\
**Last updated:** [December 28, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/trouble-with-macports-install-profile-file-not-created-need-help/156450 "2008-12-28T17:49:48Z")

</div>

I have just installed MacPorts 1.7.0 for Leopard using a downloaded .dmg file. Following the download and installation, I looked for the .profile file to change the environment variables, but found that no .profile fi…

---

## [Building an array of dates](https://www.ruby-forum.com/t/building-an-array-of-dates/156434)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 6\
**Last updated:** [December 28, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/building-an-array-of-dates/156434 "2008-12-28T17:48:02Z")

</div>

I need to build an array that contains lots of date objects. I’ve got a booking model and it contains stuff like this… create\_table “bookings”, :force =\> true do |t| t.string “firstname” t.string “lastname” t.in…

---

## [Hash Sorting](https://www.ruby-forum.com/t/hash-sorting/156380)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 6\
**Last updated:** [December 28, 2008, 5:34pm UTC](https://www.ruby-forum.com/t/hash-sorting/156380 "2008-12-28T17:34:30Z")

</div>

Hi, My hash contain key as a combination of album date created\_at and album\_id and values are some photo object.and i need to sort this hash based on key; but i need to sort it also considering date created\_at. but i…

---

## [:attr\_accessible to protect all attributes](https://www.ruby-forum.com/t/attr-accessible-to-protect-all-attributes/156472)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 0\
**Last updated:** [December 28, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/attr-accessible-to-protect-all-attributes/156472 "2008-12-28T17:14:58Z")

</div>

Hi, I would like to protect all the attributes of one of my model. This ticket talks about this issue: http://dev.rubyonrails.org/ticket/9631 , and a patch to the documentation was submitted: http://dev.rubyonrails.o…

---

## [My own Model declarations do not overwrite/replace plugin's ones?](https://www.ruby-forum.com/t/my-own-model-declarations-do-not-overwrite-replace-plugins-ones/156456)

<div class="topic-metadata">

**Author:** [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Replies:** 2\
**Last updated:** [December 28, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/my-own-model-declarations-do-not-overwrite-replace-plugins-ones/156456 "2008-12-28T16:55:12Z")

</div>

Good Morning, I have a quick Q: I am using the acts\_as\_follower plugin which comes with its own ‘Follow’ model (lib/follow.rb). Now what I wanted to do is basically take this, copy it from the vendor/plugins/… to app/ …

---

## [Mind-boggling problem with update\_attributes()](https://www.ruby-forum.com/t/mind-boggling-problem-with-update-attributes/156453)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 4\
**Last updated:** [December 28, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/mind-boggling-problem-with-update-attributes/156453 "2008-12-28T16:34:41Z")

</div>

So I’m working on creating a migration for a new version of one of the projects I’m working on. But Rake seems to be selectively spitting out errors. The same code that works only a few lines up will not work where I …

---

## [Php's \_\_call for ruby? or better approach?](https://www.ruby-forum.com/t/phps-call-for-ruby-or-better-approach/156467)

<div class="topic-metadata">

**Author:** [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Replies:** 3\
**Last updated:** [December 28, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/phps-call-for-ruby-or-better-approach/156467 "2008-12-28T14:43:56Z")

</div>

Hi Rubyists! I’m quite new to Ruby/Rails thing, so please be patient with me :slight\_smile: -------- (skip to next -------- if you want to quickly see the problem) I am learning by creating something like timetable a…

---

## [Should I learn Ruby on Rails? What book?](https://www.ruby-forum.com/t/should-i-learn-ruby-on-rails-what-book/156356)

<div class="topic-metadata">

**Author:** [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Replies:** 6\
**Last updated:** [December 28, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/should-i-learn-ruby-on-rails-what-book/156356 "2008-12-28T14:08:42Z")

</div>

Hey there, I’m a web developer, I’ve already mastered (well at least it sounds good) another framework - PHP Symfony - it’s a great framework and it’s very similiar to Ruby on Rails. But when I watch these screencast…

---

## [Is this a localised one](https://www.ruby-forum.com/t/is-this-a-localised-one/156460)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 1\
**Last updated:** [December 28, 2008, 11:10am UTC](https://www.ruby-forum.com/t/is-this-a-localised-one/156460 "2008-12-28T11:10:03Z")

</div>

I have seen redmine code whats the use of having \<%=l(:label\_user\_plural)%\> .whether l is onlu for localised

---

## [Escape character problem](https://www.ruby-forum.com/t/escape-character-problem/156459)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 1\
**Last updated:** [December 28, 2008, 9:52am UTC](https://www.ruby-forum.com/t/escape-character-problem/156459 "2008-12-28T09:52:11Z")

</div>

Hi, i need to construct a link as following “\<a href=”#{CONFIG\[‘URLS’\]\[‘Xyz’\]}#{url}"#{tag\_options}\>#{name || url}" But here due to escape character #{url} not give actual value it treated as a string. how to solve …

---

## [2.2.2 super simple upgrade question](https://www.ruby-forum.com/t/2-2-2-super-simple-upgrade-question/156458)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 8\
**Last updated:** [December 28, 2008, 6:24am UTC](https://www.ruby-forum.com/t/2-2-2-super-simple-upgrade-question/156458 "2008-12-28T06:24:06Z")

</div>

I’ve been riding rails since 1.2 and had no problems (that i couldn’t get over) upgrading. Since i’ve installed rails 2.2.2 (verified via gem list, and rails -v) and I change my environment.rb to read RAILS\_GEM\_VERSIO…

---

## [What to call Rails + merb](https://www.ruby-forum.com/t/what-to-call-rails-merb/156404)

<div class="topic-metadata">

**Author:** [@Teedub](https://www.ruby-forum.com/u/Teedub)\
**Replies:** 12\
**Last updated:** [December 28, 2008, 5:23am UTC](https://www.ruby-forum.com/t/what-to-call-rails-merb/156404 "2008-12-28T05:23:59Z")

</div>

I am so excited about the Rails Merb merger! We need a descriptive name for the event. Rails 3 is fine but not descriptive enough David A Black tweeted it as the merber (merg of merb and rails) This is my favorite R…

---

## [A newbie question about setting value for {{var}}](https://www.ruby-forum.com/t/a-newbie-question-about-setting-value-for-var/156457)

<div class="topic-metadata">

**Author:** [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Replies:** 0\
**Last updated:** [December 28, 2008, 3:47am UTC](https://www.ruby-forum.com/t/a-newbie-question-about-setting-value-for-var/156457 "2008-12-28T03:47:03Z")

</div>

I study RailSpace code and the line code in the book @error\_messages = ActiveRecord::Errors.default\_error\_messages has been deprecated. Instead the following is recommended @error\_messages = I18n.translate(‘activereco…

---

## [Duplicating start date to end date](https://www.ruby-forum.com/t/duplicating-start-date-to-end-date/156396)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 5\
**Last updated:** [December 28, 2008, 3:01am UTC](https://www.ruby-forum.com/t/duplicating-start-date-to-end-date/156396 "2008-12-28T03:01:53Z")

</div>

One of my apps is using the calendar date select plugin\[1\] to let users select the start and end date for an event. The app is in beta and so far the users have asked if I can do this: When the start date is selected,…

---

## [Installing a branched gem from git?](https://www.ruby-forum.com/t/installing-a-branched-gem-from-git/156400)

<div class="topic-metadata">

**Author:** [@Teedub](https://www.ruby-forum.com/u/Teedub)\
**Replies:** 3\
**Last updated:** [December 28, 2008, 2:12am UTC](https://www.ruby-forum.com/t/installing-a-branched-gem-from-git/156400 "2008-12-28T02:12:12Z")

</div>

Happy Holidays, This question happens to be about juggernaut, but the problem is generic. I am waiting to be accepted to the juggernaut google group or I would post there. I am playing with juggernaut and I see that …

---

## [Session hash and fetch problem?](https://www.ruby-forum.com/t/session-hash-and-fetch-problem/156451)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 4\
**Last updated:** [December 28, 2008, 12:26am UTC](https://www.ruby-forum.com/t/session-hash-and-fetch-problem/156451 "2008-12-28T00:26:48Z")

</div>

Short version of the problem: Why this works session\[:sub\_menu\].fetch(:stock) and this don’t? session\[:sub\_menu\].fetch(“stock”) thanks David S.

---

## [Problems after caching](https://www.ruby-forum.com/t/problems-after-caching/156430)

<div class="topic-metadata">

**Author:** [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Replies:** 1\
**Last updated:** [December 27, 2008, 11:42pm UTC](https://www.ruby-forum.com/t/problems-after-caching/156430 "2008-12-27T23:42:23Z")

</div>

Hey all I m facing a problem,. Actually i m caching one action using caches\_action. On that page i also have pagiation. So if i enable caching the page loads faster but the pagination stops working…it redirects me to…

---

## [NameError: uninitialized constant Digest::SHA2](https://www.ruby-forum.com/t/nameerror-uninitialized-constant-digest-sha2/156441)

<div class="topic-metadata">

**Author:** [@Sav](https://www.ruby-forum.com/u/Sav)\
**Replies:** 2\
**Last updated:** [December 27, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/nameerror-uninitialized-constant-digest-sha2/156441 "2008-12-27T21:08:58Z")

</div>

I’m migrating a working app to a new server, but all my authentication tests are failing on SHA2. The user.rb model has require ‘digest/ sha2’ at the top, yet I still get this error… NameError: uninitialized constant…

---

## [Porticus/Port Authority for MacPorts GUI front-end?](https://www.ruby-forum.com/t/porticus-port-authority-for-macports-gui-front-end/156440)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 0\
**Last updated:** [December 27, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/porticus-port-authority-for-macports-gui-front-end/156440 "2008-12-27T18:17:11Z")

</div>

I’ve noticed that there are two different programs which can serve as a GUI front end for MacPorts. Would like to hear who uses what, and differences between the two programs. Thank you.

---

## [Rails 2.0.2 upgrade difficulties](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-difficulties/124847)

<div class="topic-metadata">

**Author:** [@Sean\_Schofield](https://www.ruby-forum.com/u/Sean_Schofield)\
**Replies:** 11\
**Last updated:** [December 27, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/rails-2-0-2-upgrade-difficulties/124847 "2008-12-27T18:11:38Z")

</div>

Getting a routing error when I tried upgrading to Rails 2.0.2. … vendor/plugins/engines/lib/engines/rails\_extensions/routing.rb:69:in \`from\_plugin’: You have a nil object when you didn’t expect it! (NoMethodError) Th…

---

## [Need a ROR Programmer for a CMS](https://www.ruby-forum.com/t/need-a-ror-programmer-for-a-cms/155530)

<div class="topic-metadata">

**Author:** [@SEMG](https://www.ruby-forum.com/u/SEMG)\
**Replies:** 1\
**Last updated:** [December 27, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/need-a-ror-programmer-for-a-cms/155530 "2008-12-27T16:23:28Z")

</div>

hello - I am looking for a ROR programmer to build a CMS. I have not had much luck! We are currently using Drupal, but am interested in going towards ROR since we are rebranding anyways. It’s an entertainment/lifest…

---

## [Helper methods not availlable in controller](https://www.ruby-forum.com/t/helper-methods-not-availlable-in-controller/148577)

<div class="topic-metadata">

**Author:** [@Wijnand\_W](https://www.ruby-forum.com/u/Wijnand_W)\
**Replies:** 3\
**Last updated:** [December 27, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/helper-methods-not-availlable-in-controller/148577 "2008-12-27T15:52:58Z")

</div>

Hi, I don’t start pasting lots of code since I am not sure what would be relevant. I have one controller that doesn’t include all my helper methods. I get: undefined method \`full\_admin?’ for #\<CompaniesController: 0…

---

## [Restful-authentication (activation\_code and user.reload)](https://www.ruby-forum.com/t/restful-authentication-activation-code-and-user-reload/156431)

<div class="topic-metadata">

**Author:** [@noocx](https://www.ruby-forum.com/u/noocx)\
**Replies:** 0\
**Last updated:** [December 27, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/restful-authentication-activation-code-and-user-reload/156431 "2008-12-27T13:17:48Z")

</div>

Hello, I solved one of my problems with restful-authentication plugin: the sent activation\_code was different than the one in the db. I found the solution in the readme: http://github.com/technoweenie/restful-authent…

---

## [Data Migrations in Production](https://www.ruby-forum.com/t/data-migrations-in-production/156419)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 1\
**Last updated:** [December 27, 2008, 1:16pm UTC](https://www.ruby-forum.com/t/data-migrations-in-production/156419 "2008-12-27T13:16:37Z")

</div>

General question - when you deploy a new production version, how do you normally handle the data migration? I’m leery of applying “spot” changes directly to the prod DB - I would prefer to have an unchanged version t…

---

## [Problem after changing to Rails 2.2.2](https://www.ruby-forum.com/t/problem-after-changing-to-rails-2-2-2/156426)

<div class="topic-metadata">

**Author:** [@Naga\_harish\_K](https://www.ruby-forum.com/u/Naga_harish_K)\
**Replies:** 1\
**Last updated:** [December 27, 2008, 1:13pm UTC](https://www.ruby-forum.com/t/problem-after-changing-to-rails-2-2-2/156426 "2008-12-27T13:13:41Z")

</div>

Hi, Yesterday we started migrating our project to Rails 2.2.2. For one of the Ajax Request I faced some problem. When I click an AJAX link, then in the UI I can see my rhtml code directly like \<% \_\_in\_erb\_template=t…

---

## [Named - restful routes question](https://www.ruby-forum.com/t/named-restful-routes-question/156297)

<div class="topic-metadata">

**Author:** [@sohdubom](https://www.ruby-forum.com/u/sohdubom)\
**Replies:** 3\
**Last updated:** [December 27, 2008, 10:34am UTC](https://www.ruby-forum.com/t/named-restful-routes-question/156297 "2008-12-27T10:34:47Z")

</div>

hi. in order to better understand restful routes, i started with simple routes and named routes. before doing map.resources :users in my app, i decide to simulate all the 7 possibilities in my routes,rb file: map.reso…

---

## [Hide & Show div (Element.toggle)](https://www.ruby-forum.com/t/hide-show-div-element-toggle/156399)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 5\
**Last updated:** [December 27, 2008, 8:59am UTC](https://www.ruby-forum.com/t/hide-show-div-element-toggle/156399 "2008-12-27T08:59:06Z")

</div>

I have 2 divs: \<%= link\_to\_function("Show div2", "Element.toggle('div2')") %\> \<%= link\_to\_function("Show div1", "Element.toggle('div1')") %\> I want, when I click link: “Show div2” it hide div1 and show div2, when…

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

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