# Rails

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

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

---

## [Instantiating a class using Kernel.const\_get](https://www.ruby-forum.com/t/instantiating-a-class-using-kernel-const-get/137927)

<div class="topic-metadata">

**Author:** [@fox](https://www.ruby-forum.com/u/fox)\
**Replies:** 2\
**Last updated:** [May 19, 2008, 1:39am UTC](https://www.ruby-forum.com/t/instantiating-a-class-using-kernel-const-get/137927 "2008-05-19T01:39:38Z")

</div>

hello all, i have a model which needs to instantiate a class depending on the string name which is passed to initialize() so, to get my Person class instance, i do: person = Kernel.const\_get(“Person”).send(“new”) p…

---

## [Accessing database and rendering from a plugin](https://www.ruby-forum.com/t/accessing-database-and-rendering-from-a-plugin/137960)

<div class="topic-metadata">

**Author:** [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Replies:** 2\
**Last updated:** [May 19, 2008, 1:31am UTC](https://www.ruby-forum.com/t/accessing-database-and-rendering-from-a-plugin/137960 "2008-05-19T01:31:00Z")

</div>

Hi all, Very fresh rails and programming newbie here; please bear with me :smiley: I am using the calendar helper plugin from http://wiki.rubyonrails.org/rails/pages/Calendar+Helper+Plugin, and hacking around with it…

---

## [Javascript validation for a form?](https://www.ruby-forum.com/t/javascript-validation-for-a-form/137949)

<div class="topic-metadata">

**Author:** [@san1981](https://www.ruby-forum.com/u/san1981)\
**Replies:** 3\
**Last updated:** [May 18, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/javascript-validation-for-a-form/137949 "2008-05-18T21:39:00Z")

</div>

Hello, I’ve made a form with a validation system in rails (validates\_presence\_of etc) but I’ld like also to make a classic validation with an external javascript to have a direct client validation without sending to …

---

## [Home made blogging or go pro?](https://www.ruby-forum.com/t/home-made-blogging-or-go-pro/136668)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 5\
**Last updated:** [May 18, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/home-made-blogging-or-go-pro/136668 "2008-05-18T20:17:23Z")

</div>

In trying to learn Ruby/RoR/AJAX, I’m trying to make a website for myself that will (eventually) be my centralized ‘online identity’. To that end, I want every facet of the website (which will probably include a blog,…

---

## [Class name and NameError: uninitialized constant](https://www.ruby-forum.com/t/class-name-and-nameerror-uninitialized-constant/137938)

<div class="topic-metadata">

**Author:** [@rich](https://www.ruby-forum.com/u/rich)\
**Replies:** 4\
**Last updated:** [May 18, 2008, 7:48pm UTC](https://www.ruby-forum.com/t/class-name-and-nameerror-uninitialized-constant/137938 "2008-05-18T19:48:39Z")

</div>

Hi All: I’m just getting started with rails and have run into a problem with class names. If I create a class, and call it MyClass, it throws the following error. @my\_class = MyClass.new NameError: uninitialized c…

---

## [Example of using "sortable-element" with nested lists?](https://www.ruby-forum.com/t/example-of-using-sortable-element-with-nested-lists/135779)

<div class="topic-metadata">

**Author:** [@apswartz](https://www.ruby-forum.com/u/apswartz)\
**Replies:** 1\
**Last updated:** [May 18, 2008, 7:09pm UTC](https://www.ruby-forum.com/t/example-of-using-sortable-element-with-nested-lists/135779 "2008-05-18T19:09:56Z")

</div>

I am having some trouble understanding how to use my controller to look at what sortable-element gives me back for a nested list. What I get back in my session looks like: {“list”=\>{“0”=\>{“6”=\>{“id”=\>“64”}, “11”=\>{“id…

---

## [Link\_to popup problems](https://www.ruby-forum.com/t/link-to-popup-problems/104722)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 3\
**Last updated:** [May 18, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/link-to-popup-problems/104722 "2008-05-18T19:05:49Z")

</div>

so, I have a strange problem with popups using link\_to and i’m not sure what to look for. My problem: When I click the link it pops open a new window. When using internet explorer 6 or 7 sometimes it will open the po…

---

## [Is there anything easier than ImageMagick/ImageScience?](https://www.ruby-forum.com/t/is-there-anything-easier-than-imagemagick-imagescience/137536)

<div class="topic-metadata">

**Author:** [@miken700](https://www.ruby-forum.com/u/miken700)\
**Replies:** 5\
**Last updated:** [May 18, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/is-there-anything-easier-than-imagemagick-imagescience/137536 "2008-05-18T18:31:07Z")

</div>

I for some of my current projects, I want to scale and crop photos for avatars. Installing ImageMagick/ImageScience and making it work is such a pain in the butt. Isn’t there some easier way? Is there any web servic…

---

## [Relationships and Deleting](https://www.ruby-forum.com/t/relationships-and-deleting/137907)

<div class="topic-metadata">

**Author:** [@chalkers](https://www.ruby-forum.com/u/chalkers)\
**Replies:** 2\
**Last updated:** [May 18, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/relationships-and-deleting/137907 "2008-05-18T14:44:56Z")

</div>

I am playing around with relationships at the moment and am hitting a wall. I have a group. class Group \< ActiveRecord::Base has\_many :contacts end and a contact. class Contact \< ActiveRecord::Base belongs\_to :gr…

---

## [Gloc errors... is gloc dead?](https://www.ruby-forum.com/t/gloc-errors-is-gloc-dead/137921)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 0\
**Last updated:** [May 18, 2008, 12:26pm UTC](https://www.ruby-forum.com/t/gloc-errors-is-gloc-dead/137921 "2008-05-18T12:26:20Z")

</div>

Does anyone else use GLoc and Rails 2? We are getting lots of errors like this since migrating: ActionView::TemplateError (There is no key called ‘glance\_member\_reviews’ in the participant strings.) on line #22 of fi…

---

## [Select and how to read the api](https://www.ruby-forum.com/t/select-and-how-to-read-the-api/137878)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 10\
**Last updated:** [May 18, 2008, 9:28am UTC](https://www.ruby-forum.com/t/select-and-how-to-read-the-api/137878 "2008-05-18T09:28:06Z")

</div>

I’m trying to understand how to use the select, especially how to make an option selected. I want to add the values manually, but be sure one value is selected when finding an existing post in the db. How are you supp…

---

## [Which problem should I solve?](https://www.ruby-forum.com/t/which-problem-should-i-solve/137918)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 0\
**Last updated:** [May 18, 2008, 8:26am UTC](https://www.ruby-forum.com/t/which-problem-should-i-solve/137918 "2008-05-18T08:26:26Z")

</div>

I’d appreciate all feedback. Thanks! ~ mel

---

## [ActiveRecord model with multiple table?](https://www.ruby-forum.com/t/activerecord-model-with-multiple-table/137903)

<div class="topic-metadata">

**Author:** [@xxdd](https://www.ruby-forum.com/u/xxdd)\
**Replies:** 3\
**Last updated:** [May 18, 2008, 6:55am UTC](https://www.ruby-forum.com/t/activerecord-model-with-multiple-table/137903 "2008-05-18T06:55:09Z")

</div>

Hello. I have large database of old web application (written in php). Want to rewrite in Rails. But here is a problem. My User data is split to 10 Table. named user\_0, user\_1,user\_2 if user.id % 10 = 1 will store to …

---

## [Rake spec:rcov SHOW\_ONLY="app"](https://www.ruby-forum.com/t/rake-spec-rcov-show-only-app/137913)

<div class="topic-metadata">

**Author:** [@Arie\_Kusuma\_A](https://www.ruby-forum.com/u/Arie_Kusuma_A)\
**Replies:** 0\
**Last updated:** [May 18, 2008, 6:51am UTC](https://www.ruby-forum.com/t/rake-spec-rcov-show-only-app/137913 "2008-05-18T06:51:02Z")

</div>

I just know from http://cheat.errtheblog.com/s/rcov how to do spec’ing that excludes ruby libraries we have under vendor directory. So that I can use it happily ever after. rake spec:rcov SHOW\_ONLY=“app” I can explor…

---

## [Authenticating REST Webservices](https://www.ruby-forum.com/t/authenticating-rest-webservices/137901)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 1\
**Last updated:** [May 18, 2008, 4:17am UTC](https://www.ruby-forum.com/t/authenticating-rest-webservices/137901 "2008-05-18T04:17:16Z")

</div>

Hello , I have an app that is RESTful where there is a CMS side and an API side using the same RESTful services, controllers, methods , etc. The issue is that the CMS requires traditional login (through restful\_auth…

---

## [Updating a DB entry without having to instantiate an object](https://www.ruby-forum.com/t/updating-a-db-entry-without-having-to-instantiate-an-object/137894)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 6\
**Last updated:** [May 18, 2008, 4:13am UTC](https://www.ruby-forum.com/t/updating-a-db-entry-without-having-to-instantiate-an-object/137894 "2008-05-18T04:13:10Z")

</div>

Hi, I noticed that in order to use update\_attributes(), AR firsts needs to make a SELECT query to the DB to fetch the data, then AR creates an object from it, and then it issues the UPDATE statement. What I am trying…

---

## [Scope Confusion - Controller iVars in Modules](https://www.ruby-forum.com/t/scope-confusion-controller-ivars-in-modules/137905)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [May 18, 2008, 1:59am UTC](https://www.ruby-forum.com/t/scope-confusion-controller-ivars-in-modules/137905 "2008-05-18T01:59:11Z")

</div>

I’ve created a module to include in a Controller. Basically it works, but I am expecting methods in the module to have access to instance variables from the controller, and that appears to not be the case. Yet, a simp…

---

## [Iterating on a child table (with scope)](https://www.ruby-forum.com/t/iterating-on-a-child-table-with-scope/137906)

<div class="topic-metadata">

**Author:** [@bradleybennett](https://www.ruby-forum.com/u/bradleybennett)\
**Replies:** 0\
**Last updated:** [May 18, 2008, 1:55am UTC](https://www.ruby-forum.com/t/iterating-on-a-child-table-with-scope/137906 "2008-05-18T01:55:15Z")

</div>

I’m having trouble figuring out how to iterate on entries from a table that is not the master table where I have my read\_scope defined. Example: Say I want to list all of the birds that exist in all of the cages with…

---

## [First, above the Rails::Initializer.run block put](https://www.ruby-forum.com/t/first-above-the-rails-initializer-run-block-put/137455)

<div class="topic-metadata">

**Author:** [@amanda](https://www.ruby-forum.com/u/amanda)\
**Replies:** 4\
**Last updated:** [May 18, 2008, 1:53am UTC](https://www.ruby-forum.com/t/first-above-the-rails-initializer-run-block-put/137455 "2008-05-18T01:53:19Z")

</div>

I’m puzzling through these instructions: And I’ve gotten as far as the instructions that read … “First, above the Rails::Initializer.run block put …” but I don’t have any “Rails::Initializer.run” block. Am I mis…

---

## [How to freeze to 2.1.0-RC1?](https://www.ruby-forum.com/t/how-to-freeze-to-2-1-0-rc1/137885)

<div class="topic-metadata">

**Author:** [@Ix\_Quic](https://www.ruby-forum.com/u/Ix_Quic)\
**Replies:** 4\
**Last updated:** [May 17, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/how-to-freeze-to-2-1-0-rc1/137885 "2008-05-17T23:39:07Z")

</div>

What TAG or REVISION number do I use to rake rails:freeze:edge to 2.1.0-RC1? I’ve tried TAG=rel\_2-1-0-RC1 and TAG=rel\_2-0-991, but without success. (I’m on shared hosting, so I can’t just gem install rails easily.) A…

---

## [RoRUIQ â€¦ sort of â€¦ I think â€¦](https://www.ruby-forum.com/t/roruiq-a-sort-of-a-i-think-a/137899)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 17, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/roruiq-a-sort-of-a-i-think-a/137899 "2008-05-17T22:24:33Z")

</div>

Email : removed\_email\_address@domain.invalid As Dr. Nick of the Simpsons sez : Hi Everybody ! I’m working on my 1st Ruby on Rails (RoR) project. It is a web-based application. Unfortunately, I’ve come up against a…

---

## [Attachment\_fu reprocess thumbnails help](https://www.ruby-forum.com/t/attachment-fu-reprocess-thumbnails-help/136454)

<div class="topic-metadata">

**Author:** [@jags](https://www.ruby-forum.com/u/jags)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/attachment-fu-reprocess-thumbnails-help/136454 "2008-05-17T22:14:47Z")

</div>

hello guys i am using attachment\_fu for product images i have hundreds of products and their images with thumbnails :thumbnails =\> { :thumb =\> ‘100x100\>’ } now we have decided to have thumbnails of size 50x50\> only. …

---

## [Threading and Net/Http (Mechanize)](https://www.ruby-forum.com/t/threading-and-net-http-mechanize/137897)

<div class="topic-metadata">

**Author:** [@histrionics](https://www.ruby-forum.com/u/histrionics)\
**Replies:** 0\
**Last updated:** [May 17, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/threading-and-net-http-mechanize/137897 "2008-05-17T21:06:21Z")

</div>

Does anyone ever see alot of errors like this: Exception \`Net::HTTPBadResponse’ at /usr/lib/ruby/1.8/net/http.rb:2022 wrong status line: SOME HTML CODE HERE When using threads and mechanize? I’m relatively certain …

---

## [Validates\_numericality\_of with greater\_than\* less\_than\* simply don't work](https://www.ruby-forum.com/t/validates-numericality-of-with-greater-than-less-than-simply-dont-work/137889)

<div class="topic-metadata">

**Author:** [@ccuilla](https://www.ruby-forum.com/u/ccuilla)\
**Replies:** 12\
**Last updated:** [May 17, 2008, 8:33pm UTC](https://www.ruby-forum.com/t/validates-numericality-of-with-greater-than-less-than-simply-dont-work/137889 "2008-05-17T20:33:29Z")

</div>

It seems that the validations for: greater\_than greater\_than\_or\_equal\_to less\_than less\_than\_or\_equal\_to equal\_to odd even Simply do not work (Rails 2.0.2). I’ve tried every combination I can think of and these …

---

## [File.new variable with extension](https://www.ruby-forum.com/t/file-new-variable-with-extension/137881)

<div class="topic-metadata">

**Author:** [@gorter9](https://www.ruby-forum.com/u/gorter9)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/file-new-variable-with-extension/137881 "2008-05-17T20:24:41Z")

</div>

I ned to create a file of the name of a variable? but i can’t create an extension. File.new((@page.title), ‘w’ ) {|file| file.write( ‘testfile’ )} how can i maka a extension like this File.new((@page.title.txt), ‘w’ …

---

## [Multiple images\_submit\_tag \*all\* "names" are given as parameters](https://www.ruby-forum.com/t/multiple-images-submit-tag-all-names-are-given-as-parameters/137564)

<div class="topic-metadata">

**Author:** [@jkahn](https://www.ruby-forum.com/u/jkahn)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/multiple-images-submit-tag-all-names-are-given-as-parameters/137564 "2008-05-17T20:19:24Z")

</div>

I have a form like so: \<% form\_remote\_tag(:url =\> { :action =\> :foo}, :complete =\> “do\_some\_cool\_ajax(request);”) do %\> \<%= text\_field\_tag :myInput, params\[:myInput\], :size =\> 80 %\> \<%= submit\_tag "do function 1"…

---

## [Attachment\_fu, how would you test this?](https://www.ruby-forum.com/t/attachment-fu-how-would-you-test-this/137884)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/attachment-fu-how-would-you-test-this/137884 "2008-05-17T16:34:21Z")

</div>

Hi, i’m starting to go nuts because of this. i’m playing with attachment\_fu, everything is ok, but i also want to put everything under test too. Actually i’ve a post, where you can upload images, and it works. But now…

---

## [Ruby 1.9 on Rails 2.x?](https://www.ruby-forum.com/t/ruby-1-9-on-rails-2-x/137882)

<div class="topic-metadata">

**Author:** [@Jaume\_ArSSSSs](https://www.ruby-forum.com/u/Jaume_ArSSSSs)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/ruby-1-9-on-rails-2-x/137882 "2008-05-17T15:53:48Z")

</div>

¿What about ruby 1.9 and rails 2.x? ¿Does some one know if there is a migration plan on works?

---

## [Testing using an existing test database](https://www.ruby-forum.com/t/testing-using-an-existing-test-database/137852)

<div class="topic-metadata">

**Author:** [@noreaster](https://www.ruby-forum.com/u/noreaster)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 2:59pm UTC](https://www.ruby-forum.com/t/testing-using-an-existing-test-database/137852 "2008-05-17T14:59:07Z")

</div>

Ruby N. alert… I tried searching for an answer for this question, but the search criteria weren’t very apparent. Here goes: If you want to use an existing database to run your unit tests against, how do you do that?…

---

## [Simple Captcha](https://www.ruby-forum.com/t/simple-captcha/137877)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 0\
**Last updated:** [May 17, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/simple-captcha/137877 "2008-05-17T12:57:28Z")

</div>

Hi! Guys I am using simple\_captcha for login system. But I have no idea about making the captcha refreshable. As I am new to RoR. Please help me.

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

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