# Rails

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

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

---

## [HABTM updating/saving behaviour](https://www.ruby-forum.com/t/habtm-updating-saving-behaviour/104372)

<div class="topic-metadata">

**Author:** [@Andrea\_Morandini](https://www.ruby-forum.com/u/Andrea_Morandini)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 9:27am UTC](https://www.ruby-forum.com/t/habtm-updating-saving-behaviour/104372 "2007-05-17T09:27:06Z")

</div>

Newbie question (I guess). I have a User whom can have some Preference. So the scracth model is: class User \< ActiveRecord:Base \[…\] has\_and\_belongs\_to\_many :preferences \[…\] end class Preference \< ActiveRecord:Base …

---

## [2 tix to RailConf available -- free to the right hands](https://www.ruby-forum.com/t/2-tix-to-railconf-available-free-to-the-right-hands/104249)

<div class="topic-metadata">

**Author:** [@Gleb\_Arshinov](https://www.ruby-forum.com/u/Gleb_Arshinov)\
**Replies:** 2\
**Last updated:** [May 17, 2007, 7:59am UTC](https://www.ruby-forum.com/t/2-tix-to-railconf-available-free-to-the-right-hands/104249 "2007-05-17T07:59:00Z")

</div>

Hi, I am writing this for RenderX (http://renderx.com/). Couple of people from RenderX that were planning to go to RailsConf can’t make it. So, we’d like to offer the tickets to the community. RenderX will be happ…

---

## [MySQL set data type](https://www.ruby-forum.com/t/mysql-set-data-type/104366)

<div class="topic-metadata">

**Author:** [@elliotlarson](https://www.ruby-forum.com/u/elliotlarson)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 6:57am UTC](https://www.ruby-forum.com/t/mysql-set-data-type/104366 "2007-05-17T06:57:56Z")

</div>

I have a legacy database table I’m working with in Rails and one of the fields is the MySQL set field type, like so: userRoles set(‘CEO’,‘President’,‘Vice President’,‘Sales Manager’) When I access the table with Activ…

---

## [HABTM - update with no values selected](https://www.ruby-forum.com/t/habtm-update-with-no-values-selected/104361)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 2\
**Last updated:** [May 17, 2007, 5:54am UTC](https://www.ruby-forum.com/t/habtm-update-with-no-values-selected/104361 "2007-05-17T05:54:36Z")

</div>

I am a rails newbie and I am trying to figure out the best way to solve this problem. Here is the code in my controller (the param tag\_ids is a series of checkboxes). 1 def update 2 @blog = Blog.find(params\[:id\]…

---

## [Public facing page as subdomain](https://www.ruby-forum.com/t/public-facing-page-as-subdomain/104356)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 5:32am UTC](https://www.ruby-forum.com/t/public-facing-page-as-subdomain/104356 "2007-05-17T05:32:13Z")

</div>

I’m trying to figure out how to get a public facing profile page to run through a subdomain. The subdomain doesn’t need to serve as a login page to anything, it’s just meant to be a public address with profile info. I…

---

## [Having a default condition in model](https://www.ruby-forum.com/t/having-a-default-condition-in-model/104344)

<div class="topic-metadata">

**Author:** [@sbeam](https://www.ruby-forum.com/u/sbeam)\
**Replies:** 3\
**Last updated:** [May 17, 2007, 2:12am UTC](https://www.ruby-forum.com/t/having-a-default-condition-in-model/104344 "2007-05-17T02:12:39Z")

</div>

Is there a way to specify at the model level that you want all calls to find(), find\_by\_xxxx(), etc, to include a certain :conditions clause? for instance, if normally you wanted to only select articles where “is\_publ…

---

## [Adate expected, got String](https://www.ruby-forum.com/t/adate-expected-got-string/104332)

<div class="topic-metadata">

**Author:** [@Steven\_Bao](https://www.ruby-forum.com/u/Steven_Bao)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 1:58am UTC](https://www.ruby-forum.com/t/adate-expected-got-string/104332 "2007-05-17T01:58:38Z")

</div>

Hello, I have the models “announcement” and “adate” where “announcement” belongs\_to :adate and adate :has\_many announcements. When I try submitting a form using the name announcement\[adate\] it des not work - gives me…

---

## [Trouble deploying / errors on production server](https://www.ruby-forum.com/t/trouble-deploying-errors-on-production-server/103839)

<div class="topic-metadata">

**Author:** [@wheels](https://www.ruby-forum.com/u/wheels)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 1:35am UTC](https://www.ruby-forum.com/t/trouble-deploying-errors-on-production-server/103839 "2007-05-17T01:35:36Z")

</div>

I’ve just developed my first 2 rails apps but can’t get them to work on my server. The support guys are saying something’s wrong with my application because it generates this error: ./…/config/boot.rb:29: undefined m…

---

## [Protecting ActiveRecord Associations](https://www.ruby-forum.com/t/protecting-activerecord-associations/104068)

<div class="topic-metadata">

**Author:** [@jmckible](https://www.ruby-forum.com/u/jmckible)\
**Replies:** 12\
**Last updated:** [May 17, 2007, 12:36am UTC](https://www.ruby-forum.com/t/protecting-activerecord-associations/104068 "2007-05-17T00:36:32Z")

</div>

I am working on a REST API and I’ve noticed mass assignment can really be a huge security hole if you don’t take proactive measure. For example: class User \< ActiveRecord::Base has\_many :categories end class Categ…

---

## [Routing Error for big text](https://www.ruby-forum.com/t/routing-error-for-big-text/104351)

<div class="topic-metadata">

**Author:** [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 12:17am UTC](https://www.ruby-forum.com/t/routing-error-for-big-text/104351 "2007-05-17T00:17:31Z")

</div>

Hello, Hello I have very strange problem, when i try to edit or create a big text have this error "Routing Error no route found to match “/error.php” with {:method=\>:get}" When i user the console it’s work I have t…

---

## [Having issues with integration test - responses are always 5](https://www.ruby-forum.com/t/having-issues-with-integration-test-responses-are-always-5/104349)

<div class="topic-metadata">

**Author:** [@itsaboutprogress](https://www.ruby-forum.com/u/itsaboutprogress)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 12:00am UTC](https://www.ruby-forum.com/t/having-issues-with-integration-test-responses-are-always-5/104349 "2007-05-17T00:00:30Z")

</div>

I have a test class for integration testing some operations in my application. Im simply trying to test whether a user with role of ‘user’ can access a specific page in the application which is mapped in the database.…

---

## [\[ANN\] production\_log\_analyzer 1.5.0 Released](https://www.ruby-forum.com/t/ann-production-log-analyzer-1-5-0-released/123772)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/ann-production-log-analyzer-1-5-0-released/123772 "2007-05-16T23:40:27Z")

</div>

production\_log\_analyzer version 1.5.0 has been released! http://seattlerb.rubyforge.org/production\_log\_analyzer production\_log\_analyzer provides three tools to analyze log files created by SyslogLogger. pl\_analyze fo…

---

## [Update\_attributes not working in self.up migration](https://www.ruby-forum.com/t/update-attributes-not-working-in-self-up-migration/104276)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 9\
**Last updated:** [May 16, 2007, 11:02pm UTC](https://www.ruby-forum.com/t/update-attributes-not-working-in-self-up-migration/104276 "2007-05-16T23:02:50Z")

</div>

i have a migration script that looks like this: def self.up rename\_column :books, :finalizing, :progress\_step change\_column :books, :progress\_step, :integer, :length=\>2 Book.find(:all).each do |book| book.update\_att…

---

## [Tips for Optimizing Rails on Oracle](https://www.ruby-forum.com/t/tips-for-optimizing-rails-on-oracle/104340)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/tips-for-optimizing-rails-on-oracle/104340 "2007-05-16T22:33:19Z")

</div>

Excellent new article from Luca M. about tips and techniques for building more efficient RoR applications on Oracle, from tweaking connection parameters to using execution plans and indexes: http://www.oracle.com/tech…

---

## [New Contest from Apple](https://www.ruby-forum.com/t/new-contest-from-apple/104336)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/new-contest-from-apple/104336 "2007-05-16T22:24:36Z")

</div>

http://www.apple.speedway-sweepstakes.com Win a 80GB Apple iPod ($349 USD). Valid until 6/30/07. Limit one entry per person. U.S. and Canada only. No purchase necessary.

---

## [Belongs\_to trigger on update?](https://www.ruby-forum.com/t/belongs-to-trigger-on-update/104326)

<div class="topic-metadata">

**Author:** [@ewildgoose](https://www.ruby-forum.com/u/ewildgoose)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/belongs-to-trigger-on-update/104326 "2007-05-16T22:24:18Z")

</div>

This may be a rails bug, but I can’t figure out how to do attribute overrides for the attribute created for a belongs\_to relationship I have a simple relationship: User belongs\_to Domain User has a property email\_add…

---

## [\[ANN\] RubyWorks 0.0.1 - early preview alpha "who knows, it m](https://www.ruby-forum.com/t/ann-rubyworks-0-0-1-early-preview-alpha-who-knows-it-m/104281)

<div class="topic-metadata">

**Author:** [@alexeyv](https://www.ruby-forum.com/u/alexeyv)\
**Replies:** 10\
**Last updated:** [May 16, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/ann-rubyworks-0-0-1-early-preview-alpha-who-knows-it-m/104281 "2007-05-16T22:21:18Z")

</div>

Dear world at large, In the spirit of “release early, release often”, with special emphasis on “early”, we are making available to you RubyWorks 0.0.1. RubyWorks is a yum repository (collection of binary RPM packages)…

---

## [RMagick Setting Quality or Compression](https://www.ruby-forum.com/t/rmagick-setting-quality-or-compression/123372)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 16, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/rmagick-setting-quality-or-compression/123372 "2007-05-16T22:20:18Z")

</div>

I am trying to dynamically set the compression or quality of an image when displaying it. I have seen in the RMagick documentation how to set the quality only when writing the file to disk. How can I set the quality…

---

## [RSpec Controllers](https://www.ruby-forum.com/t/rspec-controllers/104335)

<div class="topic-metadata">

**Author:** [@subimage](https://www.ruby-forum.com/u/subimage)\
**Replies:** 2\
**Last updated:** [May 16, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/rspec-controllers/104335 "2007-05-16T22:18:17Z")

</div>

Anyone have any suggestions on basic best practices for rspec controllers? Or any good examples of some rspec controllers?

---

## [Finding the Button inside the CELL](https://www.ruby-forum.com/t/finding-the-button-inside-the-cell/104290)

<div class="topic-metadata">

**Author:** [@amruta](https://www.ruby-forum.com/u/amruta)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/finding-the-button-inside-the-cell/104290 "2007-05-16T22:10:16Z")

</div>

Hi all Here i am stuck to a problem . i want to execute the click event of a button which is being located in the table cell which dont have any id. So please give me any solution for that. Example: …

---

## [How I can use date from form via params?](https://www.ruby-forum.com/t/how-i-can-use-date-from-form-via-params/104247)

<div class="topic-metadata">

**Author:** [@alabama](https://www.ruby-forum.com/u/alabama)\
**Replies:** 4\
**Last updated:** [May 16, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/how-i-can-use-date-from-form-via-params/104247 "2007-05-16T21:57:15Z")

</div>

Hi everybody ! Is somebody so polite and tell me, how I can use date from form via params ? For egzample: I have form “customer”. When I have to use in my controller customer name, I can write : @name = params\[:cus…

---

## [Save the position of a Dropped element](https://www.ruby-forum.com/t/save-the-position-of-a-dropped-element/104334)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/save-the-position-of-a-dropped-element/104334 "2007-05-16T21:44:33Z")

</div>

I’m working on creating something similar to igoogle. The idea is that a user can drag an element anywhere on the page at which point the elements position will be stored in the database and be used to place the elem…

---

## [Controller information in models?](https://www.ruby-forum.com/t/controller-information-in-models/104328)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 9:17pm UTC](https://www.ruby-forum.com/t/controller-information-in-models/104328 "2007-05-16T21:17:11Z")

</div>

I have a situation where I need information from my controller in my models. For example, I want to send out an email to a user notifying them that their user information was modified. I only want to do this if this i…

---

## [Unknown action, No action responded to world](https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-world/104333)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 9:09pm UTC](https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-world/104333 "2007-05-16T21:09:10Z")

</div>

http://localhost:3000/hello/world gives: "Unknown action No action responded to world" I’m following along with \<http://wiki.rubyonrails.org/rails/pages/ Tutorial\> and what stands out are statements like: “Now take …

---

## [Customizing the Ok/Cancel buttons for in\_place\_editor](https://www.ruby-forum.com/t/customizing-the-ok-cancel-buttons-for-in-place-editor/104321)

<div class="topic-metadata">

**Author:** [@HSWade\_M](https://www.ruby-forum.com/u/HSWade_M)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/customizing-the-ok-cancel-buttons-for-in-place-editor/104321 "2007-05-16T20:00:02Z")

</div>

Is there an easy way to get the in\_place\_editor to use image-based submit and cancel buttons? Or does that involve hacking the javascript directly? –Wade

---

## [New records added](https://www.ruby-forum.com/t/new-records-added/104322)

<div class="topic-metadata">

**Author:** [@ana](https://www.ruby-forum.com/u/ana)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 7:33pm UTC](https://www.ruby-forum.com/t/new-records-added/104322 "2007-05-16T19:33:19Z")

</div>

I woul like a page to show only a sum of new records added (10 days old), i.e “New Documents added (10)”, then when clicked a filter that shows me only those new records.

---

## [Tying table](https://www.ruby-forum.com/t/tying-table/104308)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 4\
**Last updated:** [May 16, 2007, 7:17pm UTC](https://www.ruby-forum.com/t/tying-table/104308 "2007-05-16T19:17:57Z")

</div>

I’m not sure if rails can manage this for you, but in the past when I have two objects that access the same object I’ve created a tying table (not sure if this is the right way to say it). For example, an organization…

---

## [How do I Sorting Options](https://www.ruby-forum.com/t/how-do-i-sorting-options/104307)

<div class="topic-metadata">

**Author:** [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Replies:** 2\
**Last updated:** [May 16, 2007, 7:00pm UTC](https://www.ruby-forum.com/t/how-do-i-sorting-options/104307 "2007-05-16T19:00:55Z")

</div>

I am using options\_from\_collection\_for\_select to pull from a DB. How do I sort the result set that comes up?? Blessed Be Phillip

---

## [Question about relations](https://www.ruby-forum.com/t/question-about-relations/104315)

<div class="topic-metadata">

**Author:** [@laurent](https://www.ruby-forum.com/u/laurent)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/question-about-relations/104315 "2007-05-16T18:15:50Z")

</div>

Hi We get a little problem to do some relations between to Models : First we have to Tables : Roles : id (pk) … c\_type\_role Role\_Action\_Relations : id (pk) … c\_type\_role\_id For one class of role (Roles.c\_type\_…

---

## [\[ANN\] acts\_as\_solr v.0.8.5 has been released](https://www.ruby-forum.com/t/ann-acts-as-solr-v-0-8-5-has-been-released/104312)

<div class="topic-metadata">

**Author:** [@Thiago\_J](https://www.ruby-forum.com/u/Thiago_J)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/ann-acts-as-solr-v-0-8-5-has-been-released/104312 "2007-05-16T18:00:49Z")

</div>

The acts\_as\_solr plugin v.0.8.5 has been released and this short release includes: FIX: There’s no need to specify the :field\_types anymore when doing a search in a model that specifies a field type for a field. The f…

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

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