# Rails

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

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

---

## [Session lost with IE7 but not FF... 8 hours hit head/wall](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839)

<div class="topic-metadata">

**Author:** [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 4:55am UTC](https://www.ruby-forum.com/t/session-lost-with-ie7-but-not-ff-8-hours-hit-head-wall/149839 "2008-10-01T04:55:02Z")

</div>

Our production site works great on IE7/FF but SAME code on test server fails for IE7…works great with FireFox. We’ve spent 8 hours on this problem now about we’re about to jump off bridge. I appears cookies are lost …

---

## [1 Form, 3 Models?](https://www.ruby-forum.com/t/1-form-3-models/149909)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 3\
**Last updated:** [October 1, 2008, 3:20am UTC](https://www.ruby-forum.com/t/1-form-3-models/149909 "2008-10-01T03:20:16Z")

</div>

I want to make a single form, but it will potentially create 3 new models. There are relationships between these models (belongs\_to). I have also generated the sections with scaffolding and created form partials. For…

---

## [Submit redirection to incorrect URL](https://www.ruby-forum.com/t/submit-redirection-to-incorrect-url/149812)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 1:51am UTC](https://www.ruby-forum.com/t/submit-redirection-to-incorrect-url/149812 "2008-10-01T01:51:19Z")

</div>

Hi, I’m new to rails and I’m building a small app. I have an album model that can have many comments. Albums belong to families, laid out in routes.rb. I want to be able to add comments in my /albums/ show.html.er…

---

## [:on =\> :create validation weirdness](https://www.ruby-forum.com/t/on-create-validation-weirdness/149905)

<div class="topic-metadata">

**Author:** [@daveamos](https://www.ruby-forum.com/u/daveamos)\
**Replies:** 4\
**Last updated:** [September 30, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/on-create-validation-weirdness/149905 "2008-09-30T23:58:24Z")

</div>

Hi there, I’m creating a simple login form, and I want the password to be validated only on creation (when a user edits, they will edit their profile on a separate screen). Therefore, my model looks like this: valida…

---

## [Protect\_against\_forgery? not available as helper method for views](https://www.ruby-forum.com/t/protect-against-forgery-not-available-as-helper-method-for-views/149903)

<div class="topic-metadata">

**Author:** [@suntou](https://www.ruby-forum.com/u/suntou)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/protect-against-forgery-not-available-as-helper-method-for-views/149903 "2008-09-30T23:47:49Z")

</div>

I recently upgrade to rails 2.1.1 from rails 1.2.3. When I create a form, it generates this error when the form is displayed: undefined method \`protect\_against\_forgery?’ for #\<ActionView::Base: 0x30cbd9c\> Extracted …

---

## [Module#name very slow for anonymous modules](https://www.ruby-forum.com/t/module-name-very-slow-for-anonymous-modules/149814)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 2\
**Last updated:** [September 30, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/module-name-very-slow-for-anonymous-modules/149814 "2008-09-30T23:26:43Z")

</div>

Notice it gets much worse with rails loaded. Anyone got a fix, or know why this is happening? cg5\[20:55\] development \> ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) \[universal-darwin9.0\] cg5\[20:51\] development \> irb …

---

## [Redirect Loop](https://www.ruby-forum.com/t/redirect-loop/149901)

<div class="topic-metadata">

**Author:** [@croceldon](https://www.ruby-forum.com/u/croceldon)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 11:20pm UTC](https://www.ruby-forum.com/t/redirect-loop/149901 "2008-09-30T23:20:51Z")

</div>

I have the following code in my controller: def list\_by\_so\_number if request.get? @histories = History.find(:all, :conditions =\> \[‘so\_number = ?’, params\[:sales\_order\_number\]\], :order =\> ‘timestamp desc’) if @histor…

---

## [Help me with this test/mocks issue please!](https://www.ruby-forum.com/t/help-me-with-this-test-mocks-issue-please/149896)

<div class="topic-metadata">

**Author:** [@tonyfromky](https://www.ruby-forum.com/u/tonyfromky)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/help-me-with-this-test-mocks-issue-please/149896 "2008-09-30T22:36:34Z")

</div>

I have a class called X that writes to disk. For this reason, the class is hard to test. If it wrote to a hash instead, I could test it. So I made a new class called X in test/mocks. In that class, I overrode the m…

---

## [\[ANN\] MysqlTableSyncer 0.2](https://www.ruby-forum.com/t/ann-mysqltablesyncer-0-2/149235)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 10:08pm UTC](https://www.ruby-forum.com/t/ann-mysqltablesyncer-0-2/149235 "2008-09-30T22:08:02Z")

</div>

Hi. Released a script recently to sync the contents of tables between two different mysql databases. The need for this is mostly as a faster, open source replacement to Navicat \[to those who have used it\] or SQLyog –…

---

## [Three days with some of the coolest people in ruby and rails](https://www.ruby-forum.com/t/three-days-with-some-of-the-coolest-people-in-ruby-and-rails/149820)

<div class="topic-metadata">

**Author:** [@hjk1127](https://www.ruby-forum.com/u/hjk1127)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 9:33pm UTC](https://www.ruby-forum.com/t/three-days-with-some-of-the-coolest-people-in-ruby-and-rails/149820 "2008-09-30T21:33:03Z")

</div>

What could be cooler than Ruby and Rails authors, experts, and hundreds of professionals that work with Ruby on a daily basis – all together in one location for great discussions and debates? That’s what will happen a…

---

## [Scriptaculous drag-and-drop and fixed position drop\_receiving\_elements](https://www.ruby-forum.com/t/scriptaculous-drag-and-drop-and-fixed-position-drop-receiving-elements/149889)

<div class="topic-metadata">

**Author:** [@ressister](https://www.ruby-forum.com/u/ressister)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/scriptaculous-drag-and-drop-and-fixed-position-drop-receiving-elements/149889 "2008-09-30T21:21:16Z")

</div>

I’ve got to imagine someone’s run into this problem before, though I can’t seem to find a good explanation on how to fix it. Any guidance would be greatly appreciated… I have a fixed position div with category names …

---

## [Lame logger timestamp question](https://www.ruby-forum.com/t/lame-logger-timestamp-question/149887)

<div class="topic-metadata">

**Author:** [@SurviveStyle5](https://www.ruby-forum.com/u/SurviveStyle5)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/lame-logger-timestamp-question/149887 "2008-09-30T21:11:51Z")

</div>

So in rails 2.1 the standard method for overriding log file format has changed? no longer can i class Logger def format\_message(severity, timestamp, progname, msg) “#{timestamp} #{severity} #{msg}\\n” end end inste…

---

## [Tabbed Menus - link\_to\_unless\_current](https://www.ruby-forum.com/t/tabbed-menus-link-to-unless-current/149886)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/tabbed-menus-link-to-unless-current/149886 "2008-09-30T20:50:45Z")

</div>

This is more difficult than I originally anticipated. Any help in figuring this out is most appreciated: This is a code snippet from my header.rhtml (or erb) file that draws tabbed menus: \<ul\> \<% \[…

---

## [Moving to Rails 2.x](https://www.ruby-forum.com/t/moving-to-rails-2-x/149545)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 3\
**Last updated:** [September 30, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/moving-to-rails-2-x/149545 "2008-09-30T20:24:37Z")

</div>

Finally about to make the move from 1.2.6 to 2.? and am curious about strategy… I’ve looked at a bunch of postings across the web about upgrading, but many of them seem to be written back when 2.0 was only a RC and it …

---

## [Mysql tuning plus catching ActiveRecord::StatementInvalid errors](https://www.ruby-forum.com/t/mysql-tuning-plus-catching-activerecord-statementinvalid-errors/149878)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 8:22pm UTC](https://www.ruby-forum.com/t/mysql-tuning-plus-catching-activerecord-statementinvalid-errors/149878 "2008-09-30T20:22:52Z")

</div>

Recently our Rails app has been choking every once and a while on updates to the “users” table. The error normally appears like so: A ActiveRecord::StatementInvalid occurred in activity\_responses#create: Mysql::Error…

---

## [Changing multiple records at the same time](https://www.ruby-forum.com/t/changing-multiple-records-at-the-same-time/149880)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/changing-multiple-records-at-the-same-time/149880 "2008-09-30T20:05:15Z")

</div>

I have a database where one column is boolean (checkboxes). I’d like the user to be able to check any of these boxes they want, and then submit the form and have all of the affected records changed. I’m brand-new to r…

---

## [Validate creation of both parent and child from same form?](https://www.ruby-forum.com/t/validate-creation-of-both-parent-and-child-from-same-form/149610)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 2\
**Last updated:** [September 30, 2008, 7:47pm UTC](https://www.ruby-forum.com/t/validate-creation-of-both-parent-and-child-from-same-form/149610 "2008-09-30T19:47:39Z")

</div>

Alternate subject title: Validate child of unsaved parent based on grandparent attr? I’ve got a create view with a form for both the parent object as well as multiple child objects. Upon submit, can I validate the par…

---

## [Libjpeg error in gd2](https://www.ruby-forum.com/t/libjpeg-error-in-gd2/149821)

<div class="topic-metadata">

**Author:** [@pwever](https://www.ruby-forum.com/u/pwever)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/libjpeg-error-in-gd2/149821 "2008-09-30T19:22:24Z")

</div>

Hi there, I am trying to install gd2 under OS X 10.5 in order to get this thumbnail generator (Error generator/) to work. After appreciating the number of dependencies, I opted for installing it via MacPorts. Unfortu…

---

## [Path methods. Where they came from?](https://www.ruby-forum.com/t/path-methods-where-they-came-from/149782)

<div class="topic-metadata">

**Author:** [@oferar](https://www.ruby-forum.com/u/oferar)\
**Replies:** 3\
**Last updated:** [September 30, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/path-methods-where-they-came-from/149782 "2008-09-30T18:48:11Z")

</div>

Hello, I’m playing with a depot sample application from (Agile …) and notice the following on a view: \<%= link\_to ‘Edit’, edit\_product\_path(@product) %\> | \<%= link\_to ‘Back’, products\_path %\> I added a new model/view…

---

## [Error message 'undefined method \`require\_gem' for main:Object (NoMethodError)'--how to resolve?](https://www.ruby-forum.com/t/error-message-undefined-method-require-gem-for-main-object-nomethoderror-how-to-resolve/149873)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 7\
**Last updated:** [September 30, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/error-message-undefined-method-require-gem-for-main-object-nomethoderror-how-to-resolve/149873 "2008-09-30T18:43:37Z")

</div>

I’m getting the following when doing a db:migrate after installing RoR 2+: Macintosh-4:ui Ken$ rake db:migrate /usr/local/bin/rake:17: undefined method \`require\_gem’ for main:Object (NoMethodError) I have done a ’ s…

---

## [:locals vs. instance variable in partials ... best practice?](https://www.ruby-forum.com/t/locals-vs-instance-variable-in-partials-best-practice/149860)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 2\
**Last updated:** [September 30, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/locals-vs-instance-variable-in-partials-best-practice/149860 "2008-09-30T18:40:04Z")

</div>

I’ve been vacillating between using the :locals hash and instance variables when passing data to partials. Is there a valid reason to use one over the other? What could be considered a best practice in the Rails commu…

---

## [For online shoping cart which tool best?](https://www.ruby-forum.com/t/for-online-shoping-cart-which-tool-best/149852)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/for-online-shoping-cart-which-tool-best/149852 "2008-09-30T18:23:00Z")

</div>

which one tool is best for online cart web application ? ATG or rails(like Agile Webdevelopment has a sample cart application)

---

## [Routes map and correct path](https://www.ruby-forum.com/t/routes-map-and-correct-path/149836)

<div class="topic-metadata">

**Author:** [@pandabeer](https://www.ruby-forum.com/u/pandabeer)\
**Replies:** 3\
**Last updated:** [September 30, 2008, 5:16pm UTC](https://www.ruby-forum.com/t/routes-map-and-correct-path/149836 "2008-09-30T17:16:23Z")

</div>

Hello everybody, Here you can see my short code: in routes.rb: map.resources :users in users\_controller.rb def new @user = User.new end in views/users/new.html.erb: \<% form\_for @user do |f| %\> And that work very w…

---

## [Testing batch programs](https://www.ruby-forum.com/t/testing-batch-programs/149861)

<div class="topic-metadata">

**Author:** [@tonyfromky](https://www.ruby-forum.com/u/tonyfromky)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/testing-batch-programs/149861 "2008-09-30T16:55:55Z")

</div>

I have a batch program (yes, coders like me still exist) that, while it uses the same models are our web app, it isn’t webby at all. Basically, I grind through the database and send emails. I changed the email deli…

---

## [Building Gem of a Rails app](https://www.ruby-forum.com/t/building-gem-of-a-rails-app/148883)

<div class="topic-metadata">

**Author:** [@chadster](https://www.ruby-forum.com/u/chadster)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/building-gem-of-a-rails-app/148883 "2008-09-30T16:54:43Z")

</div>

I’m looking for advice about packaging a gem that runs as a rails app. The rails app that I’m interested in is iClassify. As as starting point, I’m soliciting nominees for good examples of gems that are meant to run…

---

## [Collection\_select reseting selection whenever page refreshes](https://www.ruby-forum.com/t/collection-select-reseting-selection-whenever-page-refreshes/148071)

<div class="topic-metadata">

**Author:** [@will](https://www.ruby-forum.com/u/will)\
**Replies:** 2\
**Last updated:** [September 30, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/collection-select-reseting-selection-whenever-page-refreshes/148071 "2008-09-30T16:45:21Z")

</div>

I have a collection\_select dialog that I have for selecting Users on a page. I am wanting the selection to remember and display the last selected user from the database. Every time I refresh the page it is going bac…

---

## [Include Case-Insensitive](https://www.ruby-forum.com/t/include-case-insensitive/90074)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 2\
**Last updated:** [September 30, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/include-case-insensitive/90074 "2008-09-30T15:57:01Z")

</div>

Is there a way to make include? case insensitive?

---

## [REST web service](https://www.ruby-forum.com/t/rest-web-service/149838)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 1\
**Last updated:** [September 30, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/rest-web-service/149838 "2008-09-30T15:49:17Z")

</div>

Hi I have a question regarding using Rails as a REST web service. I understand the concept and have implemented it into a project. As far as I’m logged in into the application, I can pull out data in any format that …

---

## [Undefined method \`authenticate\_with\_http\_basic' for #\<SessionsController:0xb6c47c44\>](https://www.ruby-forum.com/t/undefined-method-authenticate-with-http-basic-for-sessionscontroller-0xb6c47c44/149853)

<div class="topic-metadata">

**Author:** [@hema\_mca](https://www.ruby-forum.com/u/hema_mca)\
**Replies:** 0\
**Last updated:** [September 30, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/undefined-method-authenticate-with-http-basic-for-sessionscontroller-0xb6c47c44/149853 "2008-09-30T15:48:15Z")

</div>

I am developing the rails with the flex… I am following the tutorial FLEXIBLE RAILS - PETER ARMSTRONG . I followed the commands as specified in the tutorial… my rails version is 1.2.3 and the ruby 1.8.6 I created t…

---

## [Microsite](https://www.ruby-forum.com/t/microsite/149837)

<div class="topic-metadata">

**Author:** [@mrbless](https://www.ruby-forum.com/u/mrbless)\
**Replies:** 3\
**Last updated:** [September 30, 2008, 3:33pm UTC](https://www.ruby-forum.com/t/microsite/149837 "2008-09-30T15:33:36Z")

</div>

Hi guys. I don’t know whether this is the right place to put this question or not. But i want to build a microsite in rails. But i have no idea so whatever related to microsite. Can anybody give me an idea about micro…

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

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