# Rails

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

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

---

## [Extending a Model that is in a plugin](https://www.ruby-forum.com/t/extending-a-model-that-is-in-a-plugin/184208)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 8\
**Last updated:** [March 8, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/extending-a-model-that-is-in-a-plugin/184208 "2010-03-08T21:04:26Z")

</div>

I have several apps that share common base models which I am coding into a plugin, but each app may need to add some additional code or override some code in the plugin model. One of the main differences is that I use…

---

## [Clearance issues](https://www.ruby-forum.com/t/clearance-issues/184798)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/clearance-issues/184798 "2010-03-08T20:57:05Z")

</div>

I’m really trying to use bundler, but I seem to be running into way more problems then it seems worth. Now, this issue I’m having might not be related directly to bundler, but I can’t figure out what else could be cau…

---

## [Datatype error in ROR](https://www.ruby-forum.com/t/datatype-error-in-ror/184704)

<div class="topic-metadata">

**Author:** [@mamathahl](https://www.ruby-forum.com/u/mamathahl)\
**Replies:** 8\
**Last updated:** [March 8, 2010, 7:56pm UTC](https://www.ruby-forum.com/t/datatype-error-in-ror/184704 "2010-03-08T19:56:31Z")

</div>

I have been facing some problem with the datatypes. I have a sample of code as follows. t.lat\_rad = (l.lat \* BigDecimal.new(“3.1415926536 / 180”)).to\_f t.lng\_rad = (l.lng \* BigDecimal.new(“3.1415926536 / 180”)).to\_f …

---

## [Scaffolding for nested models](https://www.ruby-forum.com/t/scaffolding-for-nested-models/184793)

<div class="topic-metadata">

**Author:** [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 7:48pm UTC](https://www.ruby-forum.com/t/scaffolding-for-nested-models/184793 "2010-03-08T19:48:17Z")

</div>

Hi, I’m developing application that contains many nested models. Can I use scaffolding command to generate the application nested models instead of manually creating the complex nested models?

---

## [Connecting to sessions table in another database](https://www.ruby-forum.com/t/connecting-to-sessions-table-in-another-database/184705)

<div class="topic-metadata">

**Author:** [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 7:35pm UTC](https://www.ruby-forum.com/t/connecting-to-sessions-table-in-another-database/184705 "2010-03-08T19:35:27Z")

</div>

I have two applications, appA and appB. I want to use single sign on for both the apps. Meaning, if a user logs in to appA, he dont have to login to appB and conversely, if a user logged out of appA, it logs him out o…

---

## [Searching based on the return values of instance methods](https://www.ruby-forum.com/t/searching-based-on-the-return-values-of-instance-methods/183794)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 4\
**Last updated:** [March 8, 2010, 6:56pm UTC](https://www.ruby-forum.com/t/searching-based-on-the-return-values-of-instance-methods/183794 "2010-03-08T18:56:14Z")

</div>

Can I use something like searchlogic to search for objects based on the return values of instance methods? E.g., I’d like to search for users of a certain “age” but age is not a column, it’s an instance method, retur…

---

## [Nested Resources + Namespace + Friendly URL](https://www.ruby-forum.com/t/nested-resources-namespace-friendly-url/184790)

<div class="topic-metadata">

**Author:** [@Ronald\_Rails](https://www.ruby-forum.com/u/Ronald_Rails)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/nested-resources-namespace-friendly-url/184790 "2010-03-08T18:55:03Z")

</div>

Hi, all In my rails app I have a controller called Dashboard::MenusController with a namespace dashboard. I have a model Company too, where its has\_many :menus So, I have the code above in my route.rb map.namespace…

---

## [Stack level too deep, alias\_method\_chain and an alternative](https://www.ruby-forum.com/t/stack-level-too-deep-alias-method-chain-and-an-alternative/184789)

<div class="topic-metadata">

**Author:** [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/stack-level-too-deep-alias-method-chain-and-an-alternative/184789 "2010-03-08T18:50:22Z")

</div>

Hi I’ve been running into some weird behavior with our engine app. Latest Rails, latest Engines plugin. When turning config.reload\_plugins = true, the first request to our application runs fine, then we get an error,…

---

## [Better way to concatenate options to collection\_select?](https://www.ruby-forum.com/t/better-way-to-concatenate-options-to-collection-select/184741)

<div class="topic-metadata">

**Author:** [@oshanter](https://www.ruby-forum.com/u/oshanter)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 6:35pm UTC](https://www.ruby-forum.com/t/better-way-to-concatenate-options-to-collection-select/184741 "2010-03-08T18:35:44Z")

</div>

I’ve just been through 4 pages of similar threads, but nothing quite satisfying. What I’m trying to achieve: Please select ALL Forum 1 Forum 2 ... The way I’m currently doing it: Plugin class FakeModel d…

---

## [Need some meta-programming for a Rails app](https://www.ruby-forum.com/t/need-some-meta-programming-for-a-rails-app/184468)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 6:24pm UTC](https://www.ruby-forum.com/t/need-some-meta-programming-for-a-rails-app/184468 "2010-03-08T18:24:01Z")

</div>

I’m adding a layout to my app that I found at Ruby on Rails - Layouts | Tutorialspoint. They have a piece that ultimately feeds data into a sidebar: class BookController \< ApplicationController layout ‘standard’ def…

---

## [Routing problem, I think](https://www.ruby-forum.com/t/routing-problem-i-think/184512)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 7\
**Last updated:** [March 8, 2010, 6:10pm UTC](https://www.ruby-forum.com/t/routing-problem-i-think/184512 "2010-03-08T18:10:33Z")

</div>

I’ve got a Rails app that brings up a Home page, which includes a Vendor link. Clicking on that link I get ===========Web page start ======== NameError in VendorController#index uninitialized constant VendorControl…

---

## [Downloading a file from a remote server?](https://www.ruby-forum.com/t/downloading-a-file-from-a-remote-server/184783)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 5:05pm UTC](https://www.ruby-forum.com/t/downloading-a-file-from-a-remote-server/184783 "2010-03-08T17:05:35Z")

</div>

I am using the Paperclip plugin to store video attachments into a remote server (via an ftp storage module written by Damian Caruso) it works well… Now I would like my web app user to be able to download back this a…

---

## [Wits end..."cross-thread violation on rb\_gc()"](https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 4:42pm UTC](https://www.ruby-forum.com/t/wits-end-cross-thread-violation-on-rb-gc/184173 "2010-03-08T16:42:56Z")

</div>

I had crazy issues getting the mysql gem working properly and after hours of trying to get it run I decided to reinstall my whole Ruby / Rails / Gems setup. Previously had macports versions of everything installed, we…

---

## [How to change a text field's contents to all uppercase letter](https://www.ruby-forum.com/t/how-to-change-a-text-fields-contents-to-all-uppercase-letter/184642)

<div class="topic-metadata">

**Author:** [@xxdesmus](https://www.ruby-forum.com/u/xxdesmus)\
**Replies:** 22\
**Last updated:** [March 8, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/how-to-change-a-text-fields-contents-to-all-uppercase-letter/184642 "2010-03-08T15:34:51Z")

</div>

Hi, I’m relatively new to RoR so pardon if this is a really stupid question. I have a text field where people will be entering a username. I need to figure out a way to either validate the field so that it will not …

---

## [Betternestedset in rails 3.0](https://www.ruby-forum.com/t/betternestedset-in-rails-3-0/184776)

<div class="topic-metadata">

**Author:** [@vmvipin](https://www.ruby-forum.com/u/vmvipin)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 2:16pm UTC](https://www.ruby-forum.com/t/betternestedset-in-rails-3-0/184776 "2010-03-08T14:16:00Z")

</div>

Hi Guys, when i upgraded my rails 2.3.4 to 3.0 my betternestedset is not working. It was working fine in the older version. This is my controller def new cat = Category.new cat.text=‘test’ cat.save cat.move\_to\_chi…

---

## [:joins help](https://www.ruby-forum.com/t/joins-help/184770)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 7\
**Last updated:** [March 8, 2010, 1:07pm UTC](https://www.ruby-forum.com/t/joins-help/184770 "2010-03-08T13:07:55Z")

</div>

Dear all @policy\_logs = PolicyLog.find(:all,:joins =\> “INNER JOIN po licy\_logs\_receiver” ) when i inspect the @policy\_logs variable it doesnot show the joined table fields… how can …

---

## [Reporting](https://www.ruby-forum.com/t/reporting/184769)

<div class="topic-metadata">

**Author:** [@saboor](https://www.ruby-forum.com/u/saboor)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/reporting/184769 "2010-03-08T12:13:10Z")

</div>

Hi, i am a new ruby on rails user. while in my project, i have displayed some data from db in tabular form contain a header , body and footer. now there is a print page option. so when i print the data (consist of 4…

---

## [Array of check boxes and html warning](https://www.ruby-forum.com/t/array-of-check-boxes-and-html-warning/184749)

<div class="topic-metadata">

**Author:** [@colinloretz](https://www.ruby-forum.com/u/colinloretz)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 11:10am UTC](https://www.ruby-forum.com/t/array-of-check-boxes-and-html-warning/184749 "2010-03-08T11:10:51Z")

</div>

Hi I am using something like the following code to show an array of checkboxes within a form \<% @froglets.each do |froglet| -%\> \<%= check\_box\_tag “note\[froglet\_ids\]\[\]”, froglet.id %\> \<%= h froglet.name %\> \<% end %\>…

---

## [Where can I read about f.submit?](https://www.ruby-forum.com/t/where-can-i-read-about-f-submit/184755)

<div class="topic-metadata">

**Author:** [@0ffh](https://www.ruby-forum.com/u/0ffh)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 10:42am UTC](https://www.ruby-forum.com/t/where-can-i-read-about-f-submit/184755 "2010-03-08T10:42:11Z")

</div>

Hi, ror newbie here. I guess this is more of a “how do I get information” question than anything. The generator inserts f.submit statements in forms and I’m looking at the documentation for submit but can’t find it …

---

## [Similar controller::layout functionality](https://www.ruby-forum.com/t/similar-controller-layout-functionality/184763)

<div class="topic-metadata">

**Author:** [@anler](https://www.ruby-forum.com/u/anler)\
**Replies:** 1\
**Last updated:** [March 8, 2010, 10:07am UTC](https://www.ruby-forum.com/t/similar-controller-layout-functionality/184763 "2010-03-08T10:07:38Z")

</div>

hi folks, I need help with something, I got a controller and I want be able to use a class method defined in ApplicationController as I do with (let say) the ‘layout’ function I’m new in Rails and Ruby but I know enou…

---

## [Dynamically Defined URLs on S3](https://www.ruby-forum.com/t/dynamically-defined-urls-on-s3/184754)

<div class="topic-metadata">

**Author:** [@sandy](https://www.ruby-forum.com/u/sandy)\
**Replies:** 1\
**Last updated:** [March 8, 2010, 9:06am UTC](https://www.ruby-forum.com/t/dynamically-defined-urls-on-s3/184754 "2010-03-08T09:06:11Z")

</div>

I realize that S3 buckets do not contain folders, but that they do permit the use of filenames which contain the “/” character, thereby giving the appearance of folders (“pseudofolders”). I want to be able to save fi…

---

## [Simulate activity of users?](https://www.ruby-forum.com/t/simulate-activity-of-users/184675)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 2\
**Last updated:** [March 8, 2010, 8:58am UTC](https://www.ruby-forum.com/t/simulate-activity-of-users/184675 "2010-03-08T08:58:35Z")

</div>

Hello, I’ve got a web application that should simulate different activities as follows: User1 and User2 teamed up for an activity called Activity1. Users have skills: skill1, skill2 def simulate\_activity a = Activi…

---

## [MD5 wrong number of arguments (1 for 0) Error](https://www.ruby-forum.com/t/md5-wrong-number-of-arguments-1-for-0-error/184757)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 0\
**Last updated:** [March 8, 2010, 7:15am UTC](https://www.ruby-forum.com/t/md5-wrong-number-of-arguments-1-for-0-error/184757 "2010-03-08T07:15:09Z")

</div>

Hi All, I have following error on my Server which is working properly on my local on following line . event\_id = MD5.new(“event-init-flash-#{Asteroid::now}”).to\_s #line 232 ERROR: wrong number of arguments (1 for 0) …

---

## [Plugins within plugins](https://www.ruby-forum.com/t/plugins-within-plugins/184751)

<div class="topic-metadata">

**Author:** [@tristan](https://www.ruby-forum.com/u/tristan)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 5:38am UTC](https://www.ruby-forum.com/t/plugins-within-plugins/184751 "2010-03-08T05:38:25Z")

</div>

Hi all I have a plugin which itself needs to load some plugins from its own vendor/plugins directory. I’ve spent half of this morning Googling about for answers but I haven’t found anything suitable yet. I’ve been l…

---

## [MySQL connection collation](https://www.ruby-forum.com/t/mysql-connection-collation/147661)

<div class="topic-metadata">

**Author:** [@viciu](https://www.ruby-forum.com/u/viciu)\
**Replies:** 3\
**Last updated:** [March 8, 2010, 4:14am UTC](https://www.ruby-forum.com/t/mysql-connection-collation/147661 "2010-03-08T04:14:25Z")

</div>

Hi! I have ran on problem with collations. In database.yml I have set: encoding: utf8, but when in console run: ActiveRecord::Base.connection.collation =\> “latin1\_swedish\_ci” It is Rails 2.1, mysql gem 2.7, mysq…

---

## [Display human readable time](https://www.ruby-forum.com/t/display-human-readable-time/184719)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 4\
**Last updated:** [March 8, 2010, 3:13am UTC](https://www.ruby-forum.com/t/display-human-readable-time/184719 "2010-03-08T03:13:50Z")

</div>

Hi everyone. Does anybody know a good plugin for displaying a human readable time. I like the ones on github. Django also has this built in, but I can not find it for rails. Can anybody tell me a good plugin for this? …

---

## [Undefined method on web and not in irb](https://www.ruby-forum.com/t/undefined-method-on-web-and-not-in-irb/184744)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 6\
**Last updated:** [March 7, 2010, 11:15pm UTC](https://www.ruby-forum.com/t/undefined-method-on-web-and-not-in-irb/184744 "2010-03-07T23:15:48Z")

</div>

Hi all I seem to have a small problem in Rails. Lets say I have a class Foo with an habtm association to Bar. So Foo has\_and\_belongs\_to Bars en vice versa. Now, when I do lets say Foo.new Foo.bars, I get an undefin…

---

## [Upgrading rails project - version 1.2.6 to current (2.3.5)](https://www.ruby-forum.com/t/upgrading-rails-project-version-1-2-6-to-current-2-3-5/184747)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 1\
**Last updated:** [March 7, 2010, 10:34pm UTC](https://www.ruby-forum.com/t/upgrading-rails-project-version-1-2-6-to-current-2-3-5/184747 "2010-03-07T22:34:05Z")

</div>

Can anyone please advise me what is involved in up grading a project from version 1.2.6 to current (2.3.5). The project is pretty much vanilla code and does not use plugins. Are there scripts that can do the job (or p…

---

## [Database push/pull](https://www.ruby-forum.com/t/database-push-pull/184730)

<div class="topic-metadata">

**Author:** [@DanC](https://www.ruby-forum.com/u/DanC)\
**Replies:** 3\
**Last updated:** [March 7, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/database-push-pull/184730 "2010-03-07T22:11:15Z")

</div>

Hi, I have two apps which are independent but I now would like to help them talk to each other. Specifically I would like to allow users registering to one site to be able to have an account created at the other auto…

---

## [Parsing XML file with no style info with Hpricot](https://www.ruby-forum.com/t/parsing-xml-file-with-no-style-info-with-hpricot/184725)

<div class="topic-metadata">

**Author:** [@allanium](https://www.ruby-forum.com/u/allanium)\
**Replies:** 8\
**Last updated:** [March 7, 2010, 9:56pm UTC](https://www.ruby-forum.com/t/parsing-xml-file-with-no-style-info-with-hpricot/184725 "2010-03-07T21:56:02Z")

</div>

Hello, I’ve been trying for hours to parse an XML using Hpricot. Usually it’s not a problem. Here’s my simple code: #This works and outputs the proper xml data @url1 = ‘http://www.sportingnews.com/stories/sportingnew…

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

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