# Rails

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

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

---

## [\[ANN\] Classy Inheritance Rel. 0.6.2](https://www.ruby-forum.com/t/ann-classy-inheritance-rel-0-6-2/149550)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [September 26, 2008, 4:00am UTC](https://www.ruby-forum.com/t/ann-classy-inheritance-rel-0-6-2/149550 "2008-09-26T04:00:44Z")

</div>

About: http://stonean.com/wiki/classy-inheritance Classy Inheritance simplifies the definition and implementation of one object depending on another object. For example, a User object depending on a Person object. …

---

## [Sortable\_column\_headers plugin not sorting properly?](https://www.ruby-forum.com/t/sortable-column-headers-plugin-not-sorting-properly/149549)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 0\
**Last updated:** [September 26, 2008, 2:27am UTC](https://www.ruby-forum.com/t/sortable-column-headers-plugin-not-sorting-properly/149549 "2008-09-26T02:27:39Z")

</div>

It appears the default sort direction is always sent to the query, even if a different column is clicked to sort. For example: add\_to\_sortable\_columns(‘search’, :model =\> Status, :field =\> ‘name’, :sort\_direction =\> …

---

## [Defining polymorphic type condition](https://www.ruby-forum.com/t/defining-polymorphic-type-condition/149543)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 1\
**Last updated:** [September 26, 2008, 1:24am UTC](https://www.ruby-forum.com/t/defining-polymorphic-type-condition/149543 "2008-09-26T01:24:50Z")

</div>

As great as Rails 2.1 is, I for the life of me cannot figure out why polymorphic associations do not support reconfiguring the type column used. For example, I have no way to do a polymorphic association using a look…

---

## [Settings request.domain for testing purposes](https://www.ruby-forum.com/t/settings-request-domain-for-testing-purposes/149531)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 1\
**Last updated:** [September 26, 2008, 12:45am UTC](https://www.ruby-forum.com/t/settings-request-domain-for-testing-purposes/149531 "2008-09-26T00:45:54Z")

</div>

My app, relies on request.domain to display some data according to the domain. However during RSpec tests, the request.domain is set to “test.host”. Is there a way I can manually set it for the test environment? Than…

---

## [Will acts\_as\_paranoid work with attachment\_fu?](https://www.ruby-forum.com/t/will-acts-as-paranoid-work-with-attachment-fu/149525)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 1\
**Last updated:** [September 26, 2008, 12:12am UTC](https://www.ruby-forum.com/t/will-acts-as-paranoid-work-with-attachment-fu/149525 "2008-09-26T00:12:46Z")

</div>

I’ve got a problem in that users are deleting a paranoid model through the application, including dependents. Some of these dependents are paranoid too, but not the attachments. (I’m using DB file storage.) I need to …

---

## [Back ground Job](https://www.ruby-forum.com/t/back-ground-job/149493)

<div class="topic-metadata">

**Author:** [@kurian](https://www.ruby-forum.com/u/kurian)\
**Replies:** 1\
**Last updated:** [September 25, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/back-ground-job/149493 "2008-09-25T23:15:41Z")

</div>

i am using starling and workling for sending mail in background This is giving me an error Calling MailingsWorker#send\_mailing({:uid=\>“mailings\_workers:send\_mailing:ab6867ccb04cb1180afeb50c7f8f5ad4”, :email=\>“removed…

---

## [Multiple in one form](https://www.ruby-forum.com/t/multiple-in-one-form/149111)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 5\
**Last updated:** [September 25, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/multiple-in-one-form/149111 "2008-09-25T22:42:57Z")

</div>

hi, I just try to deal with multiples model in one form, using ajax to add models. but got a weird params hash. got: :master\_model =\> { :sub\_model =\> \[ { :field\_1 =\> “1” }, { :field\_1 =\> “2”, :field\_2 =\> “3” }, {…

---

## [Writing to innodb reading from myisam](https://www.ruby-forum.com/t/writing-to-innodb-reading-from-myisam/149532)

<div class="topic-metadata">

**Author:** [@birdwatcher](https://www.ruby-forum.com/u/birdwatcher)\
**Replies:** 1\
**Last updated:** [September 25, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/writing-to-innodb-reading-from-myisam/149532 "2008-09-25T21:24:52Z")

</div>

Hi - We’re pondering whether this is possible or whether anyone else has done this. We would like to write records to an innodb database (master) but have the front-end of out app interface a myisam (slave) database…

---

## [How to pass parameters to controller method from view?](https://www.ruby-forum.com/t/how-to-pass-parameters-to-controller-method-from-view/149460)

<div class="topic-metadata">

**Author:** [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Replies:** 3\
**Last updated:** [September 25, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/how-to-pass-parameters-to-controller-method-from-view/149460 "2008-09-25T20:18:06Z")

</div>

Controllers/files\_controller.rb class FilesController \< ApplicationController def export\_database(obj) obj.save\_to\_file end end Views/files/show.html.erb \<% \[RmEnv, RmProc\].each do |db\_obj| %\> \<%= button\_to “expo…

---

## [Inflector \>\> "progress"](https://www.ruby-forum.com/t/inflector-progress/149516)

<div class="topic-metadata">

**Author:** [@jhnsntmthy](https://www.ruby-forum.com/u/jhnsntmthy)\
**Replies:** 3\
**Last updated:** [September 25, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/inflector-progress/149516 "2008-09-25T20:14:16Z")

</div>

I have this in my Inflector file: ActiveSupport::Inflector.inflections do |inflect| inflect.irregular ‘progress’, ‘progresses’ end but when I run: “progress”.classify i get =\> Progres Obviously this is messin…

---

## [Map.routes.rb pls help](https://www.ruby-forum.com/t/map-routes-rb-pls-help/149515)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [September 25, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/map-routes-rb-pls-help/149515 "2008-09-25T19:54:48Z")

</div>

hi i am having a search option in my application.after the search url is going as /search?query=linux. I want to achieve it as /search/linux using routes.rb i am giving it as map.search ‘search/\*query\_text’,:control…

---

## [Fixtures and created\_at](https://www.ruby-forum.com/t/fixtures-and-created-at/149470)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/fixtures-and-created-at/149470 "2008-09-25T19:31:16Z")

</div>

Hi When I use a fixture yml file to load setup data into my database my created\_at fields are always being set to ‘0000-00-00 00:00:00’ I have even tried injecting sql AND ruby code into the data field of the yml to …

---

## [ActionMailer::Base send via "secure connection"?](https://www.ruby-forum.com/t/actionmailer-base-send-via-secure-connection/147451)

<div class="topic-metadata">

**Author:** [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/actionmailer-base-send-via-secure-connection/147451 "2008-09-25T19:12:27Z")

</div>

I’m using Google Mail SMTP server which requires sending via a secure connection. REF: Check Gmail through other email platforms - Gmail Help Looking at: :authentication - :cram\_md5… but that doesn’t appear to be t…

---

## [Updating ultrasphinx index after save?](https://www.ruby-forum.com/t/updating-ultrasphinx-index-after-save/149520)

<div class="topic-metadata">

**Author:** [@temesta](https://www.ruby-forum.com/u/temesta)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/updating-ultrasphinx-index-after-save/149520 "2008-09-25T19:11:18Z")

</div>

Hi, I’m trying out Ultrasphinx instead of ferret. Unfortunately it seems not to be possible to update the index (in an efficient way) after creating or updating a record. I managed to run the update index rake task, b…

---

## [Md5 User Registration Form](https://www.ruby-forum.com/t/md5-user-registration-form/149430)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 1\
**Last updated:** [September 25, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/md5-user-registration-form/149430 "2008-09-25T18:59:05Z")

</div>

Hi I have this tiny problem with the syntax. I want a registration post form which sends and saves the passwort with an MD5 crypt. So this is the part of the form: \<%= f.password\_field :password %\> and this is the …

---

## [Find\_by\_sql suggestions needed](https://www.ruby-forum.com/t/find-by-sql-suggestions-needed/149518)

<div class="topic-metadata">

**Author:** [@cnjohnson](https://www.ruby-forum.com/u/cnjohnson)\
**Replies:** 0\
**Last updated:** [September 25, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/find-by-sql-suggestions-needed/149518 "2008-09-25T18:23:39Z")

</div>

I have an application that generates an ever growing list of stock reports. I find myself some method in a controller creating a connection to the database (postgres in this case), executing a custom sql, using the da…

---

## [Modifying existing model with migrations](https://www.ruby-forum.com/t/modifying-existing-model-with-migrations/149474)

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 4\
**Last updated:** [September 25, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/modifying-existing-model-with-migrations/149474 "2008-09-25T16:23:39Z")

</div>

I’m having trouble modifying an existng database. My initial command to create was: ruby script/generate model Album title:string picture:string description:string price:float itemType:string Being that I forgot to p…

---

## [Fat Model Thin Controller](https://www.ruby-forum.com/t/fat-model-thin-controller/149491)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 6\
**Last updated:** [September 25, 2008, 4:02pm UTC](https://www.ruby-forum.com/t/fat-model-thin-controller/149491 "2008-09-25T16:02:35Z")

</div>

I’m trying to follow Fat Model Thin Controller, and generally just do things right as much as possible and need some help at this early stage of development. I have some users (courtesy of restful\_authentication). Iâ…

---

## [Subdomains](https://www.ruby-forum.com/t/subdomains/149472)

<div class="topic-metadata">

**Author:** [@Sav](https://www.ruby-forum.com/u/Sav)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 3:54pm UTC](https://www.ruby-forum.com/t/subdomains/149472 "2008-09-25T15:54:45Z")

</div>

I’ve got a working app at mysite.com and trying to add iphone.mysite.com - problem is that I get the classic “Application error - Rails application failed to start properly” and I don’t see anything new in while taili…

---

## [Save blob to file?](https://www.ruby-forum.com/t/save-blob-to-file/145855)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 8\
**Last updated:** [September 25, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/save-blob-to-file/145855 "2008-09-25T15:41:10Z")

</div>

hope someone can help with this, in my mysql table i’ve got a blob column storing images inside the database, it’s also got the filetype and filesize. now i can work out what the filename will be (e.g. 2002.jpg) but i…

---

## [Help regarding sending email](https://www.ruby-forum.com/t/help-regarding-sending-email/149350)

<div class="topic-metadata">

**Author:** [@sreeprasad](https://www.ruby-forum.com/u/sreeprasad)\
**Replies:** 9\
**Last updated:** [September 25, 2008, 3:38pm UTC](https://www.ruby-forum.com/t/help-regarding-sending-email/149350 "2008-09-25T15:38:13Z")

</div>

I have rails space application running on my local. I have issues in sending emails on my application. I have configured my environment.rb as follows : config.action\_mailer.raise\_delivery\_errors = true config.action\_…

---

## [Auto refresh field](https://www.ruby-forum.com/t/auto-refresh-field/149384)

<div class="topic-metadata">

**Author:** [@Alex2101](https://www.ruby-forum.com/u/Alex2101)\
**Replies:** 5\
**Last updated:** [September 25, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/auto-refresh-field/149384 "2008-09-25T15:11:47Z")

</div>

Hi, I would to know if it is possible to automaticly refresh some particular field ? Clearly, I have a model called “productions” with fileds “name” and “numbers”. Another application update fields “numbers” of the …

---

## [Calling action on OnClick event of a div](https://www.ruby-forum.com/t/calling-action-on-onclick-event-of-a-div/149501)

<div class="topic-metadata">

**Author:** [@Jaikishan\_J](https://www.ruby-forum.com/u/Jaikishan_J)\
**Replies:** 0\
**Last updated:** [September 25, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/calling-action-on-onclick-event-of-a-div/149501 "2008-09-25T14:25:10Z")

</div>

I was wondering how can I call an action of a particular controller when a person clicks on a particular div. Any related pointers? – Thanks, Jaikishan

---

## [New to Programming - question on](https://www.ruby-forum.com/t/new-to-programming-question-on/149469)

<div class="topic-metadata">

**Author:** [@closedbook](https://www.ruby-forum.com/u/closedbook)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/new-to-programming-question-on/149469 "2008-09-25T14:10:36Z")

</div>

Hi All, I’m very new to programming, so please don’t flame me for asking a potentially easy question. Google hasn’t been good to me, so I thought I’d ask here. What got me into RoR and into programming in general is …

---

## [Join different querys in the same object](https://www.ruby-forum.com/t/join-different-querys-in-the-same-object/149498)

<div class="topic-metadata">

**Author:** [@dazuma](https://www.ruby-forum.com/u/dazuma)\
**Replies:** 0\
**Last updated:** [September 25, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/join-different-querys-in-the-same-object/149498 "2008-09-25T13:42:40Z")

</div>

Hi, I’m new in Ruby on Rails and I don’t know how can I achive something like this: @switchs = Switch.find(:all) for switch in @switchs if current\_user.shifts.count(:all,:conditions=\>\[“date = ? and shift = ?”,switch…

---

## [Problem with ar\_mailer](https://www.ruby-forum.com/t/problem-with-ar-mailer/149494)

<div class="topic-metadata">

**Author:** [@shaggyrd](https://www.ruby-forum.com/u/shaggyrd)\
**Replies:** 0\
**Last updated:** [September 25, 2008, 12:34pm UTC](https://www.ruby-forum.com/t/problem-with-ar-mailer/149494 "2008-09-25T12:34:33Z")

</div>

Hi guys, I’m running a strange problem sending emails. Basicly I’m getting this exception: ArgumentError (wrong number of arguments (1 for 0)): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active\_record/ base.r…

---

## [GRANT: help me!](https://www.ruby-forum.com/t/grant-help-me/149434)

<div class="topic-metadata">

**Author:** [@zarabadoo](https://www.ruby-forum.com/u/zarabadoo)\
**Replies:** 8\
**Last updated:** [September 25, 2008, 12:28pm UTC](https://www.ruby-forum.com/t/grant-help-me/149434 "2008-09-25T12:28:47Z")

</div>

I have a database with grants commands setted (for admin, user, …). How can I connect each users with database (according with db rules) in rails? When rails application start it is connected according database.yml… …

---

## [Using variables in dynamic finds](https://www.ruby-forum.com/t/using-variables-in-dynamic-finds/149381)

<div class="topic-metadata">

**Author:** [@GearSSS\_id\_OSCealla](https://www.ruby-forum.com/u/GearSSS_id_OSCealla)\
**Replies:** 10\
**Last updated:** [September 25, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/using-variables-in-dynamic-finds/149381 "2008-09-25T12:12:47Z")

</div>

Hi I’m trying to perform a simple find on a class but am having trouble implementing it. What I want to perform a dynamic find for each different user. The user’s location would be variable and I want to display all …

---

## [How to find records, placing conditions on joined table?](https://www.ruby-forum.com/t/how-to-find-records-placing-conditions-on-joined-table/149489)

<div class="topic-metadata">

**Author:** [@carminem](https://www.ruby-forum.com/u/carminem)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 11:41am UTC](https://www.ruby-forum.com/t/how-to-find-records-placing-conditions-on-joined-table/149489 "2008-09-25T11:41:06Z")

</div>

Hi to everyone, I have my User model which has\_many roles. Now, I’ve the need to find all users with certain roles. At first I thought of something like User.find(:all, :joins =\> :roles).select { |u| u.has\_role?(:adm…

---

## [Updated\_on broken](https://www.ruby-forum.com/t/updated-on-broken/149439)

<div class="topic-metadata">

**Author:** [@temesta](https://www.ruby-forum.com/u/temesta)\
**Replies:** 2\
**Last updated:** [September 25, 2008, 11:35am UTC](https://www.ruby-forum.com/t/updated-on-broken/149439 "2008-09-25T11:35:16Z")

</div>

Hi, I just noticed that updated\_on is not working anymore on any of my models. I don’t know what happened :frowning: . Hower, when I create a new record, created\_on is still working. Any ideas what could be the cause…

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

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