# Rails

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

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

---

## [ActiveRecord::MultiparameterAssignmentErrors](https://www.ruby-forum.com/t/activerecord-multiparameterassignmenterrors/142396)

<div class="topic-metadata">

**Author:** [@thor](https://www.ruby-forum.com/u/thor)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 9:19am UTC](https://www.ruby-forum.com/t/activerecord-multiparameterassignmenterrors/142396 "2008-07-08T09:19:24Z")

</div>

I am using time\_select helper on a form but when submitted I get: ActiveRecord::MultiparameterAssignmentErrors I tried a technique found on a website where you remove the offending parameters that are part of the erro…

---

## [Unlink file](https://www.ruby-forum.com/t/unlink-file/142456)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 8:27am UTC](https://www.ruby-forum.com/t/unlink-file/142456 "2008-07-08T08:27:05Z")

</div>

i ve done image/file upload in database as well as in image/file folder…& i can able to update the existing files/images in database …but i cant able to unlink the old files/images in folder whilke update…pls help me…

---

## [Linkt\_to problems](https://www.ruby-forum.com/t/linkt-to-problems/142211)

<div class="topic-metadata">

**Author:** [@viliwort](https://www.ruby-forum.com/u/viliwort)\
**Replies:** 3\
**Last updated:** [July 8, 2008, 8:19am UTC](https://www.ruby-forum.com/t/linkt-to-problems/142211 "2008-07-08T08:19:03Z")

</div>

I can’t explain where those differences come from. In one Project I can use the link\_to without any problems. Like this: \<%= link\_to “LINKNAME”, :action =\> “destroy”, :id =\> ID %\> But in another project… That happens …

---

## [Looking for a framework to report user feedback and form errors](https://www.ruby-forum.com/t/looking-for-a-framework-to-report-user-feedback-and-form-errors/142462)

<div class="topic-metadata">

**Author:** [@nahabed](https://www.ruby-forum.com/u/nahabed)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 8:13am UTC](https://www.ruby-forum.com/t/looking-for-a-framework-to-report-user-feedback-and-form-errors/142462 "2008-07-08T08:13:57Z")

</div>

We’re building our first Rails app and looking for a consistent way to provide feedback messages; things like success messages like “your password changed successfully” or form errors with the form field highlighted i…

---

## [\[ANN\]\[ADV\] Ruby Hoedown 2008 - Hotel information, group/student discounts, and more!](https://www.ruby-forum.com/t/ann-adv-ruby-hoedown-2008-hotel-information-group-student-discounts-and-more/142460)

<div class="topic-metadata">

**Author:** [@Jeremy\_McAnally](https://www.ruby-forum.com/u/Jeremy_McAnally)\
**Replies:** 0\
**Last updated:** [July 8, 2008, 7:03am UTC](https://www.ruby-forum.com/t/ann-adv-ruby-hoedown-2008-hotel-information-group-student-discounts-and-more/142460 "2008-07-08T07:03:17Z")

</div>

Hello all, The Ruby Hoedown (the southeastern regional Ruby conference, sponsored by Engine Y. and Hashrocket) is just over a month away, and we have a few things to announce today. First of all, due to popular deman…

---

## [Shear my yak? (deeper debugging)](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453)

<div class="topic-metadata">

**Author:** [@tshim](https://www.ruby-forum.com/u/tshim)\
**Replies:** 6\
**Last updated:** [July 8, 2008, 6:07am UTC](https://www.ruby-forum.com/t/shear-my-yak-deeper-debugging/142453 "2008-07-08T06:07:46Z")

</div>

Word up and thanks to those that continue to contribute positively to the group. I am about to lop off my left nut to get to the bottom of a strange behavior I’m witnessing. Rails somehow can’t find an action name ca…

---

## [Why the app does not use the cached page](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450)

<div class="topic-metadata">

**Author:** [@sixfooter](https://www.ruby-forum.com/u/sixfooter)\
**Replies:** 3\
**Last updated:** [July 8, 2008, 5:29am UTC](https://www.ruby-forum.com/t/why-the-app-does-not-use-the-cached-page/142450 "2008-07-08T05:29:23Z")

</div>

I am working on a rails project based on rails 1.2.3 I write the routes.rb like this map.connect ‘’, :controller =\> “welcome”, :action =\> ‘index’ and I also set the caches\_page for welcome/index The cache page works …

---

## [Changing date format of an object](https://www.ruby-forum.com/t/changing-date-format-of-an-object/142442)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 2:59am UTC](https://www.ruby-forum.com/t/changing-date-format-of-an-object/142442 "2008-07-08T02:59:28Z")

</div>

I have an object that holds the date in the form of “Tue Jul 08 14:18:00-0700 2008” and I want to only display the time in the format of 6:00-8:00 or just 6:00. The controller looks like this: def show @events = Eve…

---

## [RSpec - Having trouble mocking model associations](https://www.ruby-forum.com/t/rspec-having-trouble-mocking-model-associations/142449)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 0\
**Last updated:** [July 8, 2008, 2:57am UTC](https://www.ruby-forum.com/t/rspec-having-trouble-mocking-model-associations/142449 "2008-07-08T02:57:43Z")

</div>

Hi everyone, I’m having a devil of a time trying to figure out why this spec keeps giving me an error. I’m attempting to mock out a class I haven’t created yet (User) so I don’t need to worry about creating it at th…

---

## [Non model cascading selects](https://www.ruby-forum.com/t/non-model-cascading-selects/142398)

<div class="topic-metadata">

**Author:** [@thor](https://www.ruby-forum.com/u/thor)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 1:14am UTC](https://www.ruby-forum.com/t/non-model-cascading-selects/142398 "2008-07-08T01:14:12Z")

</div>

In my model I have a city\_id. ON the form I am using a cascading select to select the state, which then does a remote\_submit to get the list of cities (and hence the city\_id) for the selected state. The problem that …

---

## [Rails 'rake gems:install' error in windows](https://www.ruby-forum.com/t/rails-rake-gems-install-error-in-windows/141279)

<div class="topic-metadata">

**Author:** [@neocoin](https://www.ruby-forum.com/u/neocoin)\
**Replies:** 1\
**Last updated:** [July 8, 2008, 12:37am UTC](https://www.ruby-forum.com/t/rails-rake-gems-install-error-in-windows/141279 "2008-07-08T00:37:40Z")

</div>

I am developing with rails at three platform mac, windows, linux. until Rails 2.1, we can describe gem dependencies in environment.rb. ( this one ~ http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem…

---

## [Prototype \> jQuery](https://www.ruby-forum.com/t/prototype-jquery/142413)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 2\
**Last updated:** [July 8, 2008, 12:19am UTC](https://www.ruby-forum.com/t/prototype-jquery/142413 "2008-07-08T00:19:49Z")

</div>

I use porototype to update page by form: \<%= observe\_form(:search\_form, :frequency =\> 1, :update =\> :search\_hits, :loading =\> “Element.show(‘spinner’)”, :complete =\> “Element.hide(‘spinner’)”, :url =\> { :action =\> …

---

## [Accessing a model from controller not working](https://www.ruby-forum.com/t/accessing-a-model-from-controller-not-working/142431)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 3\
**Last updated:** [July 8, 2008, 12:12am UTC](https://www.ruby-forum.com/t/accessing-a-model-from-controller-not-working/142431 "2008-07-08T00:12:59Z")

</div>

Hi could someone please put me right. I am not having any success at accessing my model from a controller.Please look at the code: Model: class Region \< ActiveRecord::Base def self.get\_region\_code(region) find\_by\_re…

---

## [2 questions: crash log and sessions](https://www.ruby-forum.com/t/2-questions-crash-log-and-sessions/142428)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 11:14pm UTC](https://www.ruby-forum.com/t/2-questions-crash-log-and-sessions/142428 "2008-07-07T23:14:17Z")

</div>

Hi, I have two questions that I wanted to ask for your assistance: Q1. When looking at fastcgi.crash.log I keep seeing the following: \[07/Jul/2008:03:56:25 :: 20413\] asked to terminate immediately \[07/Jul/2008:03:56:2…

---

## [Validates\_..., :unless not working for me (rails 1.2.6)](https://www.ruby-forum.com/t/validates-unless-not-working-for-me-rails-1-2-6/142350)

<div class="topic-metadata">

**Author:** [@costi](https://www.ruby-forum.com/u/costi)\
**Replies:** 5\
**Last updated:** [July 7, 2008, 11:08pm UTC](https://www.ruby-forum.com/t/validates-unless-not-working-for-me-rails-1-2-6/142350 "2008-07-07T23:08:28Z")

</div>

class PayableInvoice \< Invoice validates\_presence\_of :number, :unless =\> :importing attr\_accessor :importing def after\_create update\_attribute(:number, id) if importing end end p = PayableInvoice.new(:importing …

---

## [MiniMagick, and processing thumbnails](https://www.ruby-forum.com/t/minimagick-and-processing-thumbnails/142343)

<div class="topic-metadata">

**Author:** [@KenM](https://www.ruby-forum.com/u/KenM)\
**Replies:** 6\
**Last updated:** [July 7, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/minimagick-and-processing-thumbnails/142343 "2008-07-07T22:57:55Z")

</div>

I have a requirement that can’t be that outrageous… I want to be able to upload an image, and have multiple thumbnails be created for each. Then, I want to post process each image (the main image plus the thumbnails)…

---

## [Accessing owner object within composed\_of block](https://www.ruby-forum.com/t/accessing-owner-object-within-composed-of-block/142430)

<div class="topic-metadata">

**Author:** [@Eric\_LIn](https://www.ruby-forum.com/u/Eric_LIn)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/accessing-owner-object-within-composed-of-block/142430 "2008-07-07T22:39:10Z")

</div>

Hi All, In my Account model I have a composed\_of declaration like this: class Account composed\_of :balance, … do |value| Money.new(value, ‘USD’) end end I would like to modify this so instead of always creating a …

---

## [Getting access to route-generating helpers from a migration](https://www.ruby-forum.com/t/getting-access-to-route-generating-helpers-from-a-migration/142426)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/getting-access-to-route-generating-helpers-from-a-migration/142426 "2008-07-07T22:27:54Z")

</div>

Is there any way to get access to a RESTful named route helper from a migration. I’d like to place URLs generated from these routes into a DB table and wanted to manage the static data by using a migration. So I’d li…

---

## [How to redirect back from action called from multiple controllers?](https://www.ruby-forum.com/t/how-to-redirect-back-from-action-called-from-multiple-controllers/142420)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/how-to-redirect-back-from-action-called-from-multiple-controllers/142420 "2008-07-07T21:29:33Z")

</div>

Hi, I’ve got a model i.e. Ticket, which has it’s own edit page. There’s also i.e. Report controller which has a view where I can edit i.e. one field of Ticket and Project controller where I can edit other field of Ti…

---

## [How to make WHERE foo\_id IN () query?](https://www.ruby-forum.com/t/how-to-make-where-foo-id-in-query/142215)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/how-to-make-where-foo-id-in-query/142215 "2008-07-07T21:09:03Z")

</div>

Hi, There are 3 models: A has\_many :Cs B has\_many :Cs C belongs\_to A and B I got a single object of A and an array of B objects. How can I get all Cs that have a\_id equal to object A.id and b\_id that belongs to an…

---

## [About find the newly created users](https://www.ruby-forum.com/t/about-find-the-newly-created-users/142402)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 8:41pm UTC](https://www.ruby-forum.com/t/about-find-the-newly-created-users/142402 "2008-07-07T20:41:00Z")

</div>

hello: How do i find the newly created 10 users in the database?Now i only know the way: 1.users=User.find(:all,:order=\>“created\_at DESC,id”) 2.then get the first 10 users from the array I think this way is not the …

---

## [Problem with two foreign keys](https://www.ruby-forum.com/t/problem-with-two-foreign-keys/142344)

<div class="topic-metadata">

**Author:** [@skaverat](https://www.ruby-forum.com/u/skaverat)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 7:03pm UTC](https://www.ruby-forum.com/t/problem-with-two-foreign-keys/142344 "2008-07-07T19:03:06Z")

</div>

so, I’m using following schema: #Users# id nick #Messages# id from\_user\_id to\_user\_id subject message #user.rb has\_many :messages #message.rb belongs\_to :to\_user, :class\_name =\> “User” belongs\_to :from\_user…

---

## [Cmbinations in Array](https://www.ruby-forum.com/t/cmbinations-in-array/142346)

<div class="topic-metadata">

**Author:** [@ganana\_srishti](https://www.ruby-forum.com/u/ganana_srishti)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 6:27pm UTC](https://www.ruby-forum.com/t/cmbinations-in-array/142346 "2008-07-07T18:27:07Z")

</div>

Hi, I want to find the combination of array elements like for example a = \[1,2,3,4\] the combinations are \[1,2,3,4\] \[1,3,4,2\] \[1,2,3\] etc… If anybody knows plz reply me

---

## [Link\_to\_remote multiple :with =\>](https://www.ruby-forum.com/t/link-to-remote-multiple-with/142403)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/link-to-remote-multiple-with/142403 "2008-07-07T17:44:07Z")

</div>

i have a link to remote and i need to pass two values provided by select boxes to it, a language, and a page count (hits per page to be paginated) how do i get the code below to send both arguments?? \<%= link\_to\_remot…

---

## [About find the newly created 10 users](https://www.ruby-forum.com/t/about-find-the-newly-created-10-users/196737)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/about-find-the-newly-created-10-users/196737 "2008-07-07T17:40:35Z")

</div>

hello: How do i find the newly created 10 users in the database?Now i only know the way: 1.users=User.find(:all,:order=\>“created\_at DESC,id”) 2.then get the first 10 users from the array I think this way is not the …

---

## [Off topic advice about Database Administration](https://www.ruby-forum.com/t/off-topic-advice-about-database-administration/142339)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 5\
**Last updated:** [July 7, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/off-topic-advice-about-database-administration/142339 "2008-07-07T16:49:29Z")

</div>

Can anyone give me advice on which certification is more important in the marketplace–MySQL DBA or Microsoft’s DBA? I’d prefer MySQL just because I use that with more with Rails and Microsoft’s certification seems to…

---

## [Has\_one and has\_many creation inconsistencies](https://www.ruby-forum.com/t/has-one-and-has-many-creation-inconsistencies/142395)

<div class="topic-metadata">

**Author:** [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Replies:** 5\
**Last updated:** [July 7, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/has-one-and-has-many-creation-inconsistencies/142395 "2008-07-07T16:14:19Z")

</div>

So, imagine the following: class User \< ActiveRecord::Base has\_many :emails has\_one :address end class Email \< ActiveRecord::Base belongs\_to :user end class Address \< ActiveRecord::Base belongs\_to :user end No…

---

## [Json.erb views and strange caching](https://www.ruby-forum.com/t/json-erb-views-and-strange-caching/142397)

<div class="topic-metadata">

**Author:** [@DEfusion](https://www.ruby-forum.com/u/DEfusion)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 3:34pm UTC](https://www.ruby-forum.com/t/json-erb-views-and-strange-caching/142397 "2008-07-07T15:34:59Z")

</div>

I’m responding in JSON in quite a lot of places within my application and as I’m doing quite a bit of work (e.g. defining which relationships to return and which fields etc.) within my to\_json() calls I decided to mov…

---

## [Params hash inside \<script\> tag](https://www.ruby-forum.com/t/params-hash-inside-script-tag/142377)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 6\
**Last updated:** [July 7, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/params-hash-inside-script-tag/142377 "2008-07-07T15:25:36Z")

</div>

Hi i need my params to use inside a tag in the same .rhtml file. how do i access this. Anyone please…? Thanks -Sadeesh.

---

## [Uploading File to Web Service](https://www.ruby-forum.com/t/uploading-file-to-web-service/142392)

<div class="topic-metadata">

**Author:** [@paerez](https://www.ruby-forum.com/u/paerez)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 3:12pm UTC](https://www.ruby-forum.com/t/uploading-file-to-web-service/142392 "2008-07-07T15:12:41Z")

</div>

Hey Guys, I created a web site where I could upload videos, it’s built using RoR and RESTful urls. Videos#create lets me upload videos. Next, I created another app, which using activeresource to interact with the fir…

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

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