# Rails

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

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

---

## [Retrieving rows from polymorphically related tables](https://www.ruby-forum.com/t/retrieving-rows-from-polymorphically-related-tables/122651)

<div class="topic-metadata">

**Author:** [@venu](https://www.ruby-forum.com/u/venu)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 1:27pm UTC](https://www.ruby-forum.com/t/retrieving-rows-from-polymorphically-related-tables/122651 "2007-12-10T13:27:00Z")

</div>

Hi, I am new to ROR and ActiveRecord. I would like to present the following problem to you. Your help is appreciated and let me thank you in advance for all your support. I have the following three models created app…

---

## [Save method not updating in rails 2.0.1](https://www.ruby-forum.com/t/save-method-not-updating-in-rails-2-0-1/122624)

<div class="topic-metadata">

**Author:** [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 1:14pm UTC](https://www.ruby-forum.com/t/save-method-not-updating-in-rails-2-0-1/122624 "2007-12-10T13:14:00Z")

</div>

I recently just updated to rails 2.0.1, and since all my .save methods dont seem to work, as if they are just skipped. no errors are outputed, and no update sql statements are showing up in log file. sample code im u…

---

## [Map.namespace, rake routes yields no POST URLs](https://www.ruby-forum.com/t/map-namespace-rake-routes-yields-no-post-urls/122653)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 11\
**Last updated:** [December 10, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/map-namespace-rake-routes-yields-no-post-urls/122653 "2007-12-10T13:08:20Z")

</div>

routes.rb map.namespace :admin do |admin| admin.resources :cupcakes end rake routes cupcakes GET /cupcakes formatted\_cupcakes GET /cupcakes.:format POST /cupcakes POST /cupcakes.:format That …

---

## [Updating Rails to 2.0 on Mac OS X 10.5.1 won't work](https://www.ruby-forum.com/t/updating-rails-to-2-0-on-mac-os-x-10-5-1-wont-work/122656)

<div class="topic-metadata">

**Author:** [@halbtuerke](https://www.ruby-forum.com/u/halbtuerke)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/updating-rails-to-2-0-on-mac-os-x-10-5-1-wont-work/122656 "2007-12-10T12:54:34Z")

</div>

Hi, I just wanted to update my Rails installation with “sudo gem update rails” but I get this error: Updating installed gems… Bulk updating Gem source index for: http://gems.rubyforge.org Attempting remote update of…

---

## [Problem in Saving an attribute as 0](https://www.ruby-forum.com/t/problem-in-saving-an-attribute-as-0/122637)

<div class="topic-metadata">

**Author:** [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Replies:** 1\
**Last updated:** [December 10, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/problem-in-saving-an-attribute-as-0/122637 "2007-12-10T12:47:12Z")

</div>

Hi, I need to save a field as 0 in a table I have set the Default value as 0, for ‘number\_of\_days’ field in ‘tasks’ table. I have a form which has this field. When I set the field empty(blank field!) and save the fo…

---

## [Logs from runner script on rails 2.0](https://www.ruby-forum.com/t/logs-from-runner-script-on-rails-2-0/122562)

<div class="topic-metadata">

**Author:** [@Laurie](https://www.ruby-forum.com/u/Laurie)\
**Replies:** 1\
**Last updated:** [December 10, 2007, 12:46pm UTC](https://www.ruby-forum.com/t/logs-from-runner-script-on-rails-2-0/122562 "2007-12-10T12:46:23Z")

</div>

Since I upgraded to rails 2.0.1, I no longer see any logs from my runner scripts. The scripts are running ok, but the logs that used to be generated are no longer visible.

---

## [Layout is not showing](https://www.ruby-forum.com/t/layout-is-not-showing/122654)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 12:29pm UTC](https://www.ruby-forum.com/t/layout-is-not-showing/122654 "2007-12-10T12:29:56Z")

</div>

hi all, i made my login page as ajax form but after i login the layout is not shown can any help me out in this thanks sachin

---

## [Transaction when operating in two tables](https://www.ruby-forum.com/t/transaction-when-operating-in-two-tables/122640)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 10:59am UTC](https://www.ruby-forum.com/t/transaction-when-operating-in-two-tables/122640 "2007-12-10T10:59:46Z")

</div>

Hello, I’m reading from a table in the database to fetch some path to files to import. I do a loop for each path, and for each .csv file, I update another table. All works perfect, but it takes lot of time, 90 files…

---

## [Displaying the id field](https://www.ruby-forum.com/t/displaying-the-id-field/122509)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 7\
**Last updated:** [December 10, 2007, 10:51am UTC](https://www.ruby-forum.com/t/displaying-the-id-field/122509 "2007-12-10T10:51:15Z")

</div>

When the browser is pointed to http://localhost:3000/feeds there’s a CRUD interface. However, the interface doesn’t display all of the fields defined at \<http://strawr.googlecode.com/svn/trunk/db/ migrate/001\_feeds.…

---

## [Mongrel cluster running, but page not accessible via apache](https://www.ruby-forum.com/t/mongrel-cluster-running-but-page-not-accessible-via-apache/122642)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 10:50am UTC](https://www.ruby-forum.com/t/mongrel-cluster-running-but-page-not-accessible-via-apache/122642 "2007-12-10T10:50:27Z")

</div>

i have spent my whole weekend to setup capistrano deployment and finally it seems to work … the last problem i stuck is that i dont know how to establish the connection between the mongrel cluster and apache … when i …

---

## [Capistrano ignoring schema.rb?](https://www.ruby-forum.com/t/capistrano-ignoring-schema-rb/122641)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 10:46am UTC](https://www.ruby-forum.com/t/capistrano-ignoring-schema-rb/122641 "2007-12-10T10:46:20Z")

</div>

i am deploying my stuff with capistrano and somehow the schema.rb is always deployed empty … but in svn its full… could someone explain me how capistrano handles the schema.rb? when i deploy there is only this inside: …

---

## [Transaction when operating in two tables](https://www.ruby-forum.com/t/transaction-when-operating-in-two-tables/122634)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 3\
**Last updated:** [December 10, 2007, 10:39am UTC](https://www.ruby-forum.com/t/transaction-when-operating-in-two-tables/122634 "2007-12-10T10:39:05Z")

</div>

Hello, I’m reading from a table in the database to fetch some path to files to import. I do a loop for each path, and for each .csv file, I update another table. All works perfect, but it takes lot of time, 90 files…

---

## [Rails 2.0.1 paths](https://www.ruby-forum.com/t/rails-2-0-1-paths/122625)

<div class="topic-metadata">

**Author:** [@gorter9](https://www.ruby-forum.com/u/gorter9)\
**Replies:** 1\
**Last updated:** [December 10, 2007, 10:31am UTC](https://www.ruby-forum.com/t/rails-2-0-1-paths/122625 "2007-12-10T10:31:19Z")

</div>

I have installed rails 2.0.1 succesfully. the problem is that i don’t know how to get the paths working In my controller i have def new @Post = Post.new end in my new.html.erb \<% form\_for(Post.new) do |f| %\> The …

---

## [Engines for Rails 2.0](https://www.ruby-forum.com/t/engines-for-rails-2-0/120769)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 9\
**Last updated:** [December 10, 2007, 9:59am UTC](https://www.ruby-forum.com/t/engines-for-rails-2-0/120769 "2007-12-10T09:59:07Z")

</div>

Hi everybody, I’m highly interested in getting a working Engines setup running on Rails 2.0 as soon as possible. I have convinced a customer to use Engines to slice up a huge Rails app but he wants it to run Rails 2.0 …

---

## [Sql and ruby](https://www.ruby-forum.com/t/sql-and-ruby/122630)

<div class="topic-metadata">

**Author:** [@jojobert](https://www.ruby-forum.com/u/jojobert)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 9:47am UTC](https://www.ruby-forum.com/t/sql-and-ruby/122630 "2007-12-10T09:47:49Z")

</div>

let me give some background knowledge on my problem currently: courses programmes degrees are stored in the database, the app allows people to create courses and programmes. Then they are allowed to assign courses …

---

## [Ruby on Rails(Segmentation)](https://www.ruby-forum.com/t/ruby-on-rails-segmentation/122623)

<div class="topic-metadata">

**Author:** [@amulyab](https://www.ruby-forum.com/u/amulyab)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 8:00am UTC](https://www.ruby-forum.com/t/ruby-on-rails-segmentation/122623 "2007-12-10T08:00:09Z")

</div>

There is a piece of source code.On selection of some part of source code and click on button say"Create Segment".Segment should be created. Structure for this is: /Start Segment1/ { } /End Segment1/ On clicking t…

---

## [Cannot Freeze Gems](https://www.ruby-forum.com/t/cannot-freeze-gems/122579)

<div class="topic-metadata">

**Author:** [@Mukund](https://www.ruby-forum.com/u/Mukund)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 7:45am UTC](https://www.ruby-forum.com/t/cannot-freeze-gems/122579 "2007-12-10T07:45:34Z")

</div>

I am facing the following issue since Rails 2 was released. I need to freeze 1.2.6 and I can’t. The error messages are below. For the record, the rails application works fine via Mongrel. I just can’t freeze the …

---

## [Concatenate multiple drop down values into a single string](https://www.ruby-forum.com/t/concatenate-multiple-drop-down-values-into-a-single-string/122588)

<div class="topic-metadata">

**Author:** [@kodama](https://www.ruby-forum.com/u/kodama)\
**Replies:** 3\
**Last updated:** [December 10, 2007, 6:25am UTC](https://www.ruby-forum.com/t/concatenate-multiple-drop-down-values-into-a-single-string/122588 "2007-12-10T06:25:33Z")

</div>

Hello Rails board, I’ve been poking around the documentation, but I can’t seem to find what I’m looking for. Also, all the code below is the standard scaffold stuff (besides my helper method). Basically, my problem i…

---

## [Link\_to for an entire table row](https://www.ruby-forum.com/t/link-to-for-an-entire-table-row/122601)

<div class="topic-metadata">

**Author:** [@Henry\_Collingridge](https://www.ruby-forum.com/u/Henry_Collingridge)\
**Replies:** 3\
**Last updated:** [December 10, 2007, 5:18am UTC](https://www.ruby-forum.com/t/link-to-for-an-entire-table-row/122601 "2007-12-10T05:18:18Z")

</div>

Hi, I need to make an entire table row act as a hyperlink. In HTML, this would look like this: \<%=h object.send('property') %\> ... What is the best way of writing this in Rails? I could concatenate the elements t…

---

## [Reading Hash/Array](https://www.ruby-forum.com/t/reading-hash-array/122606)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [December 10, 2007, 5:04am UTC](https://www.ruby-forum.com/t/reading-hash-array/122606 "2007-12-10T05:04:52Z")

</div>

Hi all, My app is generating a form with several bill\_items that should be updated (fields to be updated are description and net). The text\_field\_tag names are bill\_item\[update\]\[#{id}\]\[description\] and bill\_item\[upda…

---

## [Button\_to\_function & safari 3](https://www.ruby-forum.com/t/button-to-function-safari-3/122611)

<div class="topic-metadata">

**Author:** [@pat](https://www.ruby-forum.com/u/pat)\
**Replies:** 4\
**Last updated:** [December 10, 2007, 4:50am UTC](https://www.ruby-forum.com/t/button-to-function-safari-3/122611 "2007-12-10T04:50:15Z")

</div>

Has anyone else noticed that buttons rendered with button\_to\_function in Safari don’t work when you hit return? Works find in firefox. Is there a know work around?

---

## [Exception\_logger plugin doesn't respect filter\_parameter\_log](https://www.ruby-forum.com/t/exception-logger-plugin-doesnt-respect-filter-parameter-log/122613)

<div class="topic-metadata">

**Author:** [@trevorturk](https://www.ruby-forum.com/u/trevorturk)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 4:32am UTC](https://www.ruby-forum.com/t/exception-logger-plugin-doesnt-respect-filter-parameter-log/122613 "2007-12-10T04:32:24Z")

</div>

I was just wondering if anyone else had noticed that the exception\_logger plugin shows values (passwords, etc) that don’t show in logs as per the use filter\_parameter\_log. http://svn.techno-weenie.net/projects/plugins…

---

## [Question regarding a model](https://www.ruby-forum.com/t/question-regarding-a-model/122610)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 4\
**Last updated:** [December 10, 2007, 4:13am UTC](https://www.ruby-forum.com/t/question-regarding-a-model/122610 "2007-12-10T04:13:23Z")

</div>

I have model named Test\_session and am trying to add data to it. I have always been in the situation where I have the user fill out a form and then create a new entry in a table. This time I am trying to save session…

---

## [Select version of rails to install](https://www.ruby-forum.com/t/select-version-of-rails-to-install/122607)

<div class="topic-metadata">

**Author:** [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 3:54am UTC](https://www.ruby-forum.com/t/select-version-of-rails-to-install/122607 "2007-12-10T03:54:05Z")

</div>

how can i select a version of rails to be installed? thanks, jason

---

## [Changing ids for fixtures in 2.0](https://www.ruby-forum.com/t/changing-ids-for-fixtures-in-2-0/122602)

<div class="topic-metadata">

**Author:** [@namxam](https://www.ruby-forum.com/u/namxam)\
**Replies:** 1\
**Last updated:** [December 10, 2007, 3:11am UTC](https://www.ruby-forum.com/t/changing-ids-for-fixtures-in-2-0/122602 "2007-12-10T03:11:11Z")

</div>

Well, I am not sure if I am doing something wrong, or if this behavior is intendedâ€¦ but somehow my tests are failing for rails 2.0 Ok, here is my setup. First have a look at my fixtures (events habtm users (as hosts…

---

## [Taking the RoR plunge](https://www.ruby-forum.com/t/taking-the-ror-plunge/122535)

<div class="topic-metadata">

**Author:** [@jason\_white](https://www.ruby-forum.com/u/jason_white)\
**Replies:** 4\
**Last updated:** [December 10, 2007, 2:27am UTC](https://www.ruby-forum.com/t/taking-the-ror-plunge/122535 "2007-12-10T02:27:00Z")

</div>

I’ve been programming with .Net for awhile now. Last fall i attended the Lone Star Ruby Conference, and ever since then i have been thinking of devoting all of my efforts to learning Ruby and Ruby on Rails. The big qu…

---

## [Fresh rails 2 install not working](https://www.ruby-forum.com/t/fresh-rails-2-install-not-working/122578)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 2\
**Last updated:** [December 10, 2007, 1:27am UTC](https://www.ruby-forum.com/t/fresh-rails-2-install-not-working/122578 "2007-12-10T01:27:59Z")

</div>

Hello, I’ve installed Ruby and RubyGems from sources into /opt/rails/, then I installed using gem install rails. All went well installing, but I can’t run rails, I get this error: $ ruby /opt/rails/lib/ruby/gems/1.8…

---

## [The best way to specify foreign keys?](https://www.ruby-forum.com/t/the-best-way-to-specify-foreign-keys/122531)

<div class="topic-metadata">

**Author:** [@sergio](https://www.ruby-forum.com/u/sergio)\
**Replies:** 19\
**Last updated:** [December 10, 2007, 1:20am UTC](https://www.ruby-forum.com/t/the-best-way-to-specify-foreign-keys/122531 "2007-12-10T01:20:58Z")

</div>

You can read in “Agile Web D. with Rails 2nd ed.” that migrations don’t provide a database-independent way to specify foreign key constraints, so we have to execute native DDL statements, like this of MySQL: execute …

---

## [YAML and Saving](https://www.ruby-forum.com/t/yaml-and-saving/122597)

<div class="topic-metadata">

**Author:** [@rhinomist](https://www.ruby-forum.com/u/rhinomist)\
**Replies:** 0\
**Last updated:** [December 10, 2007, 12:59am UTC](https://www.ruby-forum.com/t/yaml-and-saving/122597 "2007-12-10T00:59:15Z")

</div>

Hey, I have a quick question on using YAML or saving persistant-data types. I have to write a class-level save method for the album class that saves an @@album\_list followed by .alb, as well as saving an @@tag\_list a…

---

## [Add a method to ActiveRecord?](https://www.ruby-forum.com/t/add-a-method-to-activerecord/122297)

<div class="topic-metadata">

**Author:** [@xain](https://www.ruby-forum.com/u/xain)\
**Replies:** 9\
**Last updated:** [December 10, 2007, 12:06am UTC](https://www.ruby-forum.com/t/add-a-method-to-activerecord/122297 "2007-12-10T00:06:00Z")

</div>

I need a method, I call it “get\_or\_create(item\_name)”. When an Model.get\_or\_create(item\_name) is called, Model.find\_by\_name(item\_name) will be performed fist, if there is an item with the name, the item is return, or …

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

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