# Rails

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

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

---

## [Can we put any number of databases in YML file?](https://www.ruby-forum.com/t/can-we-put-any-number-of-databases-in-yml-file/112199)

<div class="topic-metadata">

**Author:** [@hail2thethief](https://www.ruby-forum.com/u/hail2thethief)\
**Replies:** 3\
**Last updated:** [August 16, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/can-we-put-any-number-of-databases-in-yml-file/112199 "2007-08-16T16:53:21Z")

</div>

Hello By default, RubyOnRails let you have 3 databases, development, test and production. Can we add more databases in this file? Is there any limitation? Example --------------------------------------- START % cat…

---

## [To REST or not to REST](https://www.ruby-forum.com/t/to-rest-or-not-to-rest/87245)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 12\
**Last updated:** [August 16, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/to-rest-or-not-to-rest/87245 "2007-08-16T16:31:18Z")

</div>

I’ve done the research and written some trivial applications - so I’ve got a basic understanding, though still just a bit beyond noob. Anyhow, I’d like to begin writing my first “real” application and am wondering whe…

---

## [Remote\_form\_for & error\_message\_on](https://www.ruby-forum.com/t/remote-form-for-error-message-on/112216)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 1\
**Last updated:** [August 16, 2007, 4:08pm UTC](https://www.ruby-forum.com/t/remote-form-for-error-message-on/112216 "2007-08-16T16:08:13Z")

</div>

Hello, I am working with remote\_form\_for. How do you properly return any error messages generated by the model for display in error\_message\_on? I can’t seem to find any information about it. Thanks!

---

## [Noob DateTime question](https://www.ruby-forum.com/t/noob-datetime-question/112217)

<div class="topic-metadata">

**Author:** [@randall](https://www.ruby-forum.com/u/randall)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/noob-datetime-question/112217 "2007-08-16T15:55:12Z")

</div>

Hi, I have a database column defined as datetime. When i display \<%= orders.orderdate %\> in the view i get: Thu Aug 16 12:22:53 +0100 2007 Which is as expected. What I would like though is to just display the time …

---

## [Which select?](https://www.ruby-forum.com/t/which-select/111983)

<div class="topic-metadata">

**Author:** [@dawillis](https://www.ruby-forum.com/u/dawillis)\
**Replies:** 6\
**Last updated:** [August 16, 2007, 3:16pm UTC](https://www.ruby-forum.com/t/which-select/111983 "2007-08-16T15:16:06Z")

</div>

Hi All, I want to create a select list on a form with an array of dates from a DB similar to this. The date is used to search another DB for documents to edit. 2007-08-15 2007-08-22 Which if any of the selects wou…

---

## [Starting a new project](https://www.ruby-forum.com/t/starting-a-new-project/111624)

<div class="topic-metadata">

**Author:** [@Christian\_WattengSS](https://www.ruby-forum.com/u/Christian_WattengSS)\
**Replies:** 5\
**Last updated:** [August 16, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/starting-a-new-project/111624 "2007-08-16T14:49:00Z")

</div>

When starting a new project, should I build my database in a database client program, or should i just use database migrations right away? I’m new on the list btw… Hi :slight\_smile: Christian…

---

## [Rails plugin with Javascript file](https://www.ruby-forum.com/t/rails-plugin-with-javascript-file/111826)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 3\
**Last updated:** [August 16, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/rails-plugin-with-javascript-file/111826 "2007-08-16T13:50:22Z")

</div>

Hi, last question of the day (promise!!!) I’m packaging up some work into a plugin. One of the parts is a javascript file currently in “public/javascripts”. I thought I’d be able to move it to “vendor/myplugin/public/…

---

## [Testing a plugin: Having to require plugin files manually?](https://www.ruby-forum.com/t/testing-a-plugin-having-to-require-plugin-files-manually/90239)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 12:57pm UTC](https://www.ruby-forum.com/t/testing-a-plugin-having-to-require-plugin-files-manually/90239 "2007-08-16T12:57:46Z")

</div>

Hi all I have written the following small plugin: init.rb require File.dirname(FILE) + ‘/lib/hash’ lib/hash.rb class Hash def except(\*keys) self.reject { |k,v| keys.include? k.to\_sym } end def only(\*keys) self.…

---

## [How to load a plugin on the run?](https://www.ruby-forum.com/t/how-to-load-a-plugin-on-the-run/112149)

<div class="topic-metadata">

**Author:** [@patcito](https://www.ruby-forum.com/u/patcito)\
**Replies:** 3\
**Last updated:** [August 16, 2007, 12:51pm UTC](https://www.ruby-forum.com/t/how-to-load-a-plugin-on-the-run/112149 "2007-08-16T12:51:46Z")

</div>

Hey all, I have a multisite app and I want to load certain plugins for each of them. Is there a way to use a before\_filter that would load a given plugin by looking at the url? If so how? thanx in advance Pat

---

## [Time.now - time.at](https://www.ruby-forum.com/t/time-now-time-at/112208)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/time-now-time-at/112208 "2007-08-16T12:47:16Z")

</div>

Hello frnds I want to find out the difference between Time.now and Time.at where Time.at is the unix time eg:- Time.at(1186113109) and them compare that if the difference is greater than 1 day then certain task shou…

---

## [Rake db:migration error from Book](https://www.ruby-forum.com/t/rake-db-migration-error-from-book/112209)

<div class="topic-metadata">

**Author:** [@rubysharma](https://www.ruby-forum.com/u/rubysharma)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/rake-db-migration-error-from-book/112209 "2007-08-16T12:35:19Z")

</div>

Hi, Right now I am working on the application given from the book Pragmatic.Bookshelf.Agile.Web.Development.with.Rails.2nd.Edition.Dec.2006 On page 80. I have done the rake db:migrate on the code… class AddPrice \< Ac…

---

## [Good design of a RoR app's view / layouts / templates](https://www.ruby-forum.com/t/good-design-of-a-ror-apps-view-layouts-templates/112207)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 12:26pm UTC](https://www.ruby-forum.com/t/good-design-of-a-ror-apps-view-layouts-templates/112207 "2007-08-16T12:26:02Z")

</div>

Hi, are there any good respources for good view design for a RoR app? I have a reasonable foundation in RoR now (for a beginner) and want to put a small site together and I’d like to start out doing things properly. H…

---

## [Has\_many :through ... What am I missing?](https://www.ruby-forum.com/t/has-many-through-what-am-i-missing/112168)

<div class="topic-metadata">

**Author:** [@stubbsuk](https://www.ruby-forum.com/u/stubbsuk)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 12:02pm UTC](https://www.ruby-forum.com/t/has-many-through-what-am-i-missing/112168 "2007-08-16T12:02:43Z")

</div>

class Ladder \< ActiveRecord::Base has\_many :players has\_many :users, :through =\> :players end class Player \< ActiveRecord::Base belongs\_to :users belongs\_to :ladders end class User \< ActiveRecord::Base has\_many …

---

## [REST Questions](https://www.ruby-forum.com/t/rest-questions/112187)

<div class="topic-metadata">

**Author:** [@derek](https://www.ruby-forum.com/u/derek)\
**Replies:** 1\
**Last updated:** [August 16, 2007, 10:33am UTC](https://www.ruby-forum.com/t/rest-questions/112187 "2007-08-16T10:33:32Z")

</div>

Hey, everybody. I feel like I’m spinning my wheels trying to understand particular elements of REST. I’ve read many blogs and tutorials, watched the PeepCode REST screencast, and I’ve learned a lot, but it seems like…

---

## [Possible to run Apache and lighttpd on same server?](https://www.ruby-forum.com/t/possible-to-run-apache-and-lighttpd-on-same-server/112193)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 10:27am UTC](https://www.ruby-forum.com/t/possible-to-run-apache-and-lighttpd-on-same-server/112193 "2007-08-16T10:27:31Z")

</div>

I’ve been put in charge of setting up a production server for my company, but I’m almost a COMPLETE noob with networking or servers. I’ve run rails apps off of a hosting company before, but now I have to set up a whol…

---

## [Reg :REST](https://www.ruby-forum.com/t/reg-rest/112200)

<div class="topic-metadata">

**Author:** [@shiva](https://www.ruby-forum.com/u/shiva)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 10:04am UTC](https://www.ruby-forum.com/t/reg-rest/112200 "2007-08-16T10:04:18Z")

</div>

Hi all, .Iam facing one problem in REST. I am using REST for my api…so if user hits the http link in browser i do some validation and some process and i want to show them in xml output… so output should be \<descri…

---

## [Star Rating Component?](https://www.ruby-forum.com/t/star-rating-component/77805)

<div class="topic-metadata">

**Author:** [@Martin\_Smith](https://www.ruby-forum.com/u/Martin_Smith)\
**Replies:** 10\
**Last updated:** [August 16, 2007, 8:57am UTC](https://www.ruby-forum.com/t/star-rating-component/77805 "2007-08-16T08:57:14Z")

</div>

Hi, I’m looking for a star rating component for RoR, a bit like Votio (http://redalt.com/downloads/ - find the votio heading) or the star rating used on Amazon. I don’t really need the AJAX capabilities, just the abi…

---

## [Skip validation](https://www.ruby-forum.com/t/skip-validation/105080)

<div class="topic-metadata">

**Author:** [@pradeep](https://www.ruby-forum.com/u/pradeep)\
**Replies:** 6\
**Last updated:** [August 16, 2007, 8:35am UTC](https://www.ruby-forum.com/t/skip-validation/105080 "2007-08-16T08:35:15Z")

</div>

Hi all, In user model i have 4 validations. In an update i need to skip 2 of those validations and other 2 need to fire. Please help how to do that. Thanks in advance

---

## [Removing quotes in a string](https://www.ruby-forum.com/t/removing-quotes-in-a-string/112190)

<div class="topic-metadata">

**Author:** [@wings](https://www.ruby-forum.com/u/wings)\
**Replies:** 7\
**Last updated:** [August 16, 2007, 7:55am UTC](https://www.ruby-forum.com/t/removing-quotes-in-a-string/112190 "2007-08-16T07:55:11Z")

</div>

Hi, does anyone know of a good way to remove leading the trailing quotes (") in a string please? Thanks Grace

---

## [Running the same model search in multiple controllers](https://www.ruby-forum.com/t/running-the-same-model-search-in-multiple-controllers/112188)

<div class="topic-metadata">

**Author:** [@blaine](https://www.ruby-forum.com/u/blaine)\
**Replies:** 3\
**Last updated:** [August 16, 2007, 7:14am UTC](https://www.ruby-forum.com/t/running-the-same-model-search-in-multiple-controllers/112188 "2007-08-16T07:14:08Z")

</div>

So I have a layout (application.rhtml) that contains a list of categories that are stored within the database. To get retrieve the list I overwrite the initialize method within the application controller (application…

---

## [Deploy ruby on rails software on IIS](https://www.ruby-forum.com/t/deploy-ruby-on-rails-software-on-iis/112109)

<div class="topic-metadata">

**Author:** [@mahmoodi](https://www.ruby-forum.com/u/mahmoodi)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 6:55am UTC](https://www.ruby-forum.com/t/deploy-ruby-on-rails-software-on-iis/112109 "2007-08-16T06:55:04Z")

</div>

hi all, i have developed a software by ruby on rails and mysql. i want to deploy it. i have a space on windows 2003 server host. how can i deploy my software on the host.

---

## [Rake db:migrate execution error](https://www.ruby-forum.com/t/rake-db-migrate-execution-error/112133)

<div class="topic-metadata">

**Author:** [@teadub](https://www.ruby-forum.com/u/teadub)\
**Replies:** 2\
**Last updated:** [August 16, 2007, 6:11am UTC](https://www.ruby-forum.com/t/rake-db-migrate-execution-error/112133 "2007-08-16T06:11:59Z")

</div>

Help a newbie please. I have everything install according to hivelogic.com instruction but I get this… Mycomp:~/Sites/music\_library Myname$ rake db:migrate (in /Users/Myname/Sites/music\_library) dyld: NSLinkModule()…

---

## [Get argument name](https://www.ruby-forum.com/t/get-argument-name/112189)

<div class="topic-metadata">

**Author:** [@jack\_archer](https://www.ruby-forum.com/u/jack_archer)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 6:04am UTC](https://www.ruby-forum.com/t/get-argument-name/112189 "2007-08-16T06:04:40Z")

</div>

My problem is that: I have a web service controller, it has bunch of public methods, each of them has first argument userid, so I implement before\_invocation method: def validUser(name, args) begin @user = User.f…

---

## [Net/http vs . . . curl? anything else? what's fastest](https://www.ruby-forum.com/t/net-http-vs-curl-anything-else-whats-fastest/112148)

<div class="topic-metadata">

**Author:** [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Replies:** 8\
**Last updated:** [August 16, 2007, 5:28am UTC](https://www.ruby-forum.com/t/net-http-vs-curl-anything-else-whats-fastest/112148 "2007-08-16T05:28:56Z")

</div>

Hi, I’m grabbing xml feeds with net/http, and I’m wondering if there is anything else out there that’s faster. Any suggestions? Charlie

---

## [Simonp37](https://www.ruby-forum.com/t/simonp37/112186)

<div class="topic-metadata">

**Author:** [@simonp37](https://www.ruby-forum.com/u/simonp37)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 5:15am UTC](https://www.ruby-forum.com/t/simonp37/112186 "2007-08-16T05:15:42Z")

</div>

I have a single table in my database and in me controller (principalcontroller.rb) i need to put a method to find regs in the table. def prebusca # here i put the form in the view @persona = Persona.new(params\[:perso…

---

## [Diffing tables using acts\_as\_versioned](https://www.ruby-forum.com/t/diffing-tables-using-acts-as-versioned/112053)

<div class="topic-metadata">

**Author:** [@rubylover](https://www.ruby-forum.com/u/rubylover)\
**Replies:** 3\
**Last updated:** [August 16, 2007, 2:54am UTC](https://www.ruby-forum.com/t/diffing-tables-using-acts-as-versioned/112053 "2007-08-16T02:54:47Z")

</div>

I’m looking for a solution to read and store the differences between two updates to a row in my DB. For example, if a user changes the number of hours they worked after submitting their timesheet, I want to be able to…

---

## [How to get helper methods in the rake task](https://www.ruby-forum.com/t/how-to-get-helper-methods-in-the-rake-task/112178)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 2:53am UTC](https://www.ruby-forum.com/t/how-to-get-helper-methods-in-the-rake-task/112178 "2007-08-16T02:53:43Z")

</div>

I wrote a helper in application.rb and was trying to use it inside a rake task. However can’t find that method? How do I access helper methods inside any rake task?

---

## [How do you check if text is in between certain \<tags\>?](https://www.ruby-forum.com/t/how-do-you-check-if-text-is-in-between-certain-tags/112150)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 4\
**Last updated:** [August 16, 2007, 2:46am UTC](https://www.ruby-forum.com/t/how-do-you-check-if-text-is-in-between-certain-tags/112150 "2007-08-16T02:46:43Z")

</div>

For instance, I have a similar block of text like so: @text = “Lorem ipsum \[some code here\] dolor sit” What sytax would I use to check if the text is in between the tags? That is: “If @text is in between ‘’ and ‘’…

---

## [Created\_at Column and strftime](https://www.ruby-forum.com/t/created-at-column-and-strftime/112176)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 2:35am UTC](https://www.ruby-forum.com/t/created-at-column-and-strftime/112176 "2007-08-16T02:35:23Z")

</div>

I am trying to format the created\_at value of an object for display in the view. Just for testing purposes, right now I’m doing - puts @the\_object.created\_at.strftime(’%B %e, %G’) puts @the\_object.created\_at.to\_date.…

---

## [Problems with caching in development](https://www.ruby-forum.com/t/problems-with-caching-in-development/112175)

<div class="topic-metadata">

**Author:** [@bluengreen](https://www.ruby-forum.com/u/bluengreen)\
**Replies:** 0\
**Last updated:** [August 16, 2007, 2:32am UTC](https://www.ruby-forum.com/t/problems-with-caching-in-development/112175 "2007-08-16T02:32:42Z")

</div>

Hello, I think I’m missing something but, it seems that I can not stop mongrel and Rails 1.2.3 from caching in development mode. I never had this problem until recently. Has something changed with the caching? I have…

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

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