# Rails

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

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

---

## [Select tag for collection form](https://www.ruby-forum.com/t/select-tag-for-collection-form/103075)

<div class="topic-metadata">

**Author:** [@keith](https://www.ruby-forum.com/u/keith)\
**Replies:** 0\
**Last updated:** [May 1, 2007, 3:07pm UTC](https://www.ruby-forum.com/t/select-tag-for-collection-form/103075 "2007-05-01T15:07:01Z")

</div>

I am trying to update multiple objects (in a collection) from a single form. I found an explanation of how to do it for text\_fields in the Agile book (v2, P.499 PDF), but I can’t figure out how to do the same thing f…

---

## [Search for dates in oracle not working?](https://www.ruby-forum.com/t/search-for-dates-in-oracle-not-working/92288)

<div class="topic-metadata">

**Author:** [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Replies:** 4\
**Last updated:** [May 1, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/search-for-dates-in-oracle-not-working/92288 "2007-05-01T15:03:01Z")

</div>

hi list, i’m using the oci adapter to talk to Oracle 9i on Win XP Pro, ruby 185-21, rails 1.2.1 my controller has this code (simplified for testing): sql = “SELECT \* FROM reviews WHERE ((created\_at between ‘06feb07’ …

---

## [Eager loading not working in production mode](https://www.ruby-forum.com/t/eager-loading-not-working-in-production-mode/93016)

<div class="topic-metadata">

**Author:** [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/eager-loading-not-working-in-production-mode/93016 "2007-05-01T14:56:00Z")

</div>

i have an eager load query as such: @groups = ReviewQuestionGroup.find(:all, :conditions =\> \["review\_category\_id = ?", @review.category.id\], :order =\> 'review\_question\_groups.position, review\_questions.position’, …

---

## [Dynamic text highlighting](https://www.ruby-forum.com/t/dynamic-text-highlighting/93160)

<div class="topic-metadata">

**Author:** [@tomas](https://www.ruby-forum.com/u/tomas)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 2:54pm UTC](https://www.ruby-forum.com/t/dynamic-text-highlighting/93160 "2007-05-01T14:54:00Z")

</div>

Hi, consider following situation: I want to load an external site A.html in an iframe. As far, no problem. But now, I want to load it with words hightlighted on it, like Google’s cache result pages. Unfortunately, th…

---

## [Updating to using database for sessions](https://www.ruby-forum.com/t/updating-to-using-database-for-sessions/103039)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 2\
**Last updated:** [May 1, 2007, 2:38pm UTC](https://www.ruby-forum.com/t/updating-to-using-database-for-sessions/103039 "2007-05-01T14:38:28Z")

</div>

i am currently updating my app to use the database to store sessions, and i am getting the following error: rake db:migrate in /Users/sergioruiz/Sites/pod\_caster/trunk) Liquid doesn’t seem to be loaded… uninitialized…

---

## [ActiveRecord Previous/Next Record](https://www.ruby-forum.com/t/activerecord-previous-next-record/103062)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [May 1, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/activerecord-previous-next-record/103062 "2007-05-01T14:13:54Z")

</div>

Does ActiveRecord offer a simple solution to get previous/next records relative to a certain record? For instance, say I have this table: PEOPLE id | name 1 | john 2 | mary 3 | bob Using p = Person.find(2), is …

---

## [Model and lazy loading](https://www.ruby-forum.com/t/model-and-lazy-loading/103035)

<div class="topic-metadata">

**Author:** [@mario](https://www.ruby-forum.com/u/mario)\
**Replies:** 4\
**Last updated:** [May 1, 2007, 2:12pm UTC](https://www.ruby-forum.com/t/model-and-lazy-loading/103035 "2007-05-01T14:12:54Z")

</div>

Is there a concept of having a model attribute loaded only when necessary. For example, I have a model called product with an attribute called file which is stored in the database as a blob. I would like to be able …

---

## [Structuring a rails application](https://www.ruby-forum.com/t/structuring-a-rails-application/103008)

<div class="topic-metadata">

**Author:** [@r3dcaps](https://www.ruby-forum.com/u/r3dcaps)\
**Replies:** 2\
**Last updated:** [May 1, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/structuring-a-rails-application/103008 "2007-05-01T12:40:48Z")

</div>

I try to structure my rails application with modules, but i have problems to define the routes. Is’ it possible to use someting like this: \<%= link to ‘…’, :module =\> :module\_name, :controller =\> :ctrl\_name \[…\] -%\> ? …

---

## [Updating only changed columns in ActiveRecord](https://www.ruby-forum.com/t/updating-only-changed-columns-in-activerecord/103066)

<div class="topic-metadata">

**Author:** [@candlerb](https://www.ruby-forum.com/u/candlerb)\
**Replies:** 0\
**Last updated:** [May 1, 2007, 12:29pm UTC](https://www.ruby-forum.com/t/updating-only-changed-columns-in-activerecord/103066 "2007-05-01T12:29:48Z")

</div>

Does anyone know of a way to get ActiveRecord to update only the columns which have changed? For example, consider a table foos with columns x,y,z. If I do f = Foo.find(123) f.update\_attributes(:x =\> 99) then I want …

---

## [Multiple apps, one host (mongrel, apache2)?](https://www.ruby-forum.com/t/multiple-apps-one-host-mongrel-apache2/93219)

<div class="topic-metadata">

**Author:** [@dankitania](https://www.ruby-forum.com/u/dankitania)\
**Replies:** 8\
**Last updated:** [May 1, 2007, 12:28pm UTC](https://www.ruby-forum.com/t/multiple-apps-one-host-mongrel-apache2/93219 "2007-05-01T12:28:48Z")

</div>

Fame, glory, and a lot of appreciation would shower upon anyone who can indicate how to use mongrel with apache2, to get multiple public apps on one host, without DNS or IP tweaking, etc. To be concrete, let’s say we’…

---

## [Problems with UTF-8 and AJAX](https://www.ruby-forum.com/t/problems-with-utf-8-and-ajax/103059)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 4\
**Last updated:** [May 1, 2007, 11:55am UTC](https://www.ruby-forum.com/t/problems-with-utf-8-and-ajax/103059 "2007-05-01T11:55:45Z")

</div>

Hey :slight\_smile: I have an AJAX tree to manage pages in a CMS-like manner. The leaves can be clicked to expand an editor which allows the backend admin to alter settings, set page titles, add content, etc. The site’…

---

## [Weird characters, like Ã¢â‚¬â€œ, displaying](https://www.ruby-forum.com/t/weird-characters-like-a-a-a-oe-displaying/93265)

<div class="topic-metadata">

**Author:** [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Replies:** 3\
**Last updated:** [May 1, 2007, 11:14am UTC](https://www.ruby-forum.com/t/weird-characters-like-a-a-a-oe-displaying/93265 "2007-05-01T11:14:43Z")

</div>

I’m getting weird characters displaying on my pages, e.g.: Ã¢â‚¬â€œ. I’m using MySQL and my database encoding is set to utf8 and I set the character set for my pages to render as utf8 with . Does anyone know how to ge…

---

## [Upload File Using form\_remote\_tag?](https://www.ruby-forum.com/t/upload-file-using-form-remote-tag/103026)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [May 1, 2007, 10:57am UTC](https://www.ruby-forum.com/t/upload-file-using-form-remote-tag/103026 "2007-05-01T10:57:42Z")

</div>

Is it possible to create a multipart form that uploads the file using an AJAX remote call? I’m having a hard time figuring out the syntax if it is possible! Thanks, Tom

---

## [Ruby on Rails Professional Required](https://www.ruby-forum.com/t/ruby-on-rails-professional-required/105875)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 1, 2007, 10:44am UTC](https://www.ruby-forum.com/t/ruby-on-rails-professional-required/105875 "2007-05-01T10:44:40Z")

</div>

Hi We are looking for Ruby on Rails professional with 1 - 2yrs of experience. This for Pune Location. Thanks Bikash

---

## [Rails keep adding \_session\_id in redirect..why?](https://www.ruby-forum.com/t/rails-keep-adding-session-id-in-redirect-why/103058)

<div class="topic-metadata">

**Author:** [@Helene\_Jonsson](https://www.ruby-forum.com/u/Helene_Jonsson)\
**Replies:** 0\
**Last updated:** [May 1, 2007, 9:59am UTC](https://www.ruby-forum.com/t/rails-keep-adding-session-id-in-redirect-why/103058 "2007-05-01T09:59:34Z")

</div>

Hi: Thanks to Russell N. I could redirect from one rails app to another app. But during redirect… rails add an extra session key. Which is not in my app at all. i.e my session name is \_myapp\_session\_id and both of my …

---

## [Silence logging for a particular action](https://www.ruby-forum.com/t/silence-logging-for-a-particular-action/103045)

<div class="topic-metadata">

**Author:** [@Zack\_C](https://www.ruby-forum.com/u/Zack_C)\
**Replies:** 2\
**Last updated:** [May 1, 2007, 9:27am UTC](https://www.ruby-forum.com/t/silence-logging-for-a-particular-action/103045 "2007-05-01T09:27:21Z")

</div>

Anyone know how to silence logging of a particular Rails action? I have monit setup to ping a “/ping” route and the action just renders some quick text. The problem is I get: Processing SiteController#ping (for 127.0…

---

## [Rails Web services (in general), HTTP GET and JSON and other](https://www.ruby-forum.com/t/rails-web-services-in-general-http-get-and-json-and-other/105477)

<div class="topic-metadata">

**Author:** [@dtdtdt](https://www.ruby-forum.com/u/dtdtdt)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 8:15am UTC](https://www.ruby-forum.com/t/rails-web-services-in-general-http-get-and-json-and-other/105477 "2007-05-01T08:15:31Z")

</div>

Hi, I like SOA, I like Ajax, I like Ruby/Rails, but I am in doubt how to make some things. There are always solutions, but my idea is not solving the problem, but learning the best way to solve it. I didn’t find near…

---

## [Acts\_as\_list with :scope - how do I move items to a differen](https://www.ruby-forum.com/t/acts-as-list-with-scope-how-do-i-move-items-to-a-differen/93242)

<div class="topic-metadata">

**Author:** [@Dmitry\_Y](https://www.ruby-forum.com/u/Dmitry_Y)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 8:09am UTC](https://www.ruby-forum.com/t/acts-as-list-with-scope-how-do-i-move-items-to-a-differen/93242 "2007-05-01T08:09:31Z")

</div>

Hi, I have in my simplistic app: class Album has\_many :pics, :order =\> :position end class Pic belongs\_to :album acts\_as\_list :scope =\> ::album end It all works fine when creating a new pic from the forms. But, …

---

## [Ruby script that uses rails views?](https://www.ruby-forum.com/t/ruby-script-that-uses-rails-views/103054)

<div class="topic-metadata">

**Author:** [@jakattack](https://www.ruby-forum.com/u/jakattack)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 7:41am UTC](https://www.ruby-forum.com/t/ruby-script-that-uses-rails-views/103054 "2007-05-01T07:41:29Z")

</div>

Hi All, I want to write a ruby script that I can launch via a cron job once a night. This script would need to access a rails app that've created, it would need to render a xml builder view in the app to text and sav…

---

## [Need help with a simple route](https://www.ruby-forum.com/t/need-help-with-a-simple-route/103049)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 6:21am UTC](https://www.ruby-forum.com/t/need-help-with-a-simple-route/103049 "2007-05-01T06:21:25Z")

</div>

This is a dumb question but for some reason I can not get this to work. I basically just need a route that is prefixed with /components. So I did this: map.components “/components/:controller/:action” The problem is …

---

## [URI.encode does not encode &=?](https://www.ruby-forum.com/t/uri-encode-does-not-encode/103030)

<div class="topic-metadata">

**Author:** [@Reynard](https://www.ruby-forum.com/u/Reynard)\
**Replies:** 3\
**Last updated:** [May 1, 2007, 6:13am UTC](https://www.ruby-forum.com/t/uri-encode-does-not-encode/103030 "2007-05-01T06:13:24Z")

</div>

I’m wondering why URI.encode does not encode &=? URI.encode(’&=?’) =\> ‘&=?’ Is there alternative that works better? or should I write my own? -reynard

---

## [Simulating Ajax XHR](https://www.ruby-forum.com/t/simulating-ajax-xhr/103041)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 5:30am UTC](https://www.ruby-forum.com/t/simulating-ajax-xhr/103041 "2007-05-01T05:30:23Z")

</div>

Is there anyway to modify a URL to pretend to be XHR (for debugging) - the same way you can add .xml or .js to debug those?

---

## [Joining tables and query design advice](https://www.ruby-forum.com/t/joining-tables-and-query-design-advice/103044)

<div class="topic-metadata">

**Author:** [@dustin](https://www.ruby-forum.com/u/dustin)\
**Replies:** 0\
**Last updated:** [May 1, 2007, 4:57am UTC](https://www.ruby-forum.com/t/joining-tables-and-query-design-advice/103044 "2007-05-01T04:57:05Z")

</div>

Hi everyone, My problem involves two tables, Objects and Attributes: Objects |ID Name Attributes |ID |Object\_ID (foreign key references Objects.id) Value I want to be able to search for Objects by …

---

## [Attachment\_fu not saving thumbnails](https://www.ruby-forum.com/t/attachment-fu-not-saving-thumbnails/93018)

<div class="topic-metadata">

**Author:** [@mr\_robot](https://www.ruby-forum.com/u/mr_robot)\
**Replies:** 7\
**Last updated:** [May 1, 2007, 4:34am UTC](https://www.ruby-forum.com/t/attachment-fu-not-saving-thumbnails/93018 "2007-05-01T04:34:18Z")

</div>

hi attachment\_fu is not saving thumbnails, nor parent\_id or width or height in the database. any ideas why? using minimagick class Mugshots \< ActiveRecord::Base has\_attachment :processor =\> :mini\_magick, :content\_t…

---

## [Rails/javascript file browser](https://www.ruby-forum.com/t/rails-javascript-file-browser/102997)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 4:15am UTC](https://www.ruby-forum.com/t/rails-javascript-file-browser/102997 "2007-05-01T04:15:16Z")

</div>

HI, I need a file browser that can be embedded on the web page. Does anyone know a decent one that will integrate with Rails well?? Thanks Chris

---

## [What are Cacher & GarbageCollector for?](https://www.ruby-forum.com/t/what-are-cacher-garbagecollector-for/103015)

<div class="topic-metadata">

**Author:** [@jmay](https://www.ruby-forum.com/u/jmay)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 1:53am UTC](https://www.ruby-forum.com/t/what-are-cacher-garbagecollector-for/103015 "2007-05-01T01:53:10Z")

</div>

In the default environment.rb that is created with a new Rails app, the following line is commented out: config.active\_record.observers = :cacher, :garbage\_collector What are these two observers for? I can’t find docu…

---

## [Collection\_select - prepending a "any" option](https://www.ruby-forum.com/t/collection-select-prepending-a-any-option/103032)

<div class="topic-metadata">

**Author:** [@sbeam](https://www.ruby-forum.com/u/sbeam)\
**Replies:** 1\
**Last updated:** [May 1, 2007, 12:46am UTC](https://www.ruby-forum.com/t/collection-select-prepending-a-any-option/103032 "2007-05-01T00:46:04Z")

</div>

Say I have a normal tag being generated thusly: \<%= collection\_select :task, :id, Task.find(:all), :id, :name %\> what is the easiest way to add a “ANY” option to the top of the option list? I know Task.find(:all) ret…

---

## [Has\_many :through polymorphic](https://www.ruby-forum.com/t/has-many-through-polymorphic/93262)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 30, 2007, 11:43pm UTC](https://www.ruby-forum.com/t/has-many-through-polymorphic/93262 "2007-04-30T23:43:58Z")

</div>

Hi All, I have the following arrangement: class PickAndPackRequest \< ActiveRecord::Base has\_many :transactions, :as =\> :request has\_many :postings, :through =\> :transactions end class Transaction \< ActiveRecord::Ba…

---

## [ActiveRecord: removing validations or callbacks on a subclas](https://www.ruby-forum.com/t/activerecord-removing-validations-or-callbacks-on-a-subclas/103023)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 1\
**Last updated:** [April 30, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/activerecord-removing-validations-or-callbacks-on-a-subclas/103023 "2007-04-30T23:23:56Z")

</div>

Often a parent class has validations (or callbacks or associations) which I don’t want the subclass to have. Is there any simple way to remove these?

---

## [Re: attachment\_fu content\_type problem](https://www.ruby-forum.com/t/re-attachment-fu-content-type-problem/103018)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 1\
**Last updated:** [April 30, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/re-attachment-fu-content-type-problem/103018 "2007-04-30T22:08:49Z")

</div>

Well, It doesn’t look the my issue had to deal with the content\_type at all. Rather it was related to the size of the attachment. Seems that for files \< about 16k, Attachment\_fu handles them as a StringObject. If t…

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

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