# Rails

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

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

---

## [Efficient Concurrency?](https://www.ruby-forum.com/t/efficient-concurrency/175800)

<div class="topic-metadata">

**Author:** [@Florian\_Dejako](https://www.ruby-forum.com/u/Florian_Dejako)\
**Replies:** 7\
**Last updated:** [September 21, 2009, 6:48pm UTC](https://www.ruby-forum.com/t/efficient-concurrency/175800 "2009-09-21T18:48:29Z")

</div>

My app sends out activation keys from a list of unassigned keys to customers. An appropriate model action in the activation key model would look something like this: named\_scope :available, :conditions =\> ‘available I…

---

## [Keeping format in link\_to](https://www.ruby-forum.com/t/keeping-format-in-link-to/175854)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 1\
**Last updated:** [September 21, 2009, 6:19pm UTC](https://www.ruby-forum.com/t/keeping-format-in-link-to/175854 "2009-09-21T18:19:15Z")

</div>

Hello, if a action/id.something is called with the link\_to urls don’t keep the format ? I mean the link\_to calls inside the view don’t maintain the .something and generate unformatted links How can I do to keep the fo…

---

## [State machines and parsing texts](https://www.ruby-forum.com/t/state-machines-and-parsing-texts/175855)

<div class="topic-metadata">

**Author:** [@Fifigyuri](https://www.ruby-forum.com/u/Fifigyuri)\
**Replies:** 1\
**Last updated:** [September 21, 2009, 5:47pm UTC](https://www.ruby-forum.com/t/state-machines-and-parsing-texts/175855 "2009-09-21T17:47:06Z")

</div>

Hi, although my question is not just rails specific, I think it fits this discussion more than the ruby discussion. I found a state machine package very useful (http:// statemachine.rubyforge.org/). I do not know any …

---

## [MethodNotAllowed](https://www.ruby-forum.com/t/methodnotallowed/175797)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/methodnotallowed/175797 "2009-09-21T17:06:03Z")

</div>

I am trying to develop an application that allows users to submit articles and add information about the references they used when citing facts. I have the sources broken down into types, such as books, periodicals, …

---

## [Really stuck on nested resources](https://www.ruby-forum.com/t/really-stuck-on-nested-resources/175731)

<div class="topic-metadata">

**Author:** [@mlittle](https://www.ruby-forum.com/u/mlittle)\
**Replies:** 10\
**Last updated:** [September 21, 2009, 4:27pm UTC](https://www.ruby-forum.com/t/really-stuck-on-nested-resources/175731 "2009-09-21T16:27:25Z")

</div>

I have nested resources 2 levels deep and am having problems with the controller of the deepest resource; Parent \> Child \> Dog The rails guide says this for the forms, which seems to work fine: form\_for \[:parent, :ch…

---

## [Current best approach for Sending Files (streaming files e.g. images) in rails?](https://www.ruby-forum.com/t/current-best-approach-for-sending-files-streaming-files-e-g-images-in-rails/175824)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 2:43pm UTC](https://www.ruby-forum.com/t/current-best-approach-for-sending-files-streaming-files-e-g-images-in-rails/175824 "2009-09-21T14:43:39Z")

</div>

Hi, Q1 - What’s the current most popular approach (plugin/gem or otherwise) for sending files / streaming files (e.g. images) back to a browser? Q2 - Noting I’m on Dreamhost.com on a shared environment (so don’t get …

---

## [Subclasses\_of different result in second call](https://www.ruby-forum.com/t/subclasses-of-different-result-in-second-call/175848)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 21, 2009, 2:12pm UTC](https://www.ruby-forum.com/t/subclasses-of-different-result-in-second-call/175848 "2009-09-21T14:12:49Z")

</div>

Hi, I m using the following code to get all submodels of an sti model: Dir.glob(RAILS\_ROOT + ‘/app/models/\*.rb’).each { |file| require file} sub\_models = Object.subclasses\_of(sti\_model) That works perfect in my dev e…

---

## [Rails for large scale app with SOAP and cron jobs?](https://www.ruby-forum.com/t/rails-for-large-scale-app-with-soap-and-cron-jobs/175849)

<div class="topic-metadata">

**Author:** [@Sebastian\_von\_Conra](https://www.ruby-forum.com/u/Sebastian_von_Conra)\
**Replies:** 0\
**Last updated:** [September 21, 2009, 1:11pm UTC](https://www.ruby-forum.com/t/rails-for-large-scale-app-with-soap-and-cron-jobs/175849 "2009-09-21T13:11:23Z")

</div>

Hi everyone, I’m looking into alternative technologies for an application at work, where the current one is failing. I have some experience with Rails and always liked it, and am wondering if it could be feasible for …

---

## [How to get value from link\_to\_remote's :with paramenter?](https://www.ruby-forum.com/t/how-to-get-value-from-link-to-remotes-with-paramenter/175717)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 12\
**Last updated:** [September 21, 2009, 11:38am UTC](https://www.ruby-forum.com/t/how-to-get-value-from-link-to-remotes-with-paramenter/175717 "2009-09-21T11:38:47Z")

</div>

Hello, I have following code in my view #plan\_discount %table %tr %td =“Discount Code” %td =text\_field\_tag ‘discount\_code’ %td =link\_to\_remote “Apply”, :update =\> “result”, :url =\> { :action =\> “discount\_code”}…

---

## [A security related question](https://www.ruby-forum.com/t/a-security-related-question/175823)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 3\
**Last updated:** [September 21, 2009, 11:24am UTC](https://www.ruby-forum.com/t/a-security-related-question/175823 "2009-09-21T11:24:51Z")

</div>

Hi, I’m running restful\_authentication plugin on my projects. When we login to the app the contents for the form that the login sends are clearly available for anyone sniffing traffic. For example locally I can see t…

---

## [Rubygems 1.3.5 thinks it's 1.3.1](https://www.ruby-forum.com/t/rubygems-1-3-5-thinks-its-1-3-1/175793)

<div class="topic-metadata">

**Author:** [@Arthaey\_Angosii](https://www.ruby-forum.com/u/Arthaey_Angosii)\
**Replies:** 3\
**Last updated:** [September 21, 2009, 10:37am UTC](https://www.ruby-forum.com/t/rubygems-1-3-5-thinks-its-1-3-1/175793 "2009-09-21T10:37:20Z")

</div>

I upgraded to Rails to 2.3.4, and now some things aren’t working in a freshly created Rails project. For example: $ script/plugin -l Rails requires RubyGems \>= 1.3.2 (you have 1.3.1). Please gem update --system and tr…

---

## [How to: redirect\_to through a folder hierarchy (upwards)](https://www.ruby-forum.com/t/how-to-redirect-to-through-a-folder-hierarchy-upwards/175786)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 5\
**Last updated:** [September 21, 2009, 10:37am UTC](https://www.ruby-forum.com/t/how-to-redirect-to-through-a-folder-hierarchy-upwards/175786 "2009-09-21T10:37:00Z")

</div>

Hi there, how do I tell the current controller correctly to redirect\_to an action of another controller that is 1 level higher in the folder hierarchy than the current controller? How I have tried: Within the current…

---

## [Pagination issue](https://www.ruby-forum.com/t/pagination-issue/175795)

<div class="topic-metadata">

**Author:** [@little\_kostas](https://www.ruby-forum.com/u/little_kostas)\
**Replies:** 5\
**Last updated:** [September 21, 2009, 10:30am UTC](https://www.ruby-forum.com/t/pagination-issue/175795 "2009-09-21T10:30:23Z")

</div>

Hi guys! I am using will\_paginate in my rails application. I want to merge these 2 lines in one: @cat\_products1 = Product.find(:all, :conditions =\> {:category\_id =\> params\[:id\]}) @cat\_products2 = Product.paginate(:p…

---

## [Date localization](https://www.ruby-forum.com/t/date-localization/175819)

<div class="topic-metadata">

**Author:** [@arwed](https://www.ruby-forum.com/u/arwed)\
**Replies:** 5\
**Last updated:** [September 21, 2009, 10:22am UTC](https://www.ruby-forum.com/t/date-localization/175819 "2009-09-21T10:22:46Z")

</div>

Hi, I have a model with start\_date and end\_date and a helper: def period “#{start\_date} - #{end\_date}” end in my view I have: \<%= f.collection\_select :schedule\_id, @convention.schedules, :id, :period, {:selected =\>…

---

## [What is the Best Merchant Account?](https://www.ruby-forum.com/t/what-is-the-best-merchant-account/175843)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 0\
**Last updated:** [September 21, 2009, 10:02am UTC](https://www.ruby-forum.com/t/what-is-the-best-merchant-account/175843 "2009-09-21T10:02:04Z")

</div>

Hi All, I want to do following things on my site please suggest what is the best thing to do it. 1\] I want to recieve amount for the buyer. Buyer has following 3 options to make the payment a) PayPal b) Credit Card …

---

## [\[Authlogic\]](https://www.ruby-forum.com/t/authlogic/175825)

<div class="topic-metadata">

**Author:** [@Lb2007](https://www.ruby-forum.com/u/Lb2007)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 9:50am UTC](https://www.ruby-forum.com/t/authlogic/175825 "2009-09-21T09:50:34Z")

</div>

After I upgraded my Authlogic to 2.1.2 I’m facing an odd error when trying to use my webpage; it comes up with an error ‘undefined method \`^’ for “e”:String’. I’ve double checked the lines in the Authlogic code (see c…

---

## [Add a lang param in routes](https://www.ruby-forum.com/t/add-a-lang-param-in-routes/175777)

<div class="topic-metadata">

**Author:** [@dddennisdennis734](https://www.ruby-forum.com/u/dddennisdennis734)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 8:02am UTC](https://www.ruby-forum.com/t/add-a-lang-param-in-routes/175777 "2009-09-21T08:02:50Z")

</div>

Hi, What kind of edition can we do to add a language parameter in thoses routes: ActionController::Routing::Routes.draw do |map| map.resource :user\_session map.resources :users map.resources :posts, :has\_many =\> :c…

---

## [\`observer' for AccountController:Class"](https://www.ruby-forum.com/t/observer-for-accountcontroller-class/175839)

<div class="topic-metadata">

**Author:** [@fireflyman](https://www.ruby-forum.com/u/fireflyman)\
**Replies:** 1\
**Last updated:** [September 21, 2009, 7:24am UTC](https://www.ruby-forum.com/t/observer-for-accountcontroller-class/175839 "2009-09-21T07:24:48Z")

</div>

hi, I’ve just changed to rails 2.0 and got “undefined method \`observer’ for AccountController:Class” What can i do for this problem?

---

## [What's the Right Rails Prologue for a Standalone Program](https://www.ruby-forum.com/t/whats-the-right-rails-prologue-for-a-standalone-program/175827)

<div class="topic-metadata">

**Author:** [@ddoherty03](https://www.ruby-forum.com/u/ddoherty03)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 5:42am UTC](https://www.ruby-forum.com/t/whats-the-right-rails-prologue-for-a-standalone-program/175827 "2009-09-21T05:42:56Z")

</div>

I am trying to write a small program to exercise certain of my Rails classes without having to go through a browser. I have a file that like this: ########### filer\_convert.rb ################# require File.dirname(F…

---

## [Is there a ruby on rails framework/app that would be a good starting point for these requirements?](https://www.ruby-forum.com/t/is-there-a-ruby-on-rails-framework-app-that-would-be-a-good-starting-point-for-these-requirements/175809)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [September 21, 2009, 2:45am UTC](https://www.ruby-forum.com/t/is-there-a-ruby-on-rails-framework-app-that-would-be-a-good-starting-point-for-these-requirements/175809 "2009-09-21T02:45:34Z")

</div>

Hi, Just wondering whether there is an existing open source Ruby on Rails app that would be a good starting point for doing this: want a backend web application/service that has an API to allow a desktop client appl…

---

## [Render :partial =\> @object](https://www.ruby-forum.com/t/render-partial-object/175804)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 13\
**Last updated:** [September 20, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/render-partial-object/175804 "2009-09-20T23:31:13Z")

</div>

Running rails 2.1.0 when I do this: \<%= render :partial =\> ‘style’, :collection =\> @styles %\> I get the collection fine in my index file. When I try the shortcut: \<%= render :partial @styles %\> I get this error: C…

---

## [Polymorphic STI with associations](https://www.ruby-forum.com/t/polymorphic-sti-with-associations/175627)

<div class="topic-metadata">

**Author:** [@eric](https://www.ruby-forum.com/u/eric)\
**Replies:** 7\
**Last updated:** [September 20, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/polymorphic-sti-with-associations/175627 "2009-09-20T20:09:55Z")

</div>

I have been working on a polymorphic STI schema where the inheriting classes have associations: class Asset \< ActiveRecord::Base end class Sound \< Asset belongs\_to :user, :polymorphic =\> true end class User \< Acti…

---

## [Blowfish crypt in rails app](https://www.ruby-forum.com/t/blowfish-crypt-in-rails-app/175768)

<div class="topic-metadata">

**Author:** [@mahesh\_s](https://www.ruby-forum.com/u/mahesh_s)\
**Replies:** 3\
**Last updated:** [September 20, 2009, 7:11pm UTC](https://www.ruby-forum.com/t/blowfish-crypt-in-rails-app/175768 "2009-09-20T19:11:41Z")

</div>

HI Im creating a rails app using blowfish encryption and decryption, in my app i have included a gem crypt for doing a encryption and im trying to decrypt the result using blowfish.js is that possible to do that e…

---

## [Mysql Can't Connect](https://www.ruby-forum.com/t/mysql-cant-connect/175449)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [September 20, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/mysql-cant-connect/175449 "2009-09-20T19:00:50Z")

</div>

I’m on OS X 10.5.8 with the up-to-date Rails. I’m trying to get restful\_authentication to work, but I keep getting a mysql error. I’ve done the re-install mysql thing. \[terminal\] =\> Booting Mongrel =\> Rails 2.3.2 ap…

---

## [Partial wont render .html.erb](https://www.ruby-forum.com/t/partial-wont-render-html-erb/175783)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 6\
**Last updated:** [September 20, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/partial-wont-render-html-erb/175783 "2009-09-20T18:58:29Z")

</div>

Hi, My partial simply wont render a .html.erb file. This is exactly what I get on the error screen: ActionView::MissingTemplate in Categories#show Showing app/views/categories/show.html.erb where line #7 raised: Miss…

---

## [Rake tasks](https://www.ruby-forum.com/t/rake-tasks/175814)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 1\
**Last updated:** [September 20, 2009, 6:55pm UTC](https://www.ruby-forum.com/t/rake-tasks/175814 "2009-09-20T18:55:34Z")

</div>

I’m not really creating a rails app, but may integrate this with rails down the road. I’ve adapted rss2mysql.rb from: Practical Ruby Gems http://www.apress.com/book/view/9781590598115 Chapter 10, parsing feeds but …

---

## [Find with join over aggregated](https://www.ruby-forum.com/t/find-with-join-over-aggregated/175358)

<div class="topic-metadata">

**Author:** [@bitrocker](https://www.ruby-forum.com/u/bitrocker)\
**Replies:** 1\
**Last updated:** [September 20, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/find-with-join-over-aggregated/175358 "2009-09-20T16:25:42Z")

</div>

Hi, I want to get a query mapped to an ActiveRecord model, but face problems. Here is what the query (for e.g. user.id = 2) could look like: SELECT \* FROM music LEFT OUTER JOIN ( SELECT MIN( taggings.created\_at ) …

---

## [Coordinates for geokit](https://www.ruby-forum.com/t/coordinates-for-geokit/175807)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 3\
**Last updated:** [September 20, 2009, 2:21pm UTC](https://www.ruby-forum.com/t/coordinates-for-geokit/175807 "2009-09-20T14:21:38Z")

</div>

i’m trying geokit and loving it, but i’m seeing really odd stuff on distances, I’m wondering about the coordinates i’ve got in my DB. I don’t think they’re standard format, they look like this. east 6’41.6 north 45’24…

---

## [Stream rubyzip](https://www.ruby-forum.com/t/stream-rubyzip/105439)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 2\
**Last updated:** [September 20, 2009, 2:12pm UTC](https://www.ruby-forum.com/t/stream-rubyzip/105439 "2009-09-20T14:12:34Z")

</div>

I have a Rails app that needs to create a Zip archive of a folder and send it to the client’s browser for download. I have no need for the Zip file on disk, so ideally, the Zip is created and streamed “on the fly”. Is…

---

## [Simplest CMS design question](https://www.ruby-forum.com/t/simplest-cms-design-question/175813)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [September 20, 2009, 1:24pm UTC](https://www.ruby-forum.com/t/simplest-cms-design-question/175813 "2009-09-20T13:24:16Z")

</div>

Hi all, What would be the best design if I wanted a RubyOnRails basic CMS that would allow HTML/images to be uploaded and viewed by users who were allowed to see them. In particular what would be a good / robust way …

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

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