# Rails

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

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

---

## [Making things DRY: RESTful address controller](https://www.ruby-forum.com/t/making-things-dry-restful-address-controller/160604)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 3:53am UTC](https://www.ruby-forum.com/t/making-things-dry-restful-address-controller/160604 "2009-02-18T03:53:08Z")

</div>

Hello list, I’m developing an e-commerce application, and the Checkout controller has an edit\_address and create\_addresses method. I’m not expert in any RESTful-based architecture (including the Rails implementation)…

---

## [Help controller](https://www.ruby-forum.com/t/help-controller/160562)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 1\
**Last updated:** [February 18, 2009, 3:21am UTC](https://www.ruby-forum.com/t/help-controller/160562 "2009-02-18T03:21:26Z")

</div>

Yes, I know the irony of asking for help with a help controller. :slight\_smile: The intent here is to have a place to put common help messages, nothing complicated at the beginning at least. I created a help control…

---

## [Autocomplete db query](https://www.ruby-forum.com/t/autocomplete-db-query/160602)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 3:10am UTC](https://www.ruby-forum.com/t/autocomplete-db-query/160602 "2009-02-18T03:10:54Z")

</div>

How can I get the autocomplete to get the ID of the item and submit that instead to make a many to many relationship.

---

## [Testing: switch on all caching?](https://www.ruby-forum.com/t/testing-switch-on-all-caching/160486)

<div class="topic-metadata">

**Author:** [@itsastickup](https://www.ruby-forum.com/u/itsastickup)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 2:48am UTC](https://www.ruby-forum.com/t/testing-switch-on-all-caching/160486 "2009-02-18T02:48:03Z")

</div>

I would like to speed up my tests and I’ve noticed that not all caching is switched on in test.rb, and can’t think why not. I’ve thought to do this: config.cache\_classes = true config.action\_controller.perform\_cachin…

---

## [In place editor in an index action](https://www.ruby-forum.com/t/in-place-editor-in-an-index-action/160600)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 2:08am UTC](https://www.ruby-forum.com/t/in-place-editor-in-an-index-action/160600 "2009-02-18T02:08:16Z")

</div>

How do you do an in\_place\_editor\_field in a for loop so each item will have that available like in an index action? Is it possible? \<% for note in @notes %\> \<%=h note.label %\> \<%=h note.start\_time %\> \<%…

---

## [Error running gems:install on edge](https://www.ruby-forum.com/t/error-running-gems-install-on-edge/160387)

<div class="topic-metadata">

**Author:** [@ARod](https://www.ruby-forum.com/u/ARod)\
**Replies:** 2\
**Last updated:** [February 18, 2009, 2:02am UTC](https://www.ruby-forum.com/t/error-running-gems-install-on-edge/160387 "2009-02-18T02:02:25Z")

</div>

Hi, I’m trying out the new features in Rails 2.3.0 RC1. Especially interested in the new “Nested Forms” functionality. I’m having a problem when installing gems into my project. When adding a gem (e.g. “mislav-will\_…

---

## [Authlogic x Authorization Plugin / Gem](https://www.ruby-forum.com/t/authlogic-x-authorization-plugin-gem/160588)

<div class="topic-metadata">

**Author:** [@Adriano\_F](https://www.ruby-forum.com/u/Adriano_F)\
**Replies:** 0\
**Last updated:** [February 18, 2009, 12:59am UTC](https://www.ruby-forum.com/t/authlogic-x-authorization-plugin-gem/160588 "2009-02-18T00:59:10Z")

</div>

Which authorization plugin / gem plays nice with Authlogic (authentication gem/plugin)? Does anybody know any app as example? Tkz, Adriano

---

## [MissingSourceFile: no such file to load -- login\_engine](https://www.ruby-forum.com/t/missingsourcefile-no-such-file-to-load-login-engine/64046)

<div class="topic-metadata">

**Author:** [@jqr](https://www.ruby-forum.com/u/jqr)\
**Replies:** 3\
**Last updated:** [February 18, 2009, 12:42am UTC](https://www.ruby-forum.com/t/missingsourcefile-no-such-file-to-load-login-engine/64046 "2009-02-18T00:42:46Z")

</div>

This error seems to stem from the require line in application.rb. I’m new to Rails, but I’m assuming that this should load the lib/login\_engine.rb from within the vendor/plugins/login\_engine directory. I’ve been over…

---

## [How do I create a find method that retrieves all of the records that do NOT belong to an associatio](https://www.ruby-forum.com/t/how-do-i-create-a-find-method-that-retrieves-all-of-the-records-that-do-not-belong-to-an-associatio/160475)

<div class="topic-metadata">

**Author:** [@Peter\_B.e](https://www.ruby-forum.com/u/Peter_B.e)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 12:33am UTC](https://www.ruby-forum.com/t/how-do-i-create-a-find-method-that-retrieves-all-of-the-records-that-do-not-belong-to-an-associatio/160475 "2009-02-18T00:33:59Z")

</div>

I have 3 models with a has\_many through association: class Recording has\_many :listenings has\_many :listeners, :through =\> :listenings, :source =\> :user … end class User has\_many :listenings, :foreign\_key =\> “list…

---

## [Problem with sqlite3](https://www.ruby-forum.com/t/problem-with-sqlite3/152117)

<div class="topic-metadata">

**Author:** [@hai\_l](https://www.ruby-forum.com/u/hai_l)\
**Replies:** 5\
**Last updated:** [February 18, 2009, 12:15am UTC](https://www.ruby-forum.com/t/problem-with-sqlite3/152117 "2009-02-18T00:15:08Z")

</div>

I have problem when login 127.0.0.1 About your applicationâ€™s environment CGI::Session::CookieStore::TamperedWithCookie in Rails/infoController#properties CGI::Session::CookieStore::TamperedWithCookie RAILS\_ROOT: C…

---

## [How to: Prevent deletes and report](https://www.ruby-forum.com/t/how-to-prevent-deletes-and-report/160575)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [February 17, 2009, 10:23pm UTC](https://www.ruby-forum.com/t/how-to-prevent-deletes-and-report/160575 "2009-02-17T22:23:12Z")

</div>

I have a model that may not have its entries deleted. I wish to have all attempts to delete records raise a notification / error, report this to the user, and return to the original page. In my model file I put this: …

---

## [Testing without Fixtures (?)](https://www.ruby-forum.com/t/testing-without-fixtures/159713)

<div class="topic-metadata">

**Author:** [@jhearn](https://www.ruby-forum.com/u/jhearn)\
**Replies:** 4\
**Last updated:** [February 17, 2009, 8:58pm UTC](https://www.ruby-forum.com/t/testing-without-fixtures/159713 "2009-02-17T20:58:46Z")

</div>

I’m writing unit tests for a rails app whose behavior depends on the relationships of tens of thousands of items in a DB. I need this data in the test DB for a lot of tests. Storing this data as fixtures, keeping it…

---

## [Fixtureless Unit Tests](https://www.ruby-forum.com/t/fixtureless-unit-tests/160570)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 0\
**Last updated:** [February 17, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/fixtureless-unit-tests/160570 "2009-02-17T20:25:49Z")

</div>

Hi all Been reading a couple of article’s and recently watched the Railscast on Unit tests that don’t require fixtures. While I can follow the basic examples given, I’m struggling to find a way to test methods that c…

---

## [URL Problem](https://www.ruby-forum.com/t/url-problem/160560)

<div class="topic-metadata">

**Author:** [@Sean\_McGilvray](https://www.ruby-forum.com/u/Sean_McGilvray)\
**Replies:** 1\
**Last updated:** [February 17, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/url-problem/160560 "2009-02-17T20:01:34Z")

</div>

Hello everyone, I have a fun little problem that I can not figure out. My app is adding the public folder to the url path. When I go to http://www.timefreedomnow.net/profile/smcgilvray the app comes up fine. When …

---

## [Trouble with routes](https://www.ruby-forum.com/t/trouble-with-routes/160495)

<div class="topic-metadata">

**Author:** [@bearblu](https://www.ruby-forum.com/u/bearblu)\
**Replies:** 5\
**Last updated:** [February 17, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/trouble-with-routes/160495 "2009-02-17T19:40:59Z")

</div>

I just started working with Rails 2.2.2 and I don’t seem to be having much luck with the new routing scheme. When I try to edit a record and save it I get and error message that looks as though it is trying to use th…

---

## [Sorting objects without an explicit find function...?](https://www.ruby-forum.com/t/sorting-objects-without-an-explicit-find-function/160508)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [February 17, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/sorting-objects-without-an-explicit-find-function/160508 "2009-02-17T19:10:03Z")

</div>

Hello - I’m kind of new to Rails, and although I can usually google the answer to whatever problem I’m having, I’m just not sure how to phrase this, so I come to you all for help. I’m building an educational app, whi…

---

## [Cloning an already uploaded image using attachment\_fu](https://www.ruby-forum.com/t/cloning-an-already-uploaded-image-using-attachment-fu/160553)

<div class="topic-metadata">

**Author:** [@semyou](https://www.ruby-forum.com/u/semyou)\
**Replies:** 1\
**Last updated:** [February 17, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/cloning-an-already-uploaded-image-using-attachment-fu/160553 "2009-02-17T18:39:46Z")

</div>

Hi, I have an Image model that is attached to a item. The image was uploaded through attachment\_fu. Now, I want to reuse the same image for a new item. I tried several tips found online. For example in http://danielo…

---

## [Run rake tasks from the controller](https://www.ruby-forum.com/t/run-rake-tasks-from-the-controller/159901)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 7\
**Last updated:** [February 17, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/run-rake-tasks-from-the-controller/159901 "2009-02-17T17:31:32Z")

</div>

Hello, How can I run rake tasks from the controller and send extra params to it too? Thanks, Elías

---

## [Best positioning of GEO IP identifier Apache or Ruby Code](https://www.ruby-forum.com/t/best-positioning-of-geo-ip-identifier-apache-or-ruby-code/160547)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [February 17, 2009, 5:29pm UTC](https://www.ruby-forum.com/t/best-positioning-of-geo-ip-identifier-apache-or-ruby-code/160547 "2009-02-17T17:29:33Z")

</div>

Hi, I am trying to make by site geo-intelligent. As in when a user comes from US the default values on my site should become US specific and when user is from any other place, I want to default to different values. So …

---

## [How do you ignore a URI prefix?](https://www.ruby-forum.com/t/how-do-you-ignore-a-uri-prefix/160496)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [February 17, 2009, 5:01pm UTC](https://www.ruby-forum.com/t/how-do-you-ignore-a-uri-prefix/160496 "2009-02-17T17:01:34Z")

</div>

I’m using the directive RailsBaseURI to point to an application called myapp from my site davidbeckwith.com. When I use the browser to point to davidbeckwith.com/myapp, I get a routing error because the URI begins wi…

---

## [Assign sysdate instead of the result of DateTime::now()](https://www.ruby-forum.com/t/assign-sysdate-instead-of-the-result-of-datetime-now/160521)

<div class="topic-metadata">

**Author:** [@florent\_g](https://www.ruby-forum.com/u/florent_g)\
**Replies:** 1\
**Last updated:** [February 17, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/assign-sysdate-instead-of-the-result-of-datetime-now/160521 "2009-02-17T16:49:12Z")

</div>

Hi rails devs, I’ve put the following code in a model: protected def validate self\[:lastupdate\] = DateTime::now() end I wonder how I could get “sysdate” instead of the result of DateTime::now() in the generat…

---

## [As found on oracle](https://www.ruby-forum.com/t/as-found-on-oracle/160540)

<div class="topic-metadata">

**Author:** [@oraldo](https://www.ruby-forum.com/u/oraldo)\
**Replies:** 0\
**Last updated:** [February 17, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/as-found-on-oracle/160540 "2009-02-17T16:20:46Z")

</div>

as found on oracle Posted by Oraldo Second (oraldo) on 16.02.2009 22:51 holaa all a cordial greeting to someone who can help me. raises the following need to show 2 fields in a table which are mtin\_mtin, mtin\_descri…

---

## [Knowledge sharing](https://www.ruby-forum.com/t/knowledge-sharing/160539)

<div class="topic-metadata">

**Author:** [@mathieu\_r](https://www.ruby-forum.com/u/mathieu_r)\
**Replies:** 0\
**Last updated:** [February 17, 2009, 3:36pm UTC](https://www.ruby-forum.com/t/knowledge-sharing/160539 "2009-02-17T15:36:42Z")

</div>

Hi, I’d like to know what are the blogs, sites, lists, groups, rss that you follow to keep up to date about rails and rails related information. My sources of information are: this group (rubyonrails-talk) the rub…

---

## [How to appned some string with file name](https://www.ruby-forum.com/t/how-to-appned-some-string-with-file-name/160528)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [February 17, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/how-to-appned-some-string-with-file-name/160528 "2009-02-17T14:53:05Z")

</div>

Dear all. using this below code i get file name of blob image = params\[:image\]\[:blob\] puts image.methods image\_name = image.original\_filename it gives me =\> rose.jpg actually i want to append some string with it.h…

---

## [Displaying validation messages - what do i do in my form](https://www.ruby-forum.com/t/displaying-validation-messages-what-do-i-do-in-my-form/160456)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 13\
**Last updated:** [February 17, 2009, 2:50pm UTC](https://www.ruby-forum.com/t/displaying-validation-messages-what-do-i-do-in-my-form/160456 "2009-02-17T14:50:31Z")

</div>

Here’s my form \<%=h @school.name %\> (\<%=h @school.place %\>) \<%= link\_to @school\_url, @school.url %\> \<% form\_for \[@school, Review.new\] do |f| %\> \<%= f.label :first\_name, "First Name" %\> \<%= f.text\_field :first\_n…

---

## [Coding form variations for object creadtion and CRUD](https://www.ruby-forum.com/t/coding-form-variations-for-object-creadtion-and-crud/160533)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 1\
**Last updated:** [February 17, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/coding-form-variations-for-object-creadtion-and-crud/160533 "2009-02-17T14:26:37Z")

</div>

I want to provide the user with two ways to add a task. The quick way and the detailed way pretty much like google calendar allows for its events. On clicking the “Add Quickly” link a form with just a title field app…

---

## [WhatÂ´s the best way to have "constant" db re cords and have them available in tests?](https://www.ruby-forum.com/t/whata-s-the-best-way-to-have-constant-db-re-cords-and-have-them-available-in-tests/160526)

<div class="topic-metadata">

**Author:** [@Hector\_Parra](https://www.ruby-forum.com/u/Hector_Parra)\
**Replies:** 3\
**Last updated:** [February 17, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/whata-s-the-best-way-to-have-constant-db-re-cords-and-have-them-available-in-tests/160526 "2009-02-17T14:24:48Z")

</div>

Hello, I have a model called Contents, and every content belongs to a Role. The Roles are suposed to be constants (they are always the same and don’t change), so I decided to create a migrate to insert the data in th…

---

## [Sending mail](https://www.ruby-forum.com/t/sending-mail/160532)

<div class="topic-metadata">

**Author:** [@tanker](https://www.ruby-forum.com/u/tanker)\
**Replies:** 2\
**Last updated:** [February 17, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/sending-mail/160532 "2009-02-17T14:17:04Z")

</div>

how to send email in html and xml format?

---

## [Inserting a form on a page when button pressed](https://www.ruby-forum.com/t/inserting-a-form-on-a-page-when-button-pressed/160352)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [February 17, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/inserting-a-form-on-a-page-when-button-pressed/160352 "2009-02-17T14:15:21Z")

</div>

Ive googled this and searched here and other forums but not getting appropriate reuslts. Perhaps someone on the board can help. All i want to do is to have a button/link on a page such as “add task” which when pressed…

---

## [Thumbnails](https://www.ruby-forum.com/t/thumbnails/160522)

<div class="topic-metadata">

**Author:** [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Replies:** 1\
**Last updated:** [February 17, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/thumbnails/160522 "2009-02-17T14:11:08Z")

</div>

Hello friends. I am working on Ruby On Rails . I have the problem with “Thumbnails”. It’s not getting resized to the specified resolution even not in file system. What could be the reason ? Thanks in advance. regard…

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

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