# Rails

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

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

---

## [Determine if a time is within certain hours of the day](https://www.ruby-forum.com/t/determine-if-a-time-is-within-certain-hours-of-the-day/171185)

<div class="topic-metadata">

**Author:** [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Replies:** 7\
**Last updated:** [June 30, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/determine-if-a-time-is-within-certain-hours-of-the-day/171185 "2009-06-30T13:19:58Z")

</div>

I have a Time object t = Time.now t Sat Jun 27 19:17:59 -0500 2009 Now I’m stuck trying to figure out an easy way to determine if “t” is between two times. For example, is “t” between 5:00 PM and 9:00 PM.

---

## [:has\_one association not letting me delete parent record](https://www.ruby-forum.com/t/has-one-association-not-letting-me-delete-parent-record/171161)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 10\
**Last updated:** [June 30, 2009, 1:09pm UTC](https://www.ruby-forum.com/t/has-one-association-not-letting-me-delete-parent-record/171161 "2009-06-30T13:09:25Z")

</div>

Hi all, I have two models Order and Transaction witht he following relationship. Order has\_one :transaction Transaction belongs\_to :order and there’s an order\_id column in the transactions table. These models hav…

---

## [Problem with rake gems:install](https://www.ruby-forum.com/t/problem-with-rake-gems-install/171098)

<div class="topic-metadata">

**Author:** [@troelskn](https://www.ruby-forum.com/u/troelskn)\
**Replies:** 12\
**Last updated:** [June 30, 2009, 11:30am UTC](https://www.ruby-forum.com/t/problem-with-rake-gems-install/171098 "2009-06-30T11:30:18Z")

</div>

Hi list. I’ve added the following line to my config/environment.rb file, within the Initializer: config.gem 'mislav-will\_paginate', :version =\> '2.3.11', :lib =\> ‘will\_paginate’, :source =\> ‘http://gems.github.com’ W…

---

## [Scan IP Range In Ruby on Rails](https://www.ruby-forum.com/t/scan-ip-range-in-ruby-on-rails/171239)

<div class="topic-metadata">

**Author:** [@dharshannew](https://www.ruby-forum.com/u/dharshannew)\
**Replies:** 5\
**Last updated:** [June 30, 2009, 10:37am UTC](https://www.ruby-forum.com/t/scan-ip-range-in-ruby-on-rails/171239 "2009-06-30T10:37:21Z")

</div>

Is there any method to scan ip range in ruby on rails !

---

## [Access the web server for testing while in maintenance](https://www.ruby-forum.com/t/access-the-web-server-for-testing-while-in-maintenance/171304)

<div class="topic-metadata">

**Author:** [@feeling3\_4](https://www.ruby-forum.com/u/feeling3_4)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 10:09am UTC](https://www.ruby-forum.com/t/access-the-web-server-for-testing-while-in-maintenance/171304 "2009-06-30T10:09:23Z")

</div>

i am using nginx proxying to haproxy proxying to thin when in maintenance mode(serving a maintenance page to end users), how can I still access the web server so that I can do some testing first? I want to be able to …

---

## [How to use json? why it used?](https://www.ruby-forum.com/t/how-to-use-json-why-it-used/171298)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 9:54am UTC](https://www.ruby-forum.com/t/how-to-use-json-why-it-used/171298 "2009-06-30T09:54:28Z")

</div>

Hi All, I want to know why json format is used? I want to use it to update a textfield of the rhtml page using dojo.xhrGet. Regards, Salil G.

---

## [Error\_messages\_for + no template loaded](https://www.ruby-forum.com/t/error-messages-for-no-template-loaded/171232)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 9:32am UTC](https://www.ruby-forum.com/t/error-messages-for-no-template-loaded/171232 "2009-06-30T09:32:47Z")

</div>

Hey all, I have a model User. A new users can signup at …/users/new I have a few lines of validations in my model. And if the registration attempt fails due to validations reasons, it displays page, but the css style…

---

## [\[ANN/ADV\] Ruby Best Practices now in print!](https://www.ruby-forum.com/t/ann-adv-ruby-best-practices-now-in-print/171294)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 5:26am UTC](https://www.ruby-forum.com/t/ann-adv-ruby-best-practices-now-in-print/171294 "2009-06-30T05:26:38Z")

</div>

Hi folks, If you haven’t already heard, my book “Ruby Best Practices” is now available in print! The whole manuscript will be made freely available under a creative commons license in March 2010, but now is the time …

---

## [Saving foreign key id's using form\_for?](https://www.ruby-forum.com/t/saving-foreign-key-ids-using-form-for/171293)

<div class="topic-metadata">

**Author:** [@Jesterman81](https://www.ruby-forum.com/u/Jesterman81)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 4:54am UTC](https://www.ruby-forum.com/t/saving-foreign-key-ids-using-form-for/171293 "2009-06-30T04:54:30Z")

</div>

Greetings Ladies and Gents, I am learning rails and am wondering about a best practice? Currently I am trying to save specific tasks for a project. So tasks has a belongs\_to :project and project does has\_many :tasks…

---

## [Render (:xml=\>:model) based transformation](https://www.ruby-forum.com/t/render-xml-model-based-transformation/171291)

<div class="topic-metadata">

**Author:** [@flash](https://www.ruby-forum.com/u/flash)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 4:54am UTC](https://www.ruby-forum.com/t/render-xml-model-based-transformation/171291 "2009-06-30T04:54:30Z")

</div>

Hi, Trying to get my head around how Rails works. I am trying to generate an xml representation of a model’s list view. It works well when I try to simply use format.xml { render :xml=\>@models } But I need to chang…

---

## [ROR on top of a non-SQL database](https://www.ruby-forum.com/t/ror-on-top-of-a-non-sql-database/168528)

<div class="topic-metadata">

**Author:** [@kretch](https://www.ruby-forum.com/u/kretch)\
**Replies:** 5\
**Last updated:** [June 30, 2009, 4:47am UTC](https://www.ruby-forum.com/t/ror-on-top-of-a-non-sql-database/168528 "2009-06-30T04:47:29Z")

</div>

Hi All So I have a database called OpenAccess (used for describing electrical objects like transistors etc.) and I’d like to put Rails on top of it. First question is “Is this possible?” i.e. can you put ActiveRecord …

---

## [Pass variable to RJS](https://www.ruby-forum.com/t/pass-variable-to-rjs/171283)

<div class="topic-metadata">

**Author:** [@trib4lmaniac](https://www.ruby-forum.com/u/trib4lmaniac)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 1:06am UTC](https://www.ruby-forum.com/t/pass-variable-to-rjs/171283 "2009-06-30T01:06:24Z")

</div>

Ok, so, ive got a link and a rjs file, is there a way i can pass a variable to the rjs by the remote\_to link example… \<%= link\_to\_remote “All”, :url =\> ‘all’ %\> \<%= link\_to\_remote “Messages”, :url =\> ‘messages’ %\> \<%…

---

## [Question about a date range selector](https://www.ruby-forum.com/t/question-about-a-date-range-selector/171201)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 4\
**Last updated:** [June 30, 2009, 1:05am UTC](https://www.ruby-forum.com/t/question-about-a-date-range-selector/171201 "2009-06-30T01:05:29Z")

</div>

All of my stat tables house data that is compiled weekly. I know how to add a date range selector to the table but I’m not sure how I can restrict the selector to show specific weeks only unless I use a symbolic type…

---

## [How to Scale Your Ruby Applications](https://www.ruby-forum.com/t/how-to-scale-your-ruby-applications/171281)

<div class="topic-metadata">

**Author:** [@sbinsider](https://www.ruby-forum.com/u/sbinsider)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 12:11am UTC](https://www.ruby-forum.com/t/how-to-scale-your-ruby-applications/171281 "2009-06-30T00:11:27Z")

</div>

Engine Y.'s Ezra Z. offers five tips on how to scale Ruby on Rails applications, including caching techniques to keep the load off application servers and databases. How to Scale Your Ruby Applications

---

## [Page doesn't display flash\[:notice\] after redirect from rjs](https://www.ruby-forum.com/t/page-doesnt-display-flash-notice-after-redirect-from-rjs/171238)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 3\
**Last updated:** [June 29, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/page-doesnt-display-flash-notice-after-redirect-from-rjs/171238 "2009-06-29T23:06:29Z")

</div>

I register a user in with an Ajax request after saving a user, and setting the flash\[:notice\] = “welcome message”, I perform the rendering format.js { render :update do |page| page \<\< "window.par…

---

## [Problem with mixins and filters](https://www.ruby-forum.com/t/problem-with-mixins-and-filters/171275)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [June 29, 2009, 10:41pm UTC](https://www.ruby-forum.com/t/problem-with-mixins-and-filters/171275 "2009-06-29T22:41:50Z")

</div>

Hi all, I am stumped with the following problem: A module, which is mixed into a controller, defines two methods, ‘a’ and ‘b’ ‘a’ calls ‘b’ ‘b’ might be overriden in the controller when ‘a’ is called as a ‘before\_fil…

---

## [Replacing XML tag with a string based on parameters in tag?](https://www.ruby-forum.com/t/replacing-xml-tag-with-a-string-based-on-parameters-in-tag/171269)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 1\
**Last updated:** [June 29, 2009, 9:20pm UTC](https://www.ruby-forum.com/t/replacing-xml-tag-with-a-string-based-on-parameters-in-tag/171269 "2009-06-29T21:20:54Z")

</div>

I am trying to figure out a (better) way to do the following: some\_string = “Display a widget here - 1234” new\_string = replace\_widgets\_in\_string(some\_string) p new\_string =\> #Display a widget here - Widget 1234 is bl…

---

## [6 Steps to Refactoring Rails -- http://bit.ly/116BST](https://www.ruby-forum.com/t/6-steps-to-refactoring-rails-http-bit-ly-116bst/171267)

<div class="topic-metadata">

**Author:** [@LJMecca](https://www.ruby-forum.com/u/LJMecca)\
**Replies:** 0\
**Last updated:** [June 29, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/6-steps-to-refactoring-rails-http-bit-ly-116bst/171267 "2009-06-29T20:21:56Z")

</div>

Thought people would find this blog useful. Since December, Rails has undergone a fairly significant internal refactoring in quite a number of areas. Yehuda K. has honed a process for diving into a new area of the co…

---

## [Custom finder in associated model](https://www.ruby-forum.com/t/custom-finder-in-associated-model/171264)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [June 29, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/custom-finder-in-associated-model/171264 "2009-06-29T19:06:18Z")

</div>

I have a model for which I have provided a customer finder method, ‘find\_one\_by\_date(params)’, where params is a hash. This method always returns one or no record from the DB. I would like to define an association, h…

---

## [\[ANN\] LSRC 2009: Don't Miss Your Chance To See Matz!](https://www.ruby-forum.com/t/ann-lsrc-2009-dont-miss-your-chance-to-see-matz/171263)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 29, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/ann-lsrc-2009-dont-miss-your-chance-to-see-matz/171263 "2009-06-29T18:25:18Z")

</div>

Hello The 2009 Lone Star Ruby Conference is just around the corner and conference tickets are moving faster than small-town gossip. This year you can choose from eleven training classes that are as fine as dollar cot…

---

## [Looking for Ideas on Scheduling + Day by Day View of Week](https://www.ruby-forum.com/t/looking-for-ideas-on-scheduling-day-by-day-view-of-week/171226)

<div class="topic-metadata">

**Author:** [@ziggles](https://www.ruby-forum.com/u/ziggles)\
**Replies:** 2\
**Last updated:** [June 29, 2009, 6:11pm UTC](https://www.ruby-forum.com/t/looking-for-ideas-on-scheduling-day-by-day-view-of-week/171226 "2009-06-29T18:11:34Z")

</div>

Hi All, Fishing for ideas here and would love to hear what you have to say. I have a Course model that, as you may have guessed, manages my Courses. A course has: A start time (with minutes in 15 minute intervals ak…

---

## [Mongrel Malformed Request error - help!](https://www.ruby-forum.com/t/mongrel-malformed-request-error-help/171258)

<div class="topic-metadata">

**Author:** [@hirodusk](https://www.ruby-forum.com/u/hirodusk)\
**Replies:** 2\
**Last updated:** [June 29, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/mongrel-malformed-request-error-help/171258 "2009-06-29T17:50:18Z")

</div>

I’ve just migrated my system over to a new macbook. I’ve been having a nightmare today trying to get the site I’m working on to work… All gems are in place, MySQL etc. However - I am stuck on this error form Mongrel: …

---

## [Listing file tree](https://www.ruby-forum.com/t/listing-file-tree/171259)

<div class="topic-metadata">

**Author:** [@christoffer](https://www.ruby-forum.com/u/christoffer)\
**Replies:** 0\
**Last updated:** [June 29, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/listing-file-tree/171259 "2009-06-29T17:38:06Z")

</div>

Hey there, I am programming a file tree listing for my rails project. I found some code that seemed to do a nice job that would be perfect after some styling. This works smoothly in pure ruby when run on the console.…

---

## [Adding registers in HABTM relationship](https://www.ruby-forum.com/t/adding-registers-in-habtm-relationship/171234)

<div class="topic-metadata">

**Author:** [@jsierra](https://www.ruby-forum.com/u/jsierra)\
**Replies:** 2\
**Last updated:** [June 29, 2009, 5:21pm UTC](https://www.ruby-forum.com/t/adding-registers-in-habtm-relationship/171234 "2009-06-29T17:21:19Z")

</div>

Hi! I have a little problem in a HABTM relationship. I have this schema: expedients \<—\> expedients\_documents \<—\> documents expedients(HABTM)docuements \<-\> documetns(HABTM)expedients From the expedients view, I add …

---

## [About rubygems](https://www.ruby-forum.com/t/about-rubygems/171225)

<div class="topic-metadata">

**Author:** [@HeChian](https://www.ruby-forum.com/u/HeChian)\
**Replies:** 4\
**Last updated:** [June 29, 2009, 5:18pm UTC](https://www.ruby-forum.com/t/about-rubygems/171225 "2009-06-29T17:18:23Z")

</div>

Hi all. My host install ruby in /usr/local/ but install rubygems in /home/user/ ruby/. so, when I startup my rails project it always return error to me said that it couldn’t find any rubygems lib. anybody knows how …

---

## [Cannot Run Ruby on Rails on windows Vista or 7](https://www.ruby-forum.com/t/cannot-run-ruby-on-rails-on-windows-vista-or-7/171250)

<div class="topic-metadata">

**Author:** [@Randika\_R](https://www.ruby-forum.com/u/Randika_R)\
**Replies:** 2\
**Last updated:** [June 29, 2009, 4:34pm UTC](https://www.ruby-forum.com/t/cannot-run-ruby-on-rails-on-windows-vista-or-7/171250 "2009-06-29T16:34:21Z")

</div>

Hi There, I have installed ruby on rails on a windows 7 box as mentioned on the official ror manual and it works perfectly for some times. but when I refresh web browser page few times I got this error and now nothing…

---

## [Integration Tests](https://www.ruby-forum.com/t/integration-tests/171248)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 29, 2009, 3:54pm UTC](https://www.ruby-forum.com/t/integration-tests/171248 "2009-06-29T15:54:27Z")

</div>

I’m having trouble with Rails Integrations tests on Rails 2.3 not setting the query string on post actions. I’m testing a rails metal so when the env\[“QUERY\_STRING”\] variable isn’t set, in the test, the metal doesn’t…

---

## [Complex forms with correct ids](https://www.ruby-forum.com/t/complex-forms-with-correct-ids/171247)

<div class="topic-metadata">

**Author:** [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Replies:** 0\
**Last updated:** [June 29, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/complex-forms-with-correct-ids/171247 "2009-06-29T15:11:39Z")

</div>

Hi, I would like to know if the last best solution is which is described here http://zilkey.com/2008/4/5/complex-forms-with-correct-ids or is there any better/different solution for this problem. Thanks in advance.

---

## [Bulk emailer](https://www.ruby-forum.com/t/bulk-emailer/171243)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 2\
**Last updated:** [June 29, 2009, 2:56pm UTC](https://www.ruby-forum.com/t/bulk-emailer/171243 "2009-06-29T14:56:49Z")

</div>

i need a system for sendig automatically bulk email to 300 users, when my customer insert or update news. I’ve tryng with simple actionmailer, but it sending until 40 users. i read this: http://www.myowndb.com/blog/…

---

## [No route matches for stylesheets](https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [June 29, 2009, 2:44pm UTC](https://www.ruby-forum.com/t/no-route-matches-for-stylesheets/171240 "2009-06-29T14:44:13Z")

</div>

Dear all Why the following error appear in development.log? Processing ApplicationController#index (for 160.1.42.69 at 2009-06-29 19:09:05) \[GET\] ActionController::RoutingError (No route matches “/stylesheets/images…

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

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