# Rails

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

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

---

## [RJS & increment variable - this is an interesting one](https://www.ruby-forum.com/t/rjs-increment-variable-this-is-an-interesting-one/88469)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 2\
**Last updated:** [March 21, 2007, 11:00am UTC](https://www.ruby-forum.com/t/rjs-increment-variable-this-is-an-interesting-one/88469 "2007-03-21T11:00:48Z")

</div>

Hi: I have a small piece of code I’m injecting into a page using a partial and RJS. Trick is, the code I’m injecting is a form field, and the id needs to have a digit at the end of it so I can grab it when I submit …

---

## [Rake db:migrate equivalent for java](https://www.ruby-forum.com/t/rake-db-migrate-equivalent-for-java/89001)

<div class="topic-metadata">

**Author:** [@Ben\_Warner](https://www.ruby-forum.com/u/Ben_Warner)\
**Replies:** 4\
**Last updated:** [March 21, 2007, 10:37am UTC](https://www.ruby-forum.com/t/rake-db-migrate-equivalent-for-java/89001 "2007-03-21T10:37:21Z")

</div>

Hiya all, I’m working as a Java developer, but trying out ruby in my spare time. I really like the db:migrate functionality in rake. I was wondering if anyone knows of a java/ant equivalent for a java setup. Regards…

---

## [Need immediate help on file uploading](https://www.ruby-forum.com/t/need-immediate-help-on-file-uploading/89561)

<div class="topic-metadata">

**Author:** [@Kushan\_J](https://www.ruby-forum.com/u/Kushan_J)\
**Replies:** 1\
**Last updated:** [March 21, 2007, 10:03am UTC](https://www.ruby-forum.com/t/need-immediate-help-on-file-uploading/89561 "2007-03-21T10:03:45Z")

</div>

Hi Guys i’ll give you my model, controller(not entire one) and view that i already have model class MetroUpload \< ActiveRecord::Base def self.save(metro\_upload) File.open(“Metro\_SQL/#{metro\_upload\[‘name’\]}/metro.s…

---

## [Error tu display image](https://www.ruby-forum.com/t/error-tu-display-image/89560)

<div class="topic-metadata">

**Author:** [@hasana](https://www.ruby-forum.com/u/hasana)\
**Replies:** 0\
**Last updated:** [March 21, 2007, 10:00am UTC](https://www.ruby-forum.com/t/error-tu-display-image/89560 "2007-03-21T10:00:43Z")

</div>

this regcounselor\_controller def new @regcounselor = Regcounselor.new end def create @regcounselor = Regcounselor.new(params\[:regcounselor\]) if @regcounselor.save flash\[:notice\] = ‘Regcounselor was successfully cr…

---

## [Storing a remotely fetched Tempfile](https://www.ruby-forum.com/t/storing-a-remotely-fetched-tempfile/89556)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [March 21, 2007, 8:34am UTC](https://www.ruby-forum.com/t/storing-a-remotely-fetched-tempfile/89556 "2007-03-21T08:34:23Z")

</div>

Hi everyone, I’m having a problem with open-uri and the “file column” plugin. I must set a model attribute (which is handled by file column) to a remote file - so that filecolumn wil store it locally and, if it’s an …

---

## [Getting HTTP response code from a controller](https://www.ruby-forum.com/t/getting-http-response-code-from-a-controller/89543)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 5\
**Last updated:** [March 21, 2007, 8:34am UTC](https://www.ruby-forum.com/t/getting-http-response-code-from-a-controller/89543 "2007-03-21T08:34:23Z")

</div>

Hi there, how would I get the HTTP response code (200 OK, 500, etc…) from a controller after a request have been ‘served’? Thanks

---

## [Frames are working in Ruby views Folder](https://www.ruby-forum.com/t/frames-are-working-in-ruby-views-folder/89554)

<div class="topic-metadata">

**Author:** [@ramakrishna\_reddy](https://www.ruby-forum.com/u/ramakrishna_reddy)\
**Replies:** 0\
**Last updated:** [March 21, 2007, 7:18am UTC](https://www.ruby-forum.com/t/frames-are-working-in-ruby-views-folder/89554 "2007-03-21T07:18:10Z")

</div>

Hello , I have facing one problem, in ruby views folder i created one index.rhtml file , in under i was given frames like this way \<frameset rows="90%,10%"\> \<frameset cols="20%,60%,20%"\> \<frame …

---

## [Saving an array](https://www.ruby-forum.com/t/saving-an-array/89537)

<div class="topic-metadata">

**Author:** [@colinloretz](https://www.ruby-forum.com/u/colinloretz)\
**Replies:** 4\
**Last updated:** [March 21, 2007, 6:52am UTC](https://www.ruby-forum.com/t/saving-an-array/89537 "2007-03-21T06:52:10Z")

</div>

Is there any way to save an array to a single column within a database? I have an array of coordinates that are within an array. Thanks in advance!

---

## [Create action gives NoMethodError and nil.each](https://www.ruby-forum.com/t/create-action-gives-nomethoderror-and-nil-each/89477)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 2\
**Last updated:** [March 21, 2007, 5:47am UTC](https://www.ruby-forum.com/t/create-action-gives-nomethoderror-and-nil-each/89477 "2007-03-21T05:47:26Z")

</div>

I have two actions, create and index. The index view has a list of find(:all) objects and also a form for creating new objects. If the form is valid upon creation, everything works (it is redirected to the index page …

---

## [Serious problem with File Column plugin. Help!](https://www.ruby-forum.com/t/serious-problem-with-file-column-plugin-help/89548)

<div class="topic-metadata">

**Author:** [@DLR](https://www.ruby-forum.com/u/DLR)\
**Replies:** 0\
**Last updated:** [March 21, 2007, 4:45am UTC](https://www.ruby-forum.com/t/serious-problem-with-file-column-plugin-help/89548 "2007-03-21T04:45:30Z")

</div>

Development environment: WinXP, ruby 1.8.5, rails 1.2.3 Hey guys, I’m implementing a file upload feature to my application. new.rhtml: \<% form\_tag( { :action =\> ‘create’ }, :multipart =\> true ) do |f| %\> \<%= render …

---

## [Page Caching with clusters and redirect](https://www.ruby-forum.com/t/page-caching-with-clusters-and-redirect/89488)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 1\
**Last updated:** [March 21, 2007, 2:17am UTC](https://www.ruby-forum.com/t/page-caching-with-clusters-and-redirect/89488 "2007-03-21T02:17:13Z")

</div>

What’s the behavior of caches\_pages when an action returns a redirect? I’d like to only cache the page if the action renders, but not cache the redirect Any solution for using caching with a cluster of web server…

---

## [Ruby on Rails Architect Position](https://www.ruby-forum.com/t/ruby-on-rails-architect-position/87769)

<div class="topic-metadata">

**Author:** [@Ronnie\_Kedrin](https://www.ruby-forum.com/u/Ronnie_Kedrin)\
**Replies:** 3\
**Last updated:** [March 21, 2007, 2:11am UTC](https://www.ruby-forum.com/t/ruby-on-rails-architect-position/87769 "2007-03-21T02:11:56Z")

</div>

Seeking a candidate with hands on experience with Ruby on Rails technology. This firm just acquired a website that they need to integrate into the firm. They are looking for the candidate to contribute to the architec…

---

## [Check out These New Videos!](https://www.ruby-forum.com/t/check-out-these-new-videos/89535)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [March 21, 2007, 1:18am UTC](https://www.ruby-forum.com/t/check-out-these-new-videos/89535 "2007-03-21T01:18:10Z")

</div>

Check out These New Videos!! Ron Paul is running for president in 2008. A true conservative that will fight to preseve our Bill of rights and freedoms!! Please get involved and support the Congressman as he runs!!! …

---

## [\[ANN\] SiteMeter is now Sitealizer v.1.1 Web Stats plugin](https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494)

<div class="topic-metadata">

**Author:** [@Thiago\_J](https://www.ruby-forum.com/u/Thiago_J)\
**Replies:** 2\
**Last updated:** [March 21, 2007, 1:12am UTC](https://www.ruby-forum.com/t/ann-sitemeter-is-now-sitealizer-v-1-1-web-stats-plugin/89494 "2007-03-21T01:12:22Z")

</div>

The old ‘sitemeter’ plugin has been changed to Sitealizer v.1.1 Web Stats plugin for Rails. Please update your bookmarks to point to http://sitealizer.rubyforge.org This change includes: \[FIX\] General bug fixes \[NEW…

---

## [Check\_box\_tag](https://www.ruby-forum.com/t/check-box-tag/89374)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 3\
**Last updated:** [March 21, 2007, 1:04am UTC](https://www.ruby-forum.com/t/check-box-tag/89374 "2007-03-21T01:04:07Z")

</div>

It ppears that the check\_box\_tag inserts a name/value pair into params{} only when the checkbox is checked and inserts nothing when the checkbox is unchecked. This means that if one simply cycles through the keys in …

---

## [Nil while creating message in ActionMailer](https://www.ruby-forum.com/t/nil-while-creating-message-in-actionmailer/89253)

<div class="topic-metadata">

**Author:** [@Nick\_Allen](https://www.ruby-forum.com/u/Nick_Allen)\
**Replies:** 2\
**Last updated:** [March 21, 2007, 12:40am UTC](https://www.ruby-forum.com/t/nil-while-creating-message-in-actionmailer/89253 "2007-03-21T00:40:49Z")

</div>

I have created an ActionMailer and am able to use it successfully in development. As soon as I move it to the production environment, I am getting an exception. It seems like it must be some kind of configuration is…

---

## [Passing Arguments to before\_filter](https://www.ruby-forum.com/t/passing-arguments-to-before-filter/89515)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 1\
**Last updated:** [March 21, 2007, 12:36am UTC](https://www.ruby-forum.com/t/passing-arguments-to-before-filter/89515 "2007-03-21T00:36:04Z")

</div>

I want to put a before\_filter in application.rb, as follows: before\_filter :do\_something, :except\_controller =\> \[:admin\] def do\_something(options) options.stringify\_keys! unless options\[:except\_controller\].include?(c…

---

## [Appending to an array inside a loop](https://www.ruby-forum.com/t/appending-to-an-array-inside-a-loop/88514)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 19\
**Last updated:** [March 21, 2007, 12:04am UTC](https://www.ruby-forum.com/t/appending-to-an-array-inside-a-loop/88514 "2007-03-21T00:04:00Z")

</div>

for some reason, i am having a hard time with some thing REALLY simple… i am going through an array of objects, making a one element hash of the data, and appending that hash to an array… here’s the code… @places.eac…

---

## [Rails in subdirectory: redirect\_to '/' broke?](https://www.ruby-forum.com/t/rails-in-subdirectory-redirect-to-broke/89373)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 2\
**Last updated:** [March 20, 2007, 11:54pm UTC](https://www.ruby-forum.com/t/rails-in-subdirectory-redirect-to-broke/89373 "2007-03-20T23:54:19Z")

</div>

Hi, I’ve got my rails app in a subdirectory called ‘huisrekening/’. But when I do this: redirect\_to ‘/’. It redirects to ‘/’ and not to ‘/ huisrekening’ like I would like. Is it possible without doing redirect\_to ‘hu…

---

## [Collection\_select with a mix of AR models and non AR models](https://www.ruby-forum.com/t/collection-select-with-a-mix-of-ar-models-and-non-ar-models/89516)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 0\
**Last updated:** [March 20, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/collection-select-with-a-mix-of-ar-models-and-non-ar-models/89516 "2007-03-20T23:32:58Z")

</div>

Hi you all, Having into account the following: \<%= collection\_select(“page”, “subjects” , @subjects, “id”, “name”) %\> and that “Page” is an AR model with an attr. accesor called “subjects”, array composed by non AR m…

---

## [Collection\_select - why doesn't it work?](https://www.ruby-forum.com/t/collection-select-why-doesnt-it-work/89497)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [March 20, 2007, 11:20pm UTC](https://www.ruby-forum.com/t/collection-select-why-doesnt-it-work/89497 "2007-03-20T23:20:04Z")

</div>

Hi all I guess this is quite a newbie question, but I’m just stuck here and don’t know why. \<%= form.collection\_select :origin\_country, Country.find(:all), :id, :name %\> gives me a select list with name=“member\[orig…

---

## [What's your development environment?](https://www.ruby-forum.com/t/whats-your-development-environment/89417)

<div class="topic-metadata">

**Author:** [@daniel\_fischer](https://www.ruby-forum.com/u/daniel_fischer)\
**Replies:** 8\
**Last updated:** [March 20, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/whats-your-development-environment/89417 "2007-03-20T23:08:36Z")

</div>

Right now I have an iMac, but I’m considering buying a Macbook or Mac Book Pro and then selling my iMac, and then also getting a large display 24" or 30" (depending whether I go macbook or mac book pro). If anyone wou…

---

## [Storing Search Entries - Use serialize?](https://www.ruby-forum.com/t/storing-search-entries-use-serialize/89510)

<div class="topic-metadata">

**Author:** [@kim](https://www.ruby-forum.com/u/kim)\
**Replies:** 0\
**Last updated:** [March 20, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/storing-search-entries-use-serialize/89510 "2007-03-20T22:59:07Z")

</div>

I have a search box on a web page that I want to store the last 20 search entries and randomly display 5 of those search entries when the page is loaded - as a way to give users search topic tips. I can not figure out…

---

## [Attribute accessor (counter\_cache)](https://www.ruby-forum.com/t/attribute-accessor-counter-cache/89509)

<div class="topic-metadata">

**Author:** [@andrew](https://www.ruby-forum.com/u/andrew)\
**Replies:** 0\
**Last updated:** [March 20, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/attribute-accessor-counter-cache/89509 "2007-03-20T22:22:29Z")

</div>

Hello, I am rather confused about what I’m seeing with an attribute of mine that has been defined as a counter\_cache. ‘votes\_count’ is the attribute that is a counter\_cache var. If I do this in my view… \<% p test.at…

---

## [Prototype/Virgin objects =\> usable objects, aka default db r](https://www.ruby-forum.com/t/prototype-virgin-objects-usable-objects-aka-default-db-r/89372)

<div class="topic-metadata">

**Author:** [@nemo](https://www.ruby-forum.com/u/nemo)\
**Replies:** 1\
**Last updated:** [March 20, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/prototype-virgin-objects-usable-objects-aka-default-db-r/89372 "2007-03-20T22:07:49Z")

</div>

Hellos, I’m kinda stumped, so hopefully someone can help me out. I have a custom\_modules table, in which I’ve defined default modules for a skinnable website I’m designing. Those modules have default values, such as …

---

## [Re: reverse routes](https://www.ruby-forum.com/t/re-reverse-routes/89504)

<div class="topic-metadata">

**Author:** [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Replies:** 0\
**Last updated:** [March 20, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/re-reverse-routes/89504 "2007-03-20T21:57:47Z")

</div>

Pat Sounds like you’re looking for ActionController::Routing::Route.recognize() Blake

---

## ["reverse" routes - getting a controller and action from a UR](https://www.ruby-forum.com/t/reverse-routes-getting-a-controller-and-action-from-a-ur/89496)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 1\
**Last updated:** [March 20, 2007, 9:56pm UTC](https://www.ruby-forum.com/t/reverse-routes-getting-a-controller-and-action-from-a-ur/89496 "2007-03-20T21:56:47Z")

</div>

I’m using redirect\_to :back in my app in one place. In a couple cases I need to see if the http referrer is a certain controller/action pair, and do something differently based on that. Is there some way to get the …

---

## [One Rails application running 100 distinct websites](https://www.ruby-forum.com/t/one-rails-application-running-100-distinct-websites/89469)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 2\
**Last updated:** [March 20, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/one-rails-application-running-100-distinct-websites/89469 "2007-03-20T21:53:46Z")

</div>

I’m hoping to find someone who realizes the implications of this design strategy.I am attempting to build an application that can run 100 different distinct domains. (not a subdomain.domain.com but www.domain.comhttp…

---

## [Re: Ajax and performance . . progress bar pattern](https://www.ruby-forum.com/t/re-ajax-and-performance-progress-bar-pattern/89500)

<div class="topic-metadata">

**Author:** [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Replies:** 0\
**Last updated:** [March 20, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/re-ajax-and-performance-progress-bar-pattern/89500 "2007-03-20T21:48:46Z")

</div>

Py Had a very similar task, a progress bar updating in the browser while some long-running task is running on the server. WEBrick can only server one request at a time, which explains the behavior you describe . . . …

---

## [Resource\_feeder individual item url](https://www.ruby-forum.com/t/resource-feeder-individual-item-url/89498)

<div class="topic-metadata">

**Author:** [@ralph](https://www.ruby-forum.com/u/ralph)\
**Replies:** 1\
**Last updated:** [March 20, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/resource-feeder-individual-item-url/89498 "2007-03-20T21:29:56Z")

</div>

Hello, I’m quite impressed with the resource\_feeder plugin, but I have one question: Is it possible to change the link of the individual items in the feed? Let’s say I manage Articles in my system, and I use the arti…

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

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