# Rails

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

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

---

## [Flash variables and ruby](https://www.ruby-forum.com/t/flash-variables-and-ruby/110151)

<div class="topic-metadata">

**Author:** [@austen](https://www.ruby-forum.com/u/austen)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 3:21am UTC](https://www.ruby-forum.com/t/flash-variables-and-ruby/110151 "2007-07-26T03:21:39Z")

</div>

hey fellas, I recently wrote a flash uploader that is integrated into my rails app. What I want to do is feed the flash a var, have it do its thing, then feed a var back to the ruby. My only issue is passing back the…

---

## [ActiveRecord hang with MySQL and large data](https://www.ruby-forum.com/t/activerecord-hang-with-mysql-and-large-data/110187)

<div class="topic-metadata">

**Author:** [@Rusty\_B](https://www.ruby-forum.com/u/Rusty_B)\
**Replies:** 6\
**Last updated:** [July 26, 2007, 3:18am UTC](https://www.ruby-forum.com/t/activerecord-hang-with-mysql-and-large-data/110187 "2007-07-26T03:18:39Z")

</div>

I can consistently reproduce a hang in the following place. –\> #0 /usr/lib/ruby/gems/1.8/gems/ruby-debug-base-0.9.3/lib/ruby- debug-base.rb:74 in ‘interrupt\_last’ #1 /usr/lib/ruby/gems/1.8/gems/ruby- debug-0.9.3/bin/r…

---

## [Any programmer can answer this in 2 sec, but I'm stumped](https://www.ruby-forum.com/t/any-programmer-can-answer-this-in-2-sec-but-im-stumped/110397)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 2:49am UTC](https://www.ruby-forum.com/t/any-programmer-can-answer-this-in-2-sec-but-im-stumped/110397 "2007-07-26T02:49:38Z")

</div>

I’ve just started working with Rails. And I can’t figure out what seems to be the easiest thing imaginable. I need to send @ferry.id from a view in ferry\_controller… \<%= link\_to ‘Add new schedule’, {:controller =\> ‘s…

---

## [Suppress SELECT after INSERT](https://www.ruby-forum.com/t/suppress-select-after-insert/110406)

<div class="topic-metadata">

**Author:** [@Florian\_ASSSSmann](https://www.ruby-forum.com/u/Florian_ASSSSmann)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 2:43am UTC](https://www.ruby-forum.com/t/suppress-select-after-insert/110406 "2007-07-26T02:43:37Z")

</div>

Hi, is there a way to suppress ActiveRecords reload after I saved an record? Regards Florian

---

## [Installing rails in vendor messes up migrations](https://www.ruby-forum.com/t/installing-rails-in-vendor-messes-up-migrations/110409)

<div class="topic-metadata">

**Author:** [@nola](https://www.ruby-forum.com/u/nola)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 2:41am UTC](https://www.ruby-forum.com/t/installing-rails-in-vendor-messes-up-migrations/110409 "2007-07-26T02:41:38Z")

</div>

I’ve searched all over the web and mailing lists and can’t find any info on this problem. I have a site built with Rails 1.1.6 I ran rake rails:freeze:edge TAG=rel\_1-2-3 I ran db:migrate (on a fresh database) rake …

---

## [Problem with validates\_length\_of an integer](https://www.ruby-forum.com/t/problem-with-validates-length-of-an-integer/110298)

<div class="topic-metadata">

**Author:** [@jojojobbins](https://www.ruby-forum.com/u/jojojobbins)\
**Replies:** 13\
**Last updated:** [July 26, 2007, 1:53am UTC](https://www.ruby-forum.com/t/problem-with-validates-length-of-an-integer/110298 "2007-07-26T01:53:58Z")

</div>

Hello guys, I’m trying to validate the input of an integer from a form, here is a bit of code: This is the definition of the offending column in the migration: t.column :position, :integer, :default =\> 0, :limit =\> 3,…

---

## [Setting :binary, :limit option on mysql column](https://www.ruby-forum.com/t/setting-binary-limit-option-on-mysql-column/110261)

<div class="topic-metadata">

**Author:** [@bazzel](https://www.ruby-forum.com/u/bazzel)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 1:49am UTC](https://www.ruby-forum.com/t/setting-binary-limit-option-on-mysql-column/110261 "2007-07-26T01:49:52Z")

</div>

How do I add a binary type column with limit option to a MySQL database with migrations? Here’s what I have for a migration right now: def self.up add\_column :table\_name, :column\_name, :binary, :limit =\> 1.megaby…

---

## [Edge Rails: Nested resources and the new url\_for](https://www.ruby-forum.com/t/edge-rails-nested-resources-and-the-new-url-for/110315)

<div class="topic-metadata">

**Author:** [@sol](https://www.ruby-forum.com/u/sol)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 1:46am UTC](https://www.ruby-forum.com/t/edge-rails-nested-resources-and-the-new-url-for/110315 "2007-07-26T01:46:32Z")

</div>

Hey, recently simply\_helpful has been integrated into edge rails, and url\_for now supports array for nested resources. So I can specify this: remote\_form\_for(\[@effort.user,@effort\]) for a route like /users/x/ effort…

---

## [Need help developing a plugin](https://www.ruby-forum.com/t/need-help-developing-a-plugin/110389)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 4\
**Last updated:** [July 26, 2007, 1:27am UTC](https://www.ruby-forum.com/t/need-help-developing-a-plugin/110389 "2007-07-26T01:27:31Z")

</div>

I’m working on a plugin and I’m having some issues. I’m trying to check in the code so that it is always usable as a plugin for general users. So my stylesheets, etc. are in an ‘assets’ directory instead of ‘public’…

---

## [Redirect Issue](https://www.ruby-forum.com/t/redirect-issue/110341)

<div class="topic-metadata">

**Author:** [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 1:22am UTC](https://www.ruby-forum.com/t/redirect-issue/110341 "2007-07-26T01:22:18Z")

</div>

Hello, I have a page where anyone can edit some content on it, but they must be logged in before doing so. Now, when the person clicks on my “edit” action, they are automatically redirected to the login form. Then the …

---

## [Cleaning and Drying up controllers with postback actions](https://www.ruby-forum.com/t/cleaning-and-drying-up-controllers-with-postback-actions/110142)

<div class="topic-metadata">

**Author:** [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 1:20am UTC](https://www.ruby-forum.com/t/cleaning-and-drying-up-controllers-with-postback-actions/110142 "2007-07-26T01:20:48Z")

</div>

Hello, I am trying to clean and dry up my controllers with my postbacks with the following code in my controller: def edit @music = Music.find\_by\_id(params\[:id\]) || Music.new if request.post? @music.attributes = pa…

---

## [EOF and ActionMailer](https://www.ruby-forum.com/t/eof-and-actionmailer/110402)

<div class="topic-metadata">

**Author:** [@ivanstorck](https://www.ruby-forum.com/u/ivanstorck)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 1:16am UTC](https://www.ruby-forum.com/t/eof-and-actionmailer/110402 "2007-07-26T01:16:12Z")

</div>

Hi - I know my SMTP server is running fine, and my credentials work. But I keep getting an EOF error. I’ve searched online and attempted to chat on the #rubyonrails IRC but I can’t seem to find anyone else with this p…

---

## [Acts as attachment thumbnail problem](https://www.ruby-forum.com/t/acts-as-attachment-thumbnail-problem/110395)

<div class="topic-metadata">

**Author:** [@woodhen](https://www.ruby-forum.com/u/woodhen)\
**Replies:** 0\
**Last updated:** [July 26, 2007, 12:47am UTC](https://www.ruby-forum.com/t/acts-as-attachment-thumbnail-problem/110395 "2007-07-26T00:47:37Z")

</div>

Hi there I am using Acts as attachment to store thumbnails in a file system. That part works fine :slight\_smile: Along with my pic form I’m sending other information and I want to store that information in the thumbn…

---

## [Polymorphic Associations](https://www.ruby-forum.com/t/polymorphic-associations/110280)

<div class="topic-metadata">

**Author:** [@cautaro](https://www.ruby-forum.com/u/cautaro)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/polymorphic-associations/110280 "2007-07-26T00:46:33Z")

</div>

Hello, I hope somebody can help me figure out how to solve the following problem. These are the models that I am trying to associate one to the other. Location Organization =\> league, club, etc. Event =\> competitio…

---

## [Simple question on referencing another table](https://www.ruby-forum.com/t/simple-question-on-referencing-another-table/110037)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/simple-question-on-referencing-another-table/110037 "2007-07-26T00:46:30Z")

</div>

Hi, I want to create a page which will show all the resigtered users. I have two tables one users and another one country table. Each user has a foreign key to country table. When I display the users information, I w…

---

## [Readline (LoadError)](https://www.ruby-forum.com/t/readline-loaderror/110124)

<div class="topic-metadata">

**Author:** [@senhor](https://www.ruby-forum.com/u/senhor)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/readline-loaderror/110124 "2007-07-26T00:46:29Z")

</div>

hi, i’m a noob in ror, today i bought a book to learn ror. i do everthing that stand’s in this book, and the shit does’t work! i use Aptana IDE with RadRails the problem is: Loading development environment. /usr/li…

---

## [What are these called?](https://www.ruby-forum.com/t/what-are-these-called/110091)

<div class="topic-metadata">

**Author:** [@xyzt](https://www.ruby-forum.com/u/xyzt)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/what-are-these-called/110091 "2007-07-26T00:46:22Z")

</div>

Hello, I’ve looking at a tutorial in a web page and i saw a sample: def logout session\[:user\] = nil redirect\_to :controller =\> :user, :action =\> :index end def register if request.post? @user = User.new(params\[:u…

---

## [Gem rdoc rails does not generate documentation](https://www.ruby-forum.com/t/gem-rdoc-rails-does-not-generate-documentation/108474)

<div class="topic-metadata">

**Author:** [@stephan](https://www.ruby-forum.com/u/stephan)\
**Replies:** 9\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/gem-rdoc-rails-does-not-generate-documentation/108474 "2007-07-26T00:46:19Z")

</div>

gem rdoc rails That should generate documentation for rails but it doesn’t. It works for all other gems. It creates a directory /usr/lib/ruby/gems/1.8/doc/rails-1.2.3/ which contains nothing. Rails exists and works f…

---

## [Webrick across network](https://www.ruby-forum.com/t/webrick-across-network/109909)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/webrick-across-network/109909 "2007-07-26T00:46:19Z")

</div>

I do my development on a Linux box. I’d like to test my code on a Windows box running IE - as that is what most of my users will have. The problem is that I can’t access the Webrick server on my Linux box from another…

---

## [New Window popup without link](https://www.ruby-forum.com/t/new-window-popup-without-link/110383)

<div class="topic-metadata">

**Author:** [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/new-window-popup-without-link/110383 "2007-07-26T00:46:19Z")

</div>

Is it possible to have an action open a new browser window? All i’ve seen so far requires the :popup option in a link\_to tag. Can rails open a new window in any other way?

---

## [Acts\_as\_list and a Join table?](https://www.ruby-forum.com/t/acts-as-list-and-a-join-table/110258)

<div class="topic-metadata">

**Author:** [@differenthink](https://www.ruby-forum.com/u/differenthink)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/acts-as-list-and-a-join-table/110258 "2007-07-26T00:46:18Z")

</div>

Hi, I ve got two model, Video and Pack… My Pack model can have multiple Video, and a Video belongs to multiple Pack…So i m doing a join table, Video\_Pack… So my Models looks like : Video : ID Name etc. Pack : I…

---

## [Login form](https://www.ruby-forum.com/t/login-form/110093)

<div class="topic-metadata">

**Author:** [@xyzt](https://www.ruby-forum.com/u/xyzt)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/login-form/110093 "2007-07-26T00:46:17Z")

</div>

I have a model for user and login page. When I enter right username and password, i can not login to the system altough the user exists in the db. here’s the model: require ‘digest/sha2’ class User \< ActiveRecord::B…

---

## [My id's are all float?](https://www.ruby-forum.com/t/my-ids-are-all-float/110262)

<div class="topic-metadata">

**Author:** [@dmorin](https://www.ruby-forum.com/u/dmorin)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/my-ids-are-all-float/110262 "2007-07-26T00:46:17Z")

</div>

I’m using Oracle to back my Rails app, and I noticed somewhere along the line that if my ID is declared as NUMBER then it wants to show up as “123.0” whenever I ask for it (i.e. link\_to and other things). This didn’t…

---

## [Formatting time calculation](https://www.ruby-forum.com/t/formatting-time-calculation/110131)

<div class="topic-metadata">

**Author:** [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/formatting-time-calculation/110131 "2007-07-26T00:46:15Z")

</div>

I’m calculating the duration of an event by simply doing ‘end\_time - start\_time’. This outputs the time in seconds. However, i’d like this to be displayed in hours, minutes and seconds in HH:mm:ss format. Is this pos…

---

## [Transaction](https://www.ruby-forum.com/t/transaction/110251)

<div class="topic-metadata">

**Author:** [@pradeep](https://www.ruby-forum.com/u/pradeep)\
**Replies:** 1\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/transaction/110251 "2007-07-26T00:46:13Z")

</div>

Hi all, I have a scenario where i will uploading data from excel to database. My condition for uploading is: If any of the record has an error all the records should be rolled back. Plz give me suggestions how to imp…

---

## [Mephisto + Beast: ADVICE?](https://www.ruby-forum.com/t/mephisto-beast-advice/108352)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 9\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/mephisto-beast-advice/108352 "2007-07-26T00:46:11Z")

</div>

Howdy, I’m trying to use both Mephisto and Beast for a website. The way I see it, I have two options: Run them as separate apps (any advice on how to do this?) Integrate them (anyone have some tips on this?) Thanks…

---

## [How do I find and view all those RDoc files scattered on my](https://www.ruby-forum.com/t/how-do-i-find-and-view-all-those-rdoc-files-scattered-on-my/108889)

<div class="topic-metadata">

**Author:** [@Jim\_Gagne](https://www.ruby-forum.com/u/Jim_Gagne)\
**Replies:** 8\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/how-do-i-find-and-view-all-those-rdoc-files-scattered-on-my/108889 "2007-07-26T00:46:08Z")

</div>

Every time I download and install a MacPort, Ruby gem, or similar software, the installer makes RI and RDoc files. They’re apt to be called “index.html”. I’ve never been able to find a way to access these files. Searc…

---

## [Linking a class to itself](https://www.ruby-forum.com/t/linking-a-class-to-itself/110355)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [July 26, 2007, 12:46am UTC](https://www.ruby-forum.com/t/linking-a-class-to-itself/110355 "2007-07-26T00:46:02Z")

</div>

I have a few classes. One of them, articles, can have other articles linked to it. Is the best way to model this with a belongs\_to\_and\_has\_many, ie class Article belongs\_to\_and\_has\_many :articles … end So i can …

---

## [Where's Mongrel -- is it necessary?](https://www.ruby-forum.com/t/wheres-mongrel-is-it-necessary/110150)

<div class="topic-metadata">

**Author:** [@rubyvista](https://www.ruby-forum.com/u/rubyvista)\
**Replies:** 2\
**Last updated:** [July 26, 2007, 12:45am UTC](https://www.ruby-forum.com/t/wheres-mongrel-is-it-necessary/110150 "2007-07-26T00:45:58Z")

</div>

I realize that this question is a bit silly, but I’m wondering – once Rails has been deploy to a website, how/where do you start up Mongrel? I’ve deployed my Rails application to a webhost, and it works fine, but the …

---

## [Two questions (url/route and ajax)](https://www.ruby-forum.com/t/two-questions-url-route-and-ajax/109024)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 7\
**Last updated:** [July 26, 2007, 12:45am UTC](https://www.ruby-forum.com/t/two-questions-url-route-and-ajax/109024 "2007-07-26T00:45:52Z")

</div>

Hi, i’ve just 2 questions. The first is about the url, now i can see a page with site/products/1 but how can i do something prettier like site/products/1-my-first-product (with a product named: “My first product”) ? …

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

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