# Rails

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

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

---

## [Overriding stylesheet\_link\_tag to accept a conditions hash](https://www.ruby-forum.com/t/overriding-stylesheet-link-tag-to-accept-a-conditions-hash/145515)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 11, 2008, 5:10am UTC](https://www.ruby-forum.com/t/overriding-stylesheet-link-tag-to-accept-a-conditions-hash/145515 "2008-08-11T05:10:58Z")

</div>

so im browsing rails-doc.org in a fruitless attempt to see how hard this is to implement… maybe someone can give me some better ideas… i want to override stylesheet\_link\_tag like this… \<%= stylesheet\_link\_tag :all, { …

---

## [:dependent not working](https://www.ruby-forum.com/t/dependent-not-working/145464)

<div class="topic-metadata">

**Author:** [@mostafa\_badawi](https://www.ruby-forum.com/u/mostafa_badawi)\
**Replies:** 2\
**Last updated:** [August 11, 2008, 12:32am UTC](https://www.ruby-forum.com/t/dependent-not-working/145464 "2008-08-11T00:32:07Z")

</div>

Hi all, I know it’s stupid, i am having this problem that is :dependant option don’t work in all it’s values \[:destroy, :delete\_all, :nullify\]. child items don’t be deleted when parent item does. any idea? thanks …

---

## [Rails 2.1 UTC & Local Time](https://www.ruby-forum.com/t/rails-2-1-utc-local-time/145434)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [August 11, 2008, 12:00am UTC](https://www.ruby-forum.com/t/rails-2-1-utc-local-time/145434 "2008-08-11T00:00:31Z")

</div>

I wrote the follwoing code to force the time before saving a record (using UTC in my config environment) e = self.ending\_at self.starting\_at = Time.utc(s.to\_date.year, s.to\_date.month, s.to\_date.day, 0, 0, 1) sel…

---

## [Aplication like flashden](https://www.ruby-forum.com/t/aplication-like-flashden/145474)

<div class="topic-metadata">

**Author:** [@ramiz](https://www.ruby-forum.com/u/ramiz)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 11:30pm UTC](https://www.ruby-forum.com/t/aplication-like-flashden/145474 "2008-08-10T23:30:06Z")

</div>

hi im looking for a tutorial to creat an web application like flashden.net, where usere can register and sale files or other things. I think this application is a combine of a community and a shop beacuse every user h…

---

## [Day 2 on Ruby - Confused](https://www.ruby-forum.com/t/day-2-on-ruby-confused/145472)

<div class="topic-metadata">

**Author:** [@trope](https://www.ruby-forum.com/u/trope)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/day-2-on-ruby-confused/145472 "2008-08-10T23:29:30Z")

</div>

Ok I admit , the screencasts and from what I have seen so far got me excited. I am an experienced PHP, C++, Assembly, etc programmer. I have been around this block many times. I know you need to “pay your dues” before…

---

## [REST and multiple resources in a view?](https://www.ruby-forum.com/t/rest-and-multiple-resources-in-a-view/145194)

<div class="topic-metadata">

**Author:** [@billis](https://www.ruby-forum.com/u/billis)\
**Replies:** 6\
**Last updated:** [August 10, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/rest-and-multiple-resources-in-a-view/145194 "2008-08-10T22:18:04Z")

</div>

hello all, I’m trying to get my feet wet with a small webapp but it’s getting frustrating to put together all the pieces of the REST/CRUD/restful controllers/composite views (composite meaning with more than 1 resour…

---

## [Setting proper Culture to my Rails app](https://www.ruby-forum.com/t/setting-proper-culture-to-my-rails-app/145498)

<div class="topic-metadata">

**Author:** [@sohdubom](https://www.ruby-forum.com/u/sohdubom)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/setting-proper-culture-to-my-rails-app/145498 "2008-08-10T22:06:44Z")

</div>

Hi. Any Rails app has its culture set to EN-us, right? So :precision =\> 8, :scale =\> 2 means numbers like -999,999.99 to 999,999.99. But suppose you have to develop an app in another culture, eg PT-br (portuguese-braz…

---

## [Restful\_authentication plugin and http\_basic problem](https://www.ruby-forum.com/t/restful-authentication-plugin-and-http-basic-problem/145470)

<div class="topic-metadata">

**Author:** [@mcarlson](https://www.ruby-forum.com/u/mcarlson)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 9:52pm UTC](https://www.ruby-forum.com/t/restful-authentication-plugin-and-http-basic-problem/145470 "2008-08-10T21:52:19Z")

</div>

So I installed the most recent restful\_authentication plugin from github and ran into a frustrating problem… on Internet Explorer 6 and 7 I received a security dialog box rather than seeing the login view. When I clic…

---

## [ActiveRecord Errors are all nil](https://www.ruby-forum.com/t/activerecord-errors-are-all-nil/145492)

<div class="topic-metadata">

**Author:** [@omarqazi](https://www.ruby-forum.com/u/omarqazi)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/activerecord-errors-are-all-nil/145492 "2008-08-10T20:59:04Z")

</div>

I have an Active Record model in Rails 2.1 that is doing some validation, specifically, these methods: validates\_presence\_of :name, :email, :phone validates\_uniqueness\_of :name validates\_format\_of :email, :with =\> /.…

---

## [Noobie controller model method difficulty](https://www.ruby-forum.com/t/noobie-controller-model-method-difficulty/145485)

<div class="topic-metadata">

**Author:** [@tyliong](https://www.ruby-forum.com/u/tyliong)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/noobie-controller-model-method-difficulty/145485 "2008-08-10T17:44:40Z")

</div>

I am a real newbie at rails please help me. I have a controller called groceries and a model also called groceries. I generated both the model and controller with the /script. I thought inside the controller i could c…

---

## [NoMethodError (undefined method \`model' for ContactControlle](https://www.ruby-forum.com/t/nomethoderror-undefined-method-model-for-contactcontrolle/145478)

<div class="topic-metadata">

**Author:** [@keithtom](https://www.ruby-forum.com/u/keithtom)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-model-for-contactcontrolle/145478 "2008-08-10T17:40:48Z")

</div>

I get an error message: NoMethodError (undefined method \`model’ for ContactController:Class): The error occurs when processing the statement: model :contact in the file app/controllers/contact\_controller.rb (see b…

---

## [Timed tasks](https://www.ruby-forum.com/t/timed-tasks/145371)

<div class="topic-metadata">

**Author:** [@andrius\_c](https://www.ruby-forum.com/u/andrius_c)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/timed-tasks/145371 "2008-08-10T16:37:20Z")

</div>

Here’s the situation. I have a set of tasks that need to be executed after some specific time after they were created (say 9876 seconds). They only need to be executed once. Also there can potentially be tens of thous…

---

## [New rails deployment getting errors starting webrick/thin](https://www.ruby-forum.com/t/new-rails-deployment-getting-errors-starting-webrick-thin/145436)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 4:02pm UTC](https://www.ruby-forum.com/t/new-rails-deployment-getting-errors-starting-webrick-thin/145436 "2008-08-10T16:02:46Z")

</div>

I just installed rails on a new development environment running ubuntu 8.04 i have installed gem 1.2.0 and the following ruby packages: sudo aptitude install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1…

---

## [NoMethodError (undefined method \`model' for ContactControlle](https://www.ruby-forum.com/t/nomethoderror-undefined-method-model-for-contactcontrolle/145475)

<div class="topic-metadata">

**Author:** [@keithtom](https://www.ruby-forum.com/u/keithtom)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-model-for-contactcontrolle/145475 "2008-08-10T15:43:58Z")

</div>

First rails application! I can not figure out all the details of how the method ‘model’ is defined ! The error occurs when processing the statement: model :contact in the file app/controllers/contact\_controller.rb f…

---

## [REST nested resources](https://www.ruby-forum.com/t/rest-nested-resources/144300)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 17\
**Last updated:** [August 10, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/rest-nested-resources/144300 "2008-08-10T13:42:48Z")

</div>

Hi I’m porting an existing project to fit the REST philosofie. I have 3 resources that are nested: users, companies and roles. A user has and belongs to multiple companies, and depening on the company, a role will be…

---

## [Can I have a constraint like this.....?](https://www.ruby-forum.com/t/can-i-have-a-constraint-like-this/145433)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/can-i-have-a-constraint-like-this/145433 "2008-08-10T12:42:38Z")

</div>

Hi, Is it possible to have a SQL constraint (I am on mysql at the moment) for the following? Background: Table has a parent\_id column that allow a row in the table to reference another row in the table. The table l…

---

## [Mysql::Error: Lost connection to MySQL server during query:](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query/53517)

<div class="topic-metadata">

**Author:** [@Aaron\_Lee](https://www.ruby-forum.com/u/Aaron_Lee)\
**Replies:** 6\
**Last updated:** [August 10, 2008, 11:02am UTC](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query/53517 "2008-08-10T11:02:10Z")

</div>

Hi, I am having Mysql connection problem for my first AddressBook application (which I took it from http://www-128.ibm.com/developerworks/linux/library/l-rubyrails/) I have gem installed the latest ruby, rails, light…

---

## [Thinking Sphinx: tabbed interface](https://www.ruby-forum.com/t/thinking-sphinx-tabbed-interface/145468)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 0\
**Last updated:** [August 10, 2008, 9:48am UTC](https://www.ruby-forum.com/t/thinking-sphinx-tabbed-interface/145468 "2008-08-10T09:48:51Z")

</div>

I’m implementing search based on the recent Railscast on Thinking Sphinx. I have a reasonably complex tabbed interface for the results. The searches controller handles the searches, and :collections, like :comments =\> …

---

## [Select\_tag form \[extreme noob help\]](https://www.ruby-forum.com/t/select-tag-form-extreme-noob-help/145463)

<div class="topic-metadata">

**Author:** [@athel](https://www.ruby-forum.com/u/athel)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 9:40am UTC](https://www.ruby-forum.com/t/select-tag-form-extreme-noob-help/145463 "2008-08-10T09:40:38Z")

</div>

Ok, so I’m trying to develop a drop down box with only 3 options. I can either successfully get the drop down box created, but not able to save it to the database -OR- it completely crashes. I have 3 options for “bus…

---

## [Acts\_as\_state\_machine error](https://www.ruby-forum.com/t/acts-as-state-machine-error/145301)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 9:04am UTC](https://www.ruby-forum.com/t/acts-as-state-machine-error/145301 "2008-08-10T09:04:59Z")

</div>

If I try and change the state of an unsaved object I get the following error. If I first save the object then do the call it is fine… is this a known bug or am I doing something wrong? (most likely the latter!) pt.…

---

## [Text\_field for join table metadata with HMT](https://www.ruby-forum.com/t/text-field-for-join-table-metadata-with-hmt/145435)

<div class="topic-metadata">

**Author:** [@powertoold](https://www.ruby-forum.com/u/powertoold)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 7:14am UTC](https://www.ruby-forum.com/t/text-field-for-join-table-metadata-with-hmt/145435 "2008-08-10T07:14:32Z")

</div>

Hello, I am having trouble making a text\_field that changes the attribute of a column in a join table (made using has\_many :through). Here a summary of my code: #Table create\_table thingstuff: thing\_id, stuff\_id, he…

---

## [Load fixtures in setup? (or is it test-spec's fault)](https://www.ruby-forum.com/t/load-fixtures-in-setup-or-is-it-test-specs-fault/145424)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 7\
**Last updated:** [August 10, 2008, 6:49am UTC](https://www.ruby-forum.com/t/load-fixtures-in-setup-or-is-it-test-specs-fault/145424 "2008-08-10T06:49:59Z")

</div>

Railsters: For various reasons, not worth discussing here, we’d really prefer to load fixtures like this: class MySuite \< etc::TestCase def setup fixtures :posts, :forums, :whatnots end … end Does anyone know ho…

---

## [STI and has many relationships](https://www.ruby-forum.com/t/sti-and-has-many-relationships/145465)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 0\
**Last updated:** [August 10, 2008, 5:18am UTC](https://www.ruby-forum.com/t/sti-and-has-many-relationships/145465 "2008-08-10T05:18:13Z")

</div>

Looking at the example in Obie’s book. Class Place \< ActiveRecord::Base end class State \< Place has\_many :counties has\_man :cities end class County \< Place belongs\_to :state has\_many :cities end class City \< P…

---

## [Way of handling slow upload processing](https://www.ruby-forum.com/t/way-of-handling-slow-upload-processing/145461)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 4:16am UTC](https://www.ruby-forum.com/t/way-of-handling-slow-upload-processing/145461 "2008-08-10T04:16:56Z")

</div>

Hi, I’ve written code to upload files a la Agile Web D. with Rails Second edition. The thing is, its awfully slow. In my tests, I was processing an uploaded image using RMagick. My new project doesn’t require me to…

---

## [Problem with Rails gem](https://www.ruby-forum.com/t/problem-with-rails-gem/145456)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 3:09am UTC](https://www.ruby-forum.com/t/problem-with-rails-gem/145456 "2008-08-10T03:09:36Z")

</div>

Hi, So when I go to execute script/plugin it tells me: Missing the Rails 2.1.0 gem. Please gem install -v=2.1.0 rails, update your RAILS\_GEM\_VERSION setting in config/environment.rb for the Rails version you do have …

---

## [How should I model this?](https://www.ruby-forum.com/t/how-should-i-model-this/145460)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 2:36am UTC](https://www.ruby-forum.com/t/how-should-i-model-this/145460 "2008-08-10T02:36:51Z")

</div>

I have Users and Tasks. Each User will complete the same Tasks, and I want to record the date of completion. Any suggestions on the best way to model this?

---

## [Loading tinyMCE via Ajax](https://www.ruby-forum.com/t/loading-tinymce-via-ajax/144820)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 1:58am UTC](https://www.ruby-forum.com/t/loading-tinymce-via-ajax/144820 "2008-08-10T01:58:16Z")

</div>

Hi all, I’m trying to use a tinyMCE text editor in my Rails app and am having some problems. I’m trying to load a tinyMCE-enabled form dynamically as the result of an Ajax call, i.e. I want to insert the form into a …

---

## [Best way to update site under thin](https://www.ruby-forum.com/t/best-way-to-update-site-under-thin/145449)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 3\
**Last updated:** [August 9, 2008, 9:46pm UTC](https://www.ruby-forum.com/t/best-way-to-update-site-under-thin/145449 "2008-08-09T21:46:03Z")

</div>

recently i have been using apache/passenger (mod\_rails) as my production/development environment but have been having some issues so i switched to nginx/thin. what i am wondering is how should i push my updates now if…

---

## [DSDB (domain-specific database)?](https://www.ruby-forum.com/t/dsdb-domain-specific-database/145452)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 0\
**Last updated:** [August 9, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/dsdb-domain-specific-database/145452 "2008-08-09T21:24:29Z")

</div>

Greetings! I’ve begun working on a Ruby library that will process XML files known as CCRs (an ASTM standard). I’m at what feels like a major decision point and I could use some help thinking through the alternatives.…

---

## [Ruby on Rails Installation - Standalone](https://www.ruby-forum.com/t/ruby-on-rails-installation-standalone/145400)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 9, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-installation-standalone/145400 "2008-08-09T19:23:59Z")

</div>

Hello Everyone, I am a newbie to ruby. Can someone post a step by step standalone installtion of ruby on rails in windows as well as ubuntu . This is my first day with ruby. any help is highly appriciated Thanks, Av…

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

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