# Rails

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

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

---

## [How to use redirect\_to :action =\> 'something', params](https://www.ruby-forum.com/t/how-to-use-redirect-to-action-something-params/110845)

<div class="topic-metadata">

**Author:** [@demisone](https://www.ruby-forum.com/u/demisone)\
**Replies:** 2\
**Last updated:** [July 31, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/how-to-use-redirect-to-action-something-params/110845 "2007-07-31T17:53:08Z")

</div>

Hi there. I wanted to redirect to some page and at the same time keep the parameters that arrived on the current request so i wrote the following code: redirect\_to :action =\> ‘some\_action\_here’, params Although it is…

---

## [Re: Time from seconds](https://www.ruby-forum.com/t/re-time-from-seconds/110865)

<div class="topic-metadata">

**Author:** [@piet](https://www.ruby-forum.com/u/piet)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/re-time-from-seconds/110865 "2007-07-31T17:51:07Z")

</div>

Something like: def number\_to\_time(seconds) Time.at(seconds.to\_i-3600).strftime("%H:%M:%S") end Piet.

---

## [Try catch error](https://www.ruby-forum.com/t/try-catch-error/110867)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/try-catch-error/110867 "2007-07-31T17:14:50Z")

</div>

I have a form that allows the user to enter membership info. If the membership is a good one, it is allowed, but if not a prompt incates that it was bad. After you click ok on that prompt, a try catch error appears in…

---

## [RXML: \<ruby:put expr="1+2"/\>](https://www.ruby-forum.com/t/rxml-ruby-put-expr-1-2/110863)

<div class="topic-metadata">

**Author:** [@Canatella](https://www.ruby-forum.com/u/Canatella)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 5:05pm UTC](https://www.ruby-forum.com/t/rxml-ruby-put-expr-1-2/110863 "2007-07-31T17:05:59Z")

</div>

Hello railers, I’ve always been annoyed by the fact that ERB doesn’t respect XML specs. As I mostly write XHTML, I’m trying to write a renderer using only valid XML files. Here is an example of a file so you get th…

---

## [\*.html.erb or \*.erb.html?](https://www.ruby-forum.com/t/html-erb-or-erb-html/110861)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/html-erb-or-erb-html/110861 "2007-07-31T16:48:56Z")

</div>

Railsters: The wave of the future, for view file names, is \*.html.erb , with the target type on the left and the templating system on the right. Right? Or is \*.erb.html also optional? We are looking at a template sy…

---

## [PDF combine](https://www.ruby-forum.com/t/pdf-combine/110816)

<div class="topic-metadata">

**Author:** [@watxit](https://www.ruby-forum.com/u/watxit)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/pdf-combine/110816 "2007-07-31T16:18:48Z")

</div>

Hi guy! Can you help me the way or code to combine 2 PDF file.

---

## [What does \<label for=...\> mean?](https://www.ruby-forum.com/t/what-does-label-for-mean/110840)

<div class="topic-metadata">

**Author:** [@dparkmit](https://www.ruby-forum.com/u/dparkmit)\
**Replies:** 7\
**Last updated:** [July 31, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/what-does-label-for-mean/110840 "2007-07-31T16:12:46Z")

</div>

hi all, i’m a ror newbie and so hope you don’t mind this simple question. i was looking at an rhtml file for a form when i ran across this html code: Username: what is the tag used for? many thanks for your help! …

---

## [Multiple File Upload with attachment\_fu](https://www.ruby-forum.com/t/multiple-file-upload-with-attachment-fu/110858)

<div class="topic-metadata">

**Author:** [@tdavis1198](https://www.ruby-forum.com/u/tdavis1198)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/multiple-file-upload-with-attachment-fu/110858 "2007-07-31T16:07:45Z")

</div>

I have been trying to implement a multiple file upload page for uploading photo’s. My single upload page works without problems. I tried to use the aurigma image uploader (as used by facebook, geni, etc.). I had it wo…

---

## [Sortable\_element on multiple lists](https://www.ruby-forum.com/t/sortable-element-on-multiple-lists/110857)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/sortable-element-on-multiple-lists/110857 "2007-07-31T16:06:44Z")

</div>

Hi all, I have a list of users belonging to a group: (user HABTM groups) Group 1 user 1 user 2 Group 2 user 4 user 2 user 5 Group 3 user 6 user 7 I want to enable user dragging between groups. Eg. i want to move u…

---

## [Session unrecognized in before\_filter block](https://www.ruby-forum.com/t/session-unrecognized-in-before-filter-block/110852)

<div class="topic-metadata">

**Author:** [@taro](https://www.ruby-forum.com/u/taro)\
**Replies:** 2\
**Last updated:** [July 31, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/session-unrecognized-in-before-filter-block/110852 "2007-07-31T15:50:42Z")

</div>

As the title suggests, Rails doesn’t seem to recognize that a session is a special hash extended off of ActionController::Base. The error tells me either session is unrecognized or session is an array that doesn’t ac…

---

## [Observers, models, edge, chickens and eggs](https://www.ruby-forum.com/t/observers-models-edge-chickens-and-eggs/110856)

<div class="topic-metadata">

**Author:** [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/observers-models-edge-chickens-and-eggs/110856 "2007-07-31T15:50:42Z")

</div>

Imagine the following application: config/environment.rb: … config.active\_record.observers = :user\_observer … app/models/user.rb: class User \< ActiveRecord::Base MY\_CONST = Other::ITS\_CONST end app/models/other.rb…

---

## [What is the Rails equivalent of Dependency Injection?](https://www.ruby-forum.com/t/what-is-the-rails-equivalent-of-dependency-injection/110653)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 11\
**Last updated:** [July 31, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/what-is-the-rails-equivalent-of-dependency-injection/110653 "2007-07-31T15:37:41Z")

</div>

Coming from a Java background I’m trying to get used to the various best practices of doing things in Rails. I’m used to Dependency Injection and XML in the Java world. I realize Ruby does not have interfaces and Ra…

---

## [Deactivate instances on delete](https://www.ruby-forum.com/t/deactivate-instances-on-delete/110774)

<div class="topic-metadata">

**Author:** [@lundie](https://www.ruby-forum.com/u/lundie)\
**Replies:** 3\
**Last updated:** [July 31, 2007, 3:12pm UTC](https://www.ruby-forum.com/t/deactivate-instances-on-delete/110774 "2007-07-31T15:12:38Z")

</div>

Hi, I have created an application in which a customer model has many locations. Customers are then assigned to an order, and one of their locations is also assigned to the order. My issue comes if a locations is remo…

---

## [Autoloading of ActiveRecord classes](https://www.ruby-forum.com/t/autoloading-of-activerecord-classes/110846)

<div class="topic-metadata">

**Author:** [@nielsene](https://www.ruby-forum.com/u/nielsene)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 3:12pm UTC](https://www.ruby-forum.com/t/autoloading-of-activerecord-classes/110846 "2007-07-31T15:12:18Z")

</div>

I’ve extended the generation of ActiveRecords to create multiple ActiveRecord classes for a given existing database and all of its tables. I place the one Abstract class (that sets establish\_connection to the DB) and …

---

## [HTTP post constantly submitting](https://www.ruby-forum.com/t/http-post-constantly-submitting/110848)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/http-post-constantly-submitting/110848 "2007-07-31T15:09:37Z")

</div>

Hello all, I have a rails request that I have to parse and re-submit to another form sitting on a web server on another machine. I use the following code to post the form Net::HTTP.post\_form(URI.parse(URL’), {‘Usern…

---

## [Paradigm for creating an object over several form screens?](https://www.ruby-forum.com/t/paradigm-for-creating-an-object-over-several-form-screens/110843)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/paradigm-for-creating-an-object-over-several-form-screens/110843 "2007-07-31T14:47:35Z")

</div>

What’s the best way to create and edit an object over several form screens before submitting it to the db? I have an ‘edit\_story’ form page, which has buttons for ‘add picture’ and ‘add\_movie’. If the user selects ei…

---

## [Best Theme Engine?](https://www.ruby-forum.com/t/best-theme-engine/110813)

<div class="topic-metadata">

**Author:** [@jimmyz](https://www.ruby-forum.com/u/jimmyz)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 2:41pm UTC](https://www.ruby-forum.com/t/best-theme-engine/110813 "2007-07-31T14:41:35Z")

</div>

I’m starting a new rails project which requires users being able to select/edit a theme for the site. There appears to be several plugins and libraries available for this. From any of you that have experience using/c…

---

## [Hosting Ruby Suggestions?](https://www.ruby-forum.com/t/hosting-ruby-suggestions/110839)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 31, 2007, 2:34pm UTC](https://www.ruby-forum.com/t/hosting-ruby-suggestions/110839 "2007-07-31T14:34:34Z")

</div>

Hello, I currently maintain my production server with 1 & 1. I am developing my first Rails application. I am really enjoying the process and see its virtues. Can anyone recommend a production server ready for rail…

---

## [Form\_for - over riding the controller that generates the for](https://www.ruby-forum.com/t/form-for-over-riding-the-controller-that-generates-the-for/110844)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 2:32pm UTC](https://www.ruby-forum.com/t/form-for-over-riding-the-controller-that-generates-the-for/110844 "2007-07-31T14:32:33Z")

</div>

Hello, I am trying to install my login and search forms as default parts of the layout. This is the code I am using: \<% form\_for :user, :url =\> {:action =\> ‘authenticate’} do |f| %\> Username: \<%= f.text\_field :use…

---

## [Catch exception](https://www.ruby-forum.com/t/catch-exception/110841)

<div class="topic-metadata">

**Author:** [@shafi](https://www.ruby-forum.com/u/shafi)\
**Replies:** 4\
**Last updated:** [July 31, 2007, 2:28pm UTC](https://www.ruby-forum.com/t/catch-exception/110841 "2007-07-31T14:28:58Z")

</div>

hello guys how to catch exceptions in RoR like java? in java try{ } catch(Exception c) {} how to do that in RoR?? thanks

---

## [Joining notes to users?](https://www.ruby-forum.com/t/joining-notes-to-users/109711)

<div class="topic-metadata">

**Author:** [@indiehead](https://www.ruby-forum.com/u/indiehead)\
**Replies:** 3\
**Last updated:** [July 31, 2007, 12:19pm UTC](https://www.ruby-forum.com/t/joining-notes-to-users/109711 "2007-07-31T12:19:47Z")

</div>

hi, i’m working on an idea of mine using ruby on rails but totally stumped with the has\_many :notes, belongs\_to :users in ruby could someone explain this to me? basically every user will be able to create many notes …

---

## [In Place Editor - Dates](https://www.ruby-forum.com/t/in-place-editor-dates/110830)

<div class="topic-metadata">

**Author:** [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 12:15pm UTC](https://www.ruby-forum.com/t/in-place-editor-dates/110830 "2007-07-31T12:15:12Z")

</div>

While browsing the API, I noticed that in place editing is going away in Rails 2.0 http://api.rubyonrails.org/files/vendor/rails/actionpack/lib/action\_controller/macros/in\_place\_editing\_rb.html Is the replacement plu…

---

## [Pagination with 500000 items](https://www.ruby-forum.com/t/pagination-with-500000-items/110672)

<div class="topic-metadata">

**Author:** [@luma](https://www.ruby-forum.com/u/luma)\
**Replies:** 10\
**Last updated:** [July 31, 2007, 11:59am UTC](https://www.ruby-forum.com/t/pagination-with-500000-items/110672 "2007-07-31T11:59:10Z")

</div>

hi I’ve got a pagination with about 500000 items, and I don’t know if it will be slow. I need only the first 1000, so what I’m trying to do is @item\_pages, @items = paginate(:products, :order =\> “title”, :per\_page =\> …

---

## [Help with :limit :ofset loop?](https://www.ruby-forum.com/t/help-with-limit-ofset-loop/110826)

<div class="topic-metadata">

**Author:** [@bxsitecover](https://www.ruby-forum.com/u/bxsitecover)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 11:56am UTC](https://www.ruby-forum.com/t/help-with-limit-ofset-loop/110826 "2007-07-31T11:56:10Z")

</div>

This is the code in my model to display 10 records from a db table at a time. def self.find\_5 find(:all, :order =\> ‘id’, :limit =\> 5, :offset =\> 0) end I want to make a loop so that say if my table contains 45 rec…

---

## [\[ANN\] ClockingIT v0.99.2 released](https://www.ruby-forum.com/t/ann-clockingit-v0-99-2-released/110822)

<div class="topic-metadata">

**Author:** [@Erlend\_S](https://www.ruby-forum.com/u/Erlend_S)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 11:07am UTC](https://www.ruby-forum.com/t/ann-clockingit-v0-99-2-released/110822 "2007-07-31T11:07:06Z")

</div>

It’s been a while since I last announced something about ClockingIT to this list, due to limited bandwidth. But, now that I’ve gotten proper hosting with a great connection, there’s no reason not to. ClockingIT - ht…

---

## [Ruby and Ghostscript](https://www.ruby-forum.com/t/ruby-and-ghostscript/110819)

<div class="topic-metadata">

**Author:** [@watxit](https://www.ruby-forum.com/u/watxit)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 10:32am UTC](https://www.ruby-forum.com/t/ruby-and-ghostscript/110819 "2007-07-31T10:32:55Z")

</div>

Hi guy I know : To use Ghostscript to combine PDF files, type something like the following: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf where we run this command in Ruby …

---

## [SortHelper problem](https://www.ruby-forum.com/t/sorthelper-problem/110728)

<div class="topic-metadata">

**Author:** [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Replies:** 3\
**Last updated:** [July 31, 2007, 10:30am UTC](https://www.ruby-forum.com/t/sorthelper-problem/110728 "2007-07-31T10:30:23Z")

</div>

I have TableA with name, description, start time displayed on one page. TableB has name, comment, file path and is displayed on another page. I’m using the SortHelper2 helper to help me sort the columns of these table…

---

## [How to upload file](https://www.ruby-forum.com/t/how-to-upload-file/110810)

<div class="topic-metadata">

**Author:** [@nagesh](https://www.ruby-forum.com/u/nagesh)\
**Replies:** 1\
**Last updated:** [July 31, 2007, 10:27am UTC](https://www.ruby-forum.com/t/how-to-upload-file/110810 "2007-07-31T10:27:59Z")

</div>

CAN ANY BODY TELL ME HOW TO UPLOAD FILE PLEASE…

---

## [Quick and dirty](https://www.ruby-forum.com/t/quick-and-dirty/110817)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 10:26am UTC](https://www.ruby-forum.com/t/quick-and-dirty/110817 "2007-07-31T10:26:59Z")

</div>

I was browsing the local bookstore, and came across " Rails for Java Developers" http://www.pragmaticprogrammer.com/titles/fr\_r4j/. I’ll have to take another look, but in the intro they did a “migration” and basically…

---

## [Master/detail grouping - Advice needed](https://www.ruby-forum.com/t/master-detail-grouping-advice-needed/110814)

<div class="topic-metadata">

**Author:** [@axplains](https://www.ruby-forum.com/u/axplains)\
**Replies:** 0\
**Last updated:** [July 31, 2007, 9:27am UTC](https://www.ruby-forum.com/t/master-detail-grouping-advice-needed/110814 "2007-07-31T09:27:57Z")

</div>

Hello, I need help on a this problem: I have a “Categories / Items” database in a “has\_many - belongs\_to” relationship On the “Items” page I want to display the items grouped by Category, so in the controller I have: …

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

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