# Rails

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

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

---

## [Writing Rails tutorial](https://www.ruby-forum.com/t/writing-rails-tutorial/147073)

<div class="topic-metadata">

**Author:** [@bigos](https://www.ruby-forum.com/u/bigos)\
**Replies:** 0\
**Last updated:** [August 28, 2008, 9:42am UTC](https://www.ruby-forum.com/t/writing-rails-tutorial/147073 "2008-08-28T09:42:37Z")

</div>

I am in the process of learning Rails. This is my third attempt, and I hope that at last I am getting somewhere. I intend to write a tutorial based on my experiences, so I can also help others who like me have proble…

---

## [Ruby on Rails Developer - Looking for challenging assignement- Currently in Bay Area](https://www.ruby-forum.com/t/ruby-on-rails-developer-looking-for-challenging-assignement-currently-in-bay-area/147072)

<div class="topic-metadata">

**Author:** [@billchalam](https://www.ruby-forum.com/u/billchalam)\
**Replies:** 0\
**Last updated:** [August 28, 2008, 9:42am UTC](https://www.ruby-forum.com/t/ruby-on-rails-developer-looking-for-challenging-assignement-currently-in-bay-area/147072 "2008-08-28T09:42:37Z")

</div>

BR- Contact Tel : 408 963 6410 - For contract positions only Summary: „X Around 5 years of software development experience involving Object Oriented Programming, Web-based technologies. „X Full life cycle software …

---

## [Default route within a namespace](https://www.ruby-forum.com/t/default-route-within-a-namespace/147021)

<div class="topic-metadata">

**Author:** [@fishwebby](https://www.ruby-forum.com/u/fishwebby)\
**Replies:** 1\
**Last updated:** [August 28, 2008, 9:07am UTC](https://www.ruby-forum.com/t/default-route-within-a-namespace/147021 "2008-08-28T09:07:22Z")

</div>

Hello, I have a question about a default route within a namespace. I use the line map.root :controller =\> ‘home’ to redirect requests to the root of my website to the ‘home’ controller, which works fine. I also hav…

---

## [Content\_type and MIME::Types.type\_for](https://www.ruby-forum.com/t/content-type-and-mime-types-type-for/147037)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 1\
**Last updated:** [August 28, 2008, 9:01am UTC](https://www.ruby-forum.com/t/content-type-and-mime-types-type-for/147037 "2008-08-28T09:01:41Z")

</div>

What is the difference? Looks like they do the same thing, or?

---

## [Restful routes](https://www.ruby-forum.com/t/restful-routes/147038)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 6\
**Last updated:** [August 28, 2008, 8:39am UTC](https://www.ruby-forum.com/t/restful-routes/147038 "2008-08-28T08:39:16Z")

</div>

Hi, I’m pretty new to the concept of restful routing and am struggling to find any rails 2 info that helps with what I’m looking for. I have a regular scaffold setup and the routes are setup as default map.resources :…

---

## [Combo Select Filter Data](https://www.ruby-forum.com/t/combo-select-filter-data/147054)

<div class="topic-metadata">

**Author:** [@davox](https://www.ruby-forum.com/u/davox)\
**Replies:** 4\
**Last updated:** [August 28, 2008, 8:25am UTC](https://www.ruby-forum.com/t/combo-select-filter-data/147054 "2008-08-28T08:25:49Z")

</div>

Hi, this is my second post ( sorry for my language ) need yours helps with my problem. i need filter my model by an option in a Combo select i thing, “i should be” with observe\_field and render partial, but i have a …

---

## [Migration Error](https://www.ruby-forum.com/t/migration-error/146940)

<div class="topic-metadata">

**Author:** [@mpls](https://www.ruby-forum.com/u/mpls)\
**Replies:** 8\
**Last updated:** [August 28, 2008, 6:53am UTC](https://www.ruby-forum.com/t/migration-error/146940 "2008-08-28T06:53:53Z")

</div>

When trying to migrate my db using rake I get the following error message: rake aborted! No migration with version number 3 I am using sqlite3 as my database server. Any help is much appreciated.

---

## [Using controller methods in rake tasks](https://www.ruby-forum.com/t/using-controller-methods-in-rake-tasks/147041)

<div class="topic-metadata">

**Author:** [@corstar](https://www.ruby-forum.com/u/corstar)\
**Replies:** 4\
**Last updated:** [August 28, 2008, 6:24am UTC](https://www.ruby-forum.com/t/using-controller-methods-in-rake-tasks/147041 "2008-08-28T06:24:32Z")

</div>

I am writing a rails task that needs to call a controller method. Does anyone know how I can do this? Thanks

---

## [Displaying two different data sets at the same time](https://www.ruby-forum.com/t/displaying-two-different-data-sets-at-the-same-time/147049)

<div class="topic-metadata">

**Author:** [@elliotchyba](https://www.ruby-forum.com/u/elliotchyba)\
**Replies:** 2\
**Last updated:** [August 28, 2008, 5:11am UTC](https://www.ruby-forum.com/t/displaying-two-different-data-sets-at-the-same-time/147049 "2008-08-28T05:11:34Z")

</div>

Thanks to some help from earlier posters, I’ve been moving along with my test application. I did run into one more stumbling block, though. Say I have two sets of headlines, news and sports, the table structures are s…

---

## [Sorting with relationships? \[total noob\]](https://www.ruby-forum.com/t/sorting-with-relationships-total-noob/147058)

<div class="topic-metadata">

**Author:** [@noob2everything](https://www.ruby-forum.com/u/noob2everything)\
**Replies:** 2\
**Last updated:** [August 28, 2008, 4:27am UTC](https://www.ruby-forum.com/t/sorting-with-relationships-total-noob/147058 "2008-08-28T04:27:02Z")

</div>

Hello. I have what i assume is a simple problem. I have want to be able to sort a dataset by referencing the text name of a related class. For example: let’s pretend I have these models: “things” and “colors”. Things …

---

## [How to create dropdown box location](https://www.ruby-forum.com/t/how-to-create-dropdown-box-location/147053)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 2\
**Last updated:** [August 28, 2008, 2:51am UTC](https://www.ruby-forum.com/t/how-to-create-dropdown-box-location/147053 "2008-08-28T02:51:43Z")

</div>

how to create dropdown box then linking to new page that display its location? it seems hard 4 me(beginner). Please help me Thanx

---

## [Polymorphic associations, wrong use?](https://www.ruby-forum.com/t/polymorphic-associations-wrong-use/146888)

<div class="topic-metadata">

**Author:** [@expilo](https://www.ruby-forum.com/u/expilo)\
**Replies:** 4\
**Last updated:** [August 28, 2008, 1:16am UTC](https://www.ruby-forum.com/t/polymorphic-associations-wrong-use/146888 "2008-08-28T01:16:02Z")

</div>

Hello, I would like to populate dropdown list with values from two different models. My first idea was to create a polymorphic association. But then I got stuck with the code for a dropdown list. How to make it retu…

---

## [Problem with forms in Rails 2](https://www.ruby-forum.com/t/problem-with-forms-in-rails-2/147051)

<div class="topic-metadata">

**Author:** [@markh](https://www.ruby-forum.com/u/markh)\
**Replies:** 0\
**Last updated:** [August 28, 2008, 12:31am UTC](https://www.ruby-forum.com/t/problem-with-forms-in-rails-2/147051 "2008-08-28T00:31:18Z")

</div>

I built an app 2 years ago with version 1. I’m now using version 2.0.2 and I’ve noticed that forms have changed. I’ve a CRUD controller and my create and update methods use params\[:id\] but the id is not in the form’s …

---

## [Workaround when associated object is null](https://www.ruby-forum.com/t/workaround-when-associated-object-is-null/147046)

<div class="topic-metadata">

**Author:** [@Glen](https://www.ruby-forum.com/u/Glen)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/workaround-when-associated-object-is-null/147046 "2008-08-27T23:37:07Z")

</div>

Hi, I am trying to generate CSV like blow. students = Student.find(:all, :include =\> \[:application, :person\], :conditions =\> conditions) csv\_string = FasterCSV.generate do |csv| csv \<\< %w\["student\_status", "semeste…

---

## [Validation question](https://www.ruby-forum.com/t/validation-question/147035)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 5\
**Last updated:** [August 27, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/validation-question/147035 "2008-08-27T23:05:52Z")

</div>

I’m trying to validate a record before save. I’m using one controller in this case furnii where I have all my calls. The problem is that, the form containing the field I’m trying to validate resides in the furnii vi…

---

## [Why are schema.rb, migrations, models separated?](https://www.ruby-forum.com/t/why-are-schema-rb-migrations-models-separated/146941)

<div class="topic-metadata">

**Author:** [@klauer](https://www.ruby-forum.com/u/klauer)\
**Replies:** 2\
**Last updated:** [August 27, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/why-are-schema-rb-migrations-models-separated/146941 "2008-08-27T22:49:07Z")

</div>

Long story short: I’ve been looking at Grails and noticed their models contain both the schema information as well as the normal validation, constraint information. Does doing it that way pose some serious deficiencie…

---

## [Helpers in rails to get URL (using AJAX)](https://www.ruby-forum.com/t/helpers-in-rails-to-get-url-using-ajax/147039)

<div class="topic-metadata">

**Author:** [@Thib21](https://www.ruby-forum.com/u/Thib21)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/helpers-in-rails-to-get-url-using-ajax/147039 "2008-08-27T22:12:47Z")

</div>

Hello all, I am trying to get (using Ajax) the URL which is sent to the server when I click on a button/link Also, I want to store the results from this URL request Did somebody know helper in Rails which allow me to…

---

## [Sanitize SQL?](https://www.ruby-forum.com/t/sanitize-sql/147034)

<div class="topic-metadata">

**Author:** [@Clinton\_Judy](https://www.ruby-forum.com/u/Clinton_Judy)\
**Replies:** 2\
**Last updated:** [August 27, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/sanitize-sql/147034 "2008-08-27T22:01:03Z")

</div>

I have the following code in my model, that executes a stored procedure: connection.execute "exec PS\_SaveData ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?", day.to\_s, crew\_leader.to\_s, dayshiftyn.to\_s, numtruck…

---

## [Id field without autoincrement option in migraion](https://www.ruby-forum.com/t/id-field-without-autoincrement-option-in-migraion/112916)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 5\
**Last updated:** [August 27, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/id-field-without-autoincrement-option-in-migraion/112916 "2008-08-27T21:59:52Z")

</div>

Hi everybody, I want to create a table using the rails migration, in which I want to disable the auto increment option option for the id field. Is there any way. I know we can avoid the id field as :id =\> false in mig…

---

## [How do you include lib files](https://www.ruby-forum.com/t/how-do-you-include-lib-files/146978)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 6\
**Last updated:** [August 27, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/how-do-you-include-lib-files/146978 "2008-08-27T21:24:38Z")

</div>

I have some additional Array methods I would like to make available, but I can’t figure out how to load them. Thanks for the help.

---

## [2.1 bug?: AR save doesn't work after gsub! on an attribute](https://www.ruby-forum.com/t/2-1-bug-ar-save-doesnt-work-after-gsub-on-an-attribute/140861)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 15\
**Last updated:** [August 27, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/2-1-bug-ar-save-doesnt-work-after-gsub-on-an-attribute/140861 "2008-08-27T20:51:12Z")

</div>

All, Rails 2.1 MySQL 5.x Mac OS X 10.5 I think I’ve found a significant bug in ActiveRecord::save relating to the use of gsub! on String attributes. Given: A model m with one attribute x, a string. If I attempt to…

---

## [Sorting records into groups by date](https://www.ruby-forum.com/t/sorting-records-into-groups-by-date/147033)

<div class="topic-metadata">

**Author:** [@elliotchyba](https://www.ruby-forum.com/u/elliotchyba)\
**Replies:** 2\
**Last updated:** [August 27, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/sorting-records-into-groups-by-date/147033 "2008-08-27T20:38:21Z")

</div>

I’m trying to wrap my head around this idea, and thought I might be able to solicit the help of the community a little bit. @comments = Finding all comments for a particular thread. Each comment has a date of when i…

---

## [Getting "undefined method \`macro'" for different classes](https://www.ruby-forum.com/t/getting-undefined-method-macro-for-different-classes/146985)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 8\
**Last updated:** [August 27, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/getting-undefined-method-macro-for-different-classes/146985 "2008-08-27T19:58:31Z")

</div>

I am not sure what is causing this. As mentioned I am getting the same error from different classes and no where do I have a custom macro method. I have reset the server a few times, but I still get the same thing. …

---

## [Link\_to](https://www.ruby-forum.com/t/link-to/147030)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/link-to/147030 "2008-08-27T19:36:11Z")

</div>

I have this general menu that appears on every page so you can navigate to other pages. On a couple of pages I need to add some code that checks to see if certain text\_fields are filled in or not, if they are and they …

---

## [Authorization plugin ....broken?](https://www.ruby-forum.com/t/authorization-plugin-broken/143034)

<div class="topic-metadata">

**Author:** [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Replies:** 2\
**Last updated:** [August 27, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/authorization-plugin-broken/143034 "2008-08-27T19:19:42Z")

</div>

Hello, I’ve used the authorization plugin for a long time (3 months) with great success. Recently, I began a new project and installed the plugin in this manner: ./script/plugin install http://rails-authorization-p…

---

## [Redirect with multi-dimensional parameter hashes](https://www.ruby-forum.com/t/redirect-with-multi-dimensional-parameter-hashes/147028)

<div class="topic-metadata">

**Author:** [@mex23](https://www.ruby-forum.com/u/mex23)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 6:50pm UTC](https://www.ruby-forum.com/t/redirect-with-multi-dimensional-parameter-hashes/147028 "2008-08-27T18:50:25Z")

</div>

Hi, Is it possible to redirect passing multi dimensional parameters? I need to send params\[:current\]\[:selview\] to another action mantaining the same data structure if I try as follows: redirect\_to :controller=\>“main…

---

## [Active Record design seems awkward and possibly broken](https://www.ruby-forum.com/t/active-record-design-seems-awkward-and-possibly-broken/48891)

<div class="topic-metadata">

**Author:** [@grahamglass](https://www.ruby-forum.com/u/grahamglass)\
**Replies:** 27\
**Last updated:** [August 27, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/active-record-design-seems-awkward-and-possibly-broken/48891 "2008-08-27T18:10:10Z")

</div>

Hi Guys, I’ve been using Rails for the first time and have encountered some issues that I’m not sure are a result of my inexperience with Rails or a design oversight. In my domain model, a School has an Address. In S…

---

## [Collections on routes](https://www.ruby-forum.com/t/collections-on-routes/147027)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/collections-on-routes/147027 "2008-08-27T17:52:56Z")

</div>

I need some help!! How do i put more than one collection for each controller on the routes for example i have this map.resources :posts, :collection=\>{:render\_rss=\>:any} i need to add {:render\_feed=\>:any} – Felip…

---

## [Model help with school app](https://www.ruby-forum.com/t/model-help-with-school-app/147007)

<div class="topic-metadata">

**Author:** [@anthony](https://www.ruby-forum.com/u/anthony)\
**Replies:** 6\
**Last updated:** [August 27, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/model-help-with-school-app/147007 "2008-08-27T17:38:44Z")

</div>

Hello. I have an app that I need help laying out the model relationships for. Schools can have more than one admin Schools can have more than one student Students can only belong to one school BUT Admins can have ma…

---

## [Sporadic NonInferrableControllerError on nested controller tests with Rails 2.1](https://www.ruby-forum.com/t/sporadic-noninferrablecontrollererror-on-nested-controller-tests-with-rails-2-1/146955)

<div class="topic-metadata">

**Author:** [@Yuval](https://www.ruby-forum.com/u/Yuval)\
**Replies:** 2\
**Last updated:** [August 27, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/sporadic-noninferrablecontrollererror-on-nested-controller-tests-with-rails-2-1/146955 "2008-08-27T17:36:29Z")

</div>

Hey folks. I’ve been getting this aggravating error sporadically on some of my nested controller tests since upgrading to Rails 2.1. The last bout seems to be here to stay and it’s driving me mad. I have the following…

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

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