# Rails

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

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

---

## [Date-agnostic times](https://www.ruby-forum.com/t/date-agnostic-times/139345)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 4\
**Last updated:** [June 4, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/date-agnostic-times/139345 "2008-06-04T15:18:21Z")

</div>

Let’s say I have a Trains model with arrival\_time specified in the migration as a :time. How can I structure the model and the query so that I can find all trains with an arrival\_time between 7:30 and 9:30am, no matte…

---

## [Datetime\_select tag bug? or my fault?](https://www.ruby-forum.com/t/datetime-select-tag-bug-or-my-fault/139409)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 10\
**Last updated:** [June 4, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/datetime-select-tag-bug-or-my-fault/139409 "2008-06-04T14:07:28Z")

</div>

All morning and last night I have had to work with this bug / or my fault in the following : I wish for the user to select an arrival date (m/d/y); the arrival date is of type datetime. when I have Arrives :\<%= pu.d…

---

## [Model#find returns wrong class](https://www.ruby-forum.com/t/model-find-returns-wrong-class/139382)

<div class="topic-metadata">

**Author:** [@joachimgross](https://www.ruby-forum.com/u/joachimgross)\
**Replies:** 1\
**Last updated:** [June 4, 2008, 2:06pm UTC](https://www.ruby-forum.com/t/model-find-returns-wrong-class/139382 "2008-06-04T14:06:12Z")

</div>

Hi, I’ve one specific database view which troubles me. I set up a model mytestmodel.rb: class Mytestmodel \< ActiveRecord::Base set\_table\_name “shop\_view1” end ./script/console output (development environment) My…

---

## [Dynamic page caching directory based on subdomain name](https://www.ruby-forum.com/t/dynamic-page-caching-directory-based-on-subdomain-name/139411)

<div class="topic-metadata">

**Author:** [@sucrenoir](https://www.ruby-forum.com/u/sucrenoir)\
**Replies:** 3\
**Last updated:** [June 4, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/dynamic-page-caching-directory-based-on-subdomain-name/139411 "2008-06-04T13:28:24Z")

</div>

I am looking for the best way to set the cache directory based on the subdomain. Example : if the subdomain host is fr.mydomain.com, i want to cache the file in ROOT/cache/fr and if it is en.mydomain.com, i want to c…

---

## [Suggestions for adding a new abstract data type to AR using a composed\_of](https://www.ruby-forum.com/t/suggestions-for-adding-a-new-abstract-data-type-to-ar-using-a-composed-of/139496)

<div class="topic-metadata">

**Author:** [@Manuel\_Vidaurre](https://www.ruby-forum.com/u/Manuel_Vidaurre)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 1:07pm UTC](https://www.ruby-forum.com/t/suggestions-for-adding-a-new-abstract-data-type-to-ar-using-a-composed-of/139496 "2008-06-04T13:07:31Z")

</div>

Hello everybody, I had been searching the web but I can’t find a way to add a new abstract data type to AR using a composed\_of. To put this in context let me explain what I want to do: In a rails app I had developed …

---

## [Adding up blocks of time - project with tasks](https://www.ruby-forum.com/t/adding-up-blocks-of-time-project-with-tasks/139306)

<div class="topic-metadata">

**Author:** [@gorgeoussoul](https://www.ruby-forum.com/u/gorgeoussoul)\
**Replies:** 2\
**Last updated:** [June 4, 2008, 12:17pm UTC](https://www.ruby-forum.com/t/adding-up-blocks-of-time-project-with-tasks/139306 "2008-06-04T12:17:03Z")

</div>

I’m building a collection of project management screens. I want to be able to set up time estimates for each task in a project. And then I want to be able to sum all the estimates, so that I can give an expected compl…

---

## [Squeegy Fleximage](https://www.ruby-forum.com/t/squeegy-fleximage/139301)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 1\
**Last updated:** [June 4, 2008, 12:14pm UTC](https://www.ruby-forum.com/t/squeegy-fleximage/139301 "2008-06-04T12:14:41Z")

</div>

Hello All, I’ve been using squeegy fleximage for my image uploads. However while migrating my db, say through seeds, I’m not being able to completely achieve this because I’m having a " Validation failed: Image file i…

---

## [Job: Ruby on rails developer](https://www.ruby-forum.com/t/job-ruby-on-rails-developer/139487)

<div class="topic-metadata">

**Author:** [@ludmilavolkova](https://www.ruby-forum.com/u/ludmilavolkova)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 11:57am UTC](https://www.ruby-forum.com/t/job-ruby-on-rails-developer/139487 "2008-06-04T11:57:49Z")

</div>

Looking for an experienced developer who is comfortable with dynamic programming languages, web application development, and building clean, scalable, testable code. The candidate will be an active member of the team,…

---

## [Ruby on Rails developer](https://www.ruby-forum.com/t/ruby-on-rails-developer/139481)

<div class="topic-metadata">

**Author:** [@ludmilavolkova](https://www.ruby-forum.com/u/ludmilavolkova)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 10:47am UTC](https://www.ruby-forum.com/t/ruby-on-rails-developer/139481 "2008-06-04T10:47:08Z")

</div>

Hia All, We are looking for an experienced developer who is comfortable with dynamic programming languages, web application development, and building clean, scalable, testable code. The candidate will be an active me…

---

## [Update\_attribute updates too much](https://www.ruby-forum.com/t/update-attribute-updates-too-much/139422)

<div class="topic-metadata">

**Author:** [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Replies:** 2\
**Last updated:** [June 4, 2008, 10:13am UTC](https://www.ruby-forum.com/t/update-attribute-updates-too-much/139422 "2008-06-04T10:13:56Z")

</div>

Hi all. Maybe somebody can explain that to me: def create @orders = Order.find(:all, :conditions =\> \[“products.member\_id = ?”, current\_login.member.id\]) new payment @payment = Payment.new @payment.member = current\_l…

---

## [Rails 2.1 and DB2](https://www.ruby-forum.com/t/rails-2-1-and-db2/139393)

<div class="topic-metadata">

**Author:** [@kisrti](https://www.ruby-forum.com/u/kisrti)\
**Replies:** 2\
**Last updated:** [June 4, 2008, 9:50am UTC](https://www.ruby-forum.com/t/rails-2-1-and-db2/139393 "2008-06-04T09:50:33Z")

</div>

Hello all, Can anyone tell me which adapter is used to connect rails 2.1 and db2. ibm\_db2 0.9.4 is not working for me. thank you

---

## [Change simple format](https://www.ruby-forum.com/t/change-simple-format/139475)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 9:41am UTC](https://www.ruby-forum.com/t/change-simple-format/139475 "2008-06-04T09:41:07Z")

</div>

Hi, I am changed simple format method and added first line code for replacing spaces for formatting in this it works but other code means new line paragraphs are not working? I want a such method which format all w…

---

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

<div class="topic-metadata">

**Author:** [@Kieran\_P](https://www.ruby-forum.com/u/Kieran_P)\
**Replies:** 8\
**Last updated:** [June 4, 2008, 8:41am UTC](https://www.ruby-forum.com/t/problem-with-validates-length-of/139392 "2008-06-04T08:41:35Z")

</div>

I’m passing a field called :year, to the game model for a new game. It has the validation validates\_length\_of :year, :is =\> 4, :if =\> :check\_year? The if works (a similar validates\_numericality\_of :year) is being ch…

---

## [What is a NameError?](https://www.ruby-forum.com/t/what-is-a-nameerror/139469)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 4, 2008, 8:30am UTC](https://www.ruby-forum.com/t/what-is-a-nameerror/139469 "2008-06-04T08:30:25Z")

</div>

Hi, What is a NameError? When I visit the root page of my application, I get an application error. Upon checking the logs, the stack trace is below. I have also included my environment.rb and routes.rb files, if t…

---

## [Restful-authentication error with Rails 2.1.0](https://www.ruby-forum.com/t/restful-authentication-error-with-rails-2-1-0/139472)

<div class="topic-metadata">

**Author:** [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 7:02am UTC](https://www.ruby-forum.com/t/restful-authentication-error-with-rails-2-1-0/139472 "2008-06-04T07:02:18Z")

</div>

I just tried out restful-authentication and was having trouble with a clean install of Rails 2.1.0. The hyphen in the plugin name appears to be the problem. I’m not sure how to contact the author(s) but I’ve posted mo…

---

## [Download sample code in The Rails Way (2.0) -- How?](https://www.ruby-forum.com/t/download-sample-code-in-the-rails-way-2-0-how/139203)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 4\
**Last updated:** [June 4, 2008, 6:54am UTC](https://www.ruby-forum.com/t/download-sample-code-in-the-rails-way-2-0-how/139203 "2008-06-04T06:54:12Z")

</div>

Hi, I’ve got Fernandez’s book published by Addison-Wesley and would like to try out some of his examples. Is there any way to download the sample code so I can avoid wasting time (mis-)typing it myself? Addison-Wesl…

---

## [How can i get all table names of an mysql database](https://www.ruby-forum.com/t/how-can-i-get-all-table-names-of-an-mysql-database/139466)

<div class="topic-metadata">

**Author:** [@tristan](https://www.ruby-forum.com/u/tristan)\
**Replies:** 4\
**Last updated:** [June 4, 2008, 5:08am UTC](https://www.ruby-forum.com/t/how-can-i-get-all-table-names-of-an-mysql-database/139466 "2008-06-04T05:08:53Z")

</div>

after i connect to a mysql database,how can i get the table names in this db?

---

## [AR Plugin class method calls from instance methods](https://www.ruby-forum.com/t/ar-plugin-class-method-calls-from-instance-methods/139436)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [June 4, 2008, 5:04am UTC](https://www.ruby-forum.com/t/ar-plugin-class-method-calls-from-instance-methods/139436 "2008-06-04T05:04:48Z")

</div>

Working on an ActiveRecord plugin. It’s a bit of a complex thing in which in an instance method, the domain logic requires a search on the table. In the code below, the find in do\_object\_stuff gripes with an undefine…

---

## [\[ANN\] Moved rubber to github](https://www.ruby-forum.com/t/ann-moved-rubber-to-github/139464)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 4:48am UTC](https://www.ruby-forum.com/t/ann-moved-rubber-to-github/139464 "2008-06-04T04:48:25Z")

</div>

I recently moved my rubber deployment plugin to github. For those new to rubber, it enables relatively complex multi-instance deployments of rails apps to Amazon’s Elastic Compute Cloud (EC2). See the wiki page on g…

---

## [Filter Array](https://www.ruby-forum.com/t/filter-array/139362)

<div class="topic-metadata">

**Author:** [@hloooi](https://www.ruby-forum.com/u/hloooi)\
**Replies:** 5\
**Last updated:** [June 4, 2008, 3:59am UTC](https://www.ruby-forum.com/t/filter-array/139362 "2008-06-04T03:59:17Z")

</div>

hihi, can i ask if how can i filter an Array using ruby? i have this xml doc with these datas a b c this is my code invisibility = XPath.first( doc, “//lm:landmark” ) XPath.each( doc, “//lm:name”) { |element| put…

---

## ["Rendering a template", API doc missing "2.x"?](https://www.ruby-forum.com/t/rendering-a-template-api-doc-missing-2-x/139451)

<div class="topic-metadata">

**Author:** [@someone](https://www.ruby-forum.com/u/someone)\
**Replies:** 1\
**Last updated:** [June 4, 2008, 2:51am UTC](https://www.ruby-forum.com/t/rendering-a-template-api-doc-missing-2-x/139451 "2008-06-04T02:51:13Z")

</div>

The api document for “Rendering a template” at http://api.rubyonrails.com/classes/ActionController/Base.html#M000452 has: Renders the template located in \[TEMPLATE\_ROOT\]/weblog/show.r(html| xml) (in Rails, app/views/…

---

## [Reload! doesn't work](https://www.ruby-forum.com/t/reload-doesnt-work/139446)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 3\
**Last updated:** [June 4, 2008, 2:43am UTC](https://www.ruby-forum.com/t/reload-doesnt-work/139446 "2008-06-04T02:43:09Z")

</div>

Hi! I’d like not to have to quit an re-enter into rails console when i change somethings in my model, the instruction reload! lead me to systematic “unknown method” error does anybody faced to this kind of problem?? …

---

## [Wacky View errors](https://www.ruby-forum.com/t/wacky-view-errors/139463)

<div class="topic-metadata">

**Author:** [@taro](https://www.ruby-forum.com/u/taro)\
**Replies:** 2\
**Last updated:** [June 4, 2008, 2:41am UTC](https://www.ruby-forum.com/t/wacky-view-errors/139463 "2008-06-04T02:41:59Z")

</div>

I have what seems to be internal errors in my views, according to my functional tests: test\_no\_param\_edit\_member(MemberListControllerTest): ActionView::TemplateError: undefined method \`merge’ for “First name”:String …

---

## [Money representation: float or BigDecimal?](https://www.ruby-forum.com/t/money-representation-float-or-bigdecimal/139452)

<div class="topic-metadata">

**Author:** [@Eric\_LIn](https://www.ruby-forum.com/u/Eric_LIn)\
**Replies:** 7\
**Last updated:** [June 4, 2008, 1:49am UTC](https://www.ruby-forum.com/t/money-representation-float-or-bigdecimal/139452 "2008-06-04T01:49:54Z")

</div>

My application deals a lot with money. I’m currently using BigDecimal (SQL decimal) to represent money, which is kind of a hassle because of all the BigDecimal.new(’…’) calls. For this reason, I’m considering switch…

---

## [Fixtures Error With Rails 2.1 (and 2.0.2)](https://www.ruby-forum.com/t/fixtures-error-with-rails-2-1-and-2-0-2/139453)

<div class="topic-metadata">

**Author:** [@Derek\_P](https://www.ruby-forum.com/u/Derek_P)\
**Replies:** 3\
**Last updated:** [June 4, 2008, 1:13am UTC](https://www.ruby-forum.com/t/fixtures-error-with-rails-2-1-and-2-0-2/139453 "2008-06-04T01:13:37Z")

</div>

I have begun to use the reference function feature of sexy migrations, and I have noticed that the fixtures are actually not playing nice with this new feature. If I create a model, whose table has this line: t.refer…

---

## [Pagination and model calculated fields](https://www.ruby-forum.com/t/pagination-and-model-calculated-fields/139449)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 0\
**Last updated:** [June 4, 2008, 12:53am UTC](https://www.ruby-forum.com/t/pagination-and-model-calculated-fields/139449 "2008-06-04T00:53:04Z")

</div>

class Client has\_many :placements class Placement belongs\_to :clients class Client… def current\_client if Placement.find(:first, :conditions =\> \[“discharge\_date IS NULL AND accepted IS true AND client\_id = ?”…

---

## [Console does not reload](https://www.ruby-forum.com/t/console-does-not-reload/87289)

<div class="topic-metadata">

**Author:** [@stemey](https://www.ruby-forum.com/u/stemey)\
**Replies:** 5\
**Last updated:** [June 4, 2008, 12:49am UTC](https://www.ruby-forum.com/t/console-does-not-reload/87289 "2008-06-04T00:49:46Z")

</div>

I start a ruby on rails console. First I execute "require ‘managers/ x\_manager’ then I do something with the loaded class. After changing the source of the class it is not reloaded. How do I activate the changes witho…

---

## [Rails 2.1 and default setting of Partial updates](https://www.ruby-forum.com/t/rails-2-1-and-default-setting-of-partial-updates/139437)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 1\
**Last updated:** [June 4, 2008, 12:24am UTC](https://www.ruby-forum.com/t/rails-2-1-and-default-setting-of-partial-updates/139437 "2008-06-04T00:24:22Z")

</div>

I just updated to 2.1 and created a new, empty project. According to the docs I’ve seen, including: http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-partial-updates The file config/initializers/new\_rai…

---

## [Form Submission](https://www.ruby-forum.com/t/form-submission/139421)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 7\
**Last updated:** [June 3, 2008, 11:09pm UTC](https://www.ruby-forum.com/t/form-submission/139421 "2008-06-03T23:09:58Z")

</div>

I have created a test for kids to take online. Right now I have all the navigation going through a submit button of a form. So, when a child hits the submit button it saves the response and redirects to the next que…

---

## [Rspec killed my autotest](https://www.ruby-forum.com/t/rspec-killed-my-autotest/139439)

<div class="topic-metadata">

**Author:** [@meesern](https://www.ruby-forum.com/u/meesern)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/rspec-killed-my-autotest/139439 "2008-06-03T22:45:15Z")

</div>

I’ve been running autotest quite happily, then decided to install the rspec and rspec-rails plugins to do some story writing. Now my autotest reports this: loading autotest/rails\_rspec /usr/local/bin/ruby -S script/…

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

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