# Rails

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

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

---

## [Form\_for -\> put/post problem](https://www.ruby-forum.com/t/form-for-put-post-problem/149627)

<div class="topic-metadata">

**Author:** [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Replies:** 4\
**Last updated:** [October 2, 2008, 4:06am UTC](https://www.ruby-forum.com/t/form-for-put-post-problem/149627 "2008-10-02T04:06:13Z")

</div>

I am having trouble getting form\_for to use method :put for my edit view which has been driving me crazy. in the controller i have User.find, not User.new so i can’t figure out why this always generates a method post. …

---

## [Sub-layouts](https://www.ruby-forum.com/t/sub-layouts/149962)

<div class="topic-metadata">

**Author:** [@Garrett\_B](https://www.ruby-forum.com/u/Garrett_B)\
**Replies:** 3\
**Last updated:** [October 2, 2008, 3:20am UTC](https://www.ruby-forum.com/t/sub-layouts/149962 "2008-10-02T03:20:07Z")

</div>

I have a nice layout for my app, but for some actions I want to use a shared sub layout. Anyone have ideas what the best practice would be? I have a method that works, but I am not sure if it is the ‘rails way’ of d…

---

## [Statistics table via a trigger](https://www.ruby-forum.com/t/statistics-table-via-a-trigger/149916)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 7\
**Last updated:** [October 2, 2008, 2:45am UTC](https://www.ruby-forum.com/t/statistics-table-via-a-trigger/149916 "2008-10-02T02:45:39Z")

</div>

I’m trying to implement something similar to a historical price chart, where I save the prices when they change to a “stats” table. I’d like to take the current value and save it to a statistics model before it gets u…

---

## [How do you validate the availability for a "block of time"?](https://www.ruby-forum.com/t/how-do-you-validate-the-availability-for-a-block-of-time/149993)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 2:34am UTC](https://www.ruby-forum.com/t/how-do-you-validate-the-availability-for-a-block-of-time/149993 "2008-10-02T02:34:30Z")

</div>

I’m building an “appointment time” application, where the user selects an appointment time through a datetime\_select field. I’m trying to validate that the appointment time the user selects is available. The appointm…

---

## [Adding a table modifying the data I fetch](https://www.ruby-forum.com/t/adding-a-table-modifying-the-data-i-fetch/149991)

<div class="topic-metadata">

**Author:** [@Norm](https://www.ruby-forum.com/u/Norm)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 12:41am UTC](https://www.ruby-forum.com/t/adding-a-table-modifying-the-data-i-fetch/149991 "2008-10-02T00:41:39Z")

</div>

I have been writing software for a while but until now have managed to avoid almost any connection with sql and now I think I have a sql problem. I have written and released a FOSS Campground Reservation System (http…

---

## [Problems select list generated from tables](https://www.ruby-forum.com/t/problems-select-list-generated-from-tables/149990)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 12:36am UTC](https://www.ruby-forum.com/t/problems-select-list-generated-from-tables/149990 "2008-10-02T00:36:24Z")

</div>

I would like to generate a select list form multiple associations and I’m not being able to. Do not know what the problem is. Hope anyone can help. the code below gives me a: “You have a nil object when you didn’t …

---

## [Erb strangeness](https://www.ruby-forum.com/t/erb-strangeness/149973)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/erb-strangeness/149973 "2008-10-01T23:35:30Z")

</div>

I’m using a relatively simple erb to generate output. However, though it works, it also produces a lot of ‘false’ words in the output. This is easier shown than described. Here is the erb: Image Search page You can us…

---

## [How to install plugin](https://www.ruby-forum.com/t/how-to-install-plugin/149968)

<div class="topic-metadata">

**Author:** [@dharmendra](https://www.ruby-forum.com/u/dharmendra)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/how-to-install-plugin/149968 "2008-10-01T23:28:28Z")

</div>

hii I am new to rails.i am trying to install plugin in my application(OS- windows) using the command ruby script\\plugin install url i have try for 3-4 url but response only is url not find is their is other way to …

---

## [\[bug?\] rails form\_for](https://www.ruby-forum.com/t/bug-rails-form-for/149980)

<div class="topic-metadata">

**Author:** [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/bug-rails-form-for/149980 "2008-10-01T22:56:48Z")

</div>

i think there is a bug in how rails automatically detects if a form\_for should be a post or put when the controller is in a namespace. can someone confirm this, or am i doing something wrong? specs windows xp ruby 1.…

---

## [ActiveResource and InvalidAuthenticityToken exception](https://www.ruby-forum.com/t/activeresource-and-invalidauthenticitytoken-exception/149686)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/activeresource-and-invalidauthenticitytoken-exception/149686 "2008-10-01T21:50:17Z")

</div>

Hi, I have a Rails 2.1.1 web app, and a Rails 2.1.1 app acting as a client by using ActiveResource. From the client, I can find, create, and update resources owned by the web app. However, I can not delete any. Cal…

---

## [Ffmpeg audio not working](https://www.ruby-forum.com/t/ffmpeg-audio-not-working/149975)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/ffmpeg-audio-not-working/149975 "2008-10-01T21:38:05Z")

</div>

I’m converting videos to .flv but I can’t hear any sound. Is this ffmpeg command correct? ffmpeg -i #{path} -an -s 480x360 -vcodec flv -r 25 -qscale 8 -f flv -y #{flv} Thank you.

---

## [Rake db:migrate:down?](https://www.ruby-forum.com/t/rake-dbdown/149884)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/rake-dbdown/149884 "2008-10-01T21:14:29Z")

</div>

The behavior of rake db:migrate:down is a little bit unexpected (to me at least). If I do this: $ rake db:version Current version: 20080930121212 $ rake db:migrate:down VERSION=20080930121212 what happens is the sc…

---

## [Active record sum vs find](https://www.ruby-forum.com/t/active-record-sum-vs-find/149970)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/active-record-sum-vs-find/149970 "2008-10-01T21:08:01Z")

</div>

Hi, I’m a newbie, i’m trying to do something I think should be trival but havring great difficulty so any help appreciated. sum(amounts) group by director, risk output to be director, risk, amounts i’ve tried find wi…

---

## [Integration testing on AJAX functions](https://www.ruby-forum.com/t/integration-testing-on-ajax-functions/127478)

<div class="topic-metadata">

**Author:** [@jeremysdr](https://www.ruby-forum.com/u/jeremysdr)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/integration-testing-on-ajax-functions/127478 "2008-10-01T20:52:05Z")

</div>

Hi Everyone, Is there a way to include on integration testing the AJAX functions? How do you test an AJAX effects shown in the browser (i.e. auto-complete, Ajax.Updater etc.) Thanks!

---

## [Find with floats](https://www.ruby-forum.com/t/find-with-floats/149942)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 9\
**Last updated:** [October 1, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/find-with-floats/149942 "2008-10-01T20:30:07Z")

</div>

I can’t seem to seem to get this find condition to work properly. I have an object stored in @ip\_range, with a float-longitude: @ip\_range.lng =\> 11.967 I then want to match this longitude to a City: @city = Ci…

---

## [Klass is the Class of the model from a controller context?](https://www.ruby-forum.com/t/klass-is-the-class-of-the-model-from-a-controller-context/149964)

<div class="topic-metadata">

**Author:** [@brett](https://www.ruby-forum.com/u/brett)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/klass-is-the-class-of-the-model-from-a-controller-context/149964 "2008-10-01T20:01:30Z")

</div>

I was trying to figure out what klass is and I think I have it, just need someone to tell me if I have got it right.

---

## [Observe\_form question](https://www.ruby-forum.com/t/observe-form-question/149917)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 7\
**Last updated:** [October 1, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/observe-form-question/149917 "2008-10-01T19:56:47Z")

</div>

Ok in my view.rhtml: \<% form\_for :sale, :url =\> {:action =\> ‘add\_sale’, :id =\> @report}, :html =\> {:id =\> ‘sales\_form’} do |f| %\> … \<%= f.text\_field :unit\_price, :size =\> 10 %\> … \<% end %\> \<%= observe\_form( :sales…

---

## [Gem Update issues](https://www.ruby-forum.com/t/gem-update-issues/149130)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 12\
**Last updated:** [October 1, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/gem-update-issues/149130 "2008-10-01T19:16:58Z")

</div>

O.k., I’m running an XP SP3 box and have installed ruby 186-26 and gems 1.1.1 (Had to ditch 1.2, because I kept getting errors with it) Anyways, funny story goes like this: I can’t do this: C:\\WebSite\\N2N\>gem update …

---

## [Rspec and restful\_authentication](https://www.ruby-forum.com/t/rspec-and-restful-authentication/149961)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 6:39pm UTC](https://www.ruby-forum.com/t/rspec-and-restful-authentication/149961 "2008-10-01T18:39:50Z")

</div>

Hi all, I’m starting to use the restful\_authenticaiton plugin in a project, and am using Rspec to write tests. The problem I’m having is that most of the app has requires that the user be logged in – i.e.,: before\_f…

---

## [Rails 2.0 Email (ActionMailer) Example](https://www.ruby-forum.com/t/rails-2-0-email-actionmailer-example/149851)

<div class="topic-metadata">

**Author:** [@carlskii](https://www.ruby-forum.com/u/carlskii)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 5:57pm UTC](https://www.ruby-forum.com/t/rails-2-0-email-actionmailer-example/149851 "2008-10-01T17:57:35Z")

</div>

Hi, Does anybody have a simple Rails 2.1 working example of creating an email from a simple Web form and sending it via ActionMailer? Most of the examples I’ve found so far all seem to be Rails 1.x based and don’t wo…

---

## [Multiple Forms One Model](https://www.ruby-forum.com/t/multiple-forms-one-model/149955)

<div class="topic-metadata">

**Author:** [@soderic](https://www.ruby-forum.com/u/soderic)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/multiple-forms-one-model/149955 "2008-10-01T17:20:33Z")

</div>

I have the following scenario and am trying to find the best way to accomplish it. Model: I have an Order model which accepts a customers billing & shipping address, order info and order item details. Controller: I…

---

## [How to generate DOC files in Rails](https://www.ruby-forum.com/t/how-to-generate-doc-files-in-rails/149940)

<div class="topic-metadata">

**Author:** [@rorchild](https://www.ruby-forum.com/u/rorchild)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 2:05pm UTC](https://www.ruby-forum.com/t/how-to-generate-doc-files-in-rails/149940 "2008-10-01T14:05:11Z")

</div>

Hi All, How to generate DOC files in Rails like CSV. is there any plugin , please advise me. Thanks in Advance.

---

## [Odbc data source name not found](https://www.ruby-forum.com/t/odbc-data-source-name-not-found/149941)

<div class="topic-metadata">

**Author:** [@linus](https://www.ruby-forum.com/u/linus)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/odbc-data-source-name-not-found/149941 "2008-10-01T12:27:30Z")

</div>

Hi, I have been trying to get MSSQL working on mac, but it apears that my iodbc setup is broken: tomasz-baks-imac:~ tb$ iodbctest “dsn=wcompany\_odbc;uid=thesystem\_test;pwd=thesystem\_test” iODBC Demonstration program …

---

## [Badly formatted E-Mail with ActionMailer](https://www.ruby-forum.com/t/badly-formatted-e-mail-with-actionmailer/149855)

<div class="topic-metadata">

**Author:** [@overbryd](https://www.ruby-forum.com/u/overbryd)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 10:58am UTC](https://www.ruby-forum.com/t/badly-formatted-e-mail-with-actionmailer/149855 "2008-10-01T10:58:05Z")

</div>

Hello, I’ve setup up Mailing on my Rails app. The setup uses smtp with (tested) correct settings. But all the mails sent through UserMailer have no subject and look like this: (Begin) #Debian-40-etch-64-minimal.tma…

---

## [JSON + Rails + Javascript](https://www.ruby-forum.com/t/json-rails-javascript/149914)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 10:02am UTC](https://www.ruby-forum.com/t/json-rails-javascript/149914 "2008-10-01T10:02:59Z")

</div>

Hello Experts, When i try to use json converstion for Array it works perfectly in local machine, But when i deployed to server it says this error message which i detected on firebug I’ve two datas on DB Model - Cod…

---

## [What is :chained\_replace\_html?](https://www.ruby-forum.com/t/what-is-chained-replace-html/149772)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 9:53am UTC](https://www.ruby-forum.com/t/what-is-chained-replace-html/149772 "2008-10-01T09:53:37Z")

</div>

I’m testing an XHR, and until I discovered :chained\_replace\_html , the test wasn’t seeing that a was being hidden. === map\_filter.rjs 22 page\[‘map-filter-errors’\].hide Why does line 433 above fail?: === neighbourh…

---

## [Prioritizing Mailer Queue / Action Mailer](https://www.ruby-forum.com/t/prioritizing-mailer-queue-action-mailer/148106)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 6\
**Last updated:** [October 1, 2008, 9:44am UTC](https://www.ruby-forum.com/t/prioritizing-mailer-queue-action-mailer/148106 "2008-10-01T09:44:53Z")

</div>

Hi, I have different kinds of mails going out. For eg: signup notification mails etc I am using mailer queue to avoid mongrels waiting on email to be sent. However, it makes sense to have signup mails go instantane…

---

## [Printing in rails](https://www.ruby-forum.com/t/printing-in-rails/149926)

<div class="topic-metadata">

**Author:** [@Jaikishan\_J](https://www.ruby-forum.com/u/Jaikishan_J)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 9:37am UTC](https://www.ruby-forum.com/t/printing-in-rails/149926 "2008-10-01T09:37:12Z")

</div>

Hello, Could anyone point me to some tutorial/example which speaks about how to print some data (basically a HTML table filled with data) ? Here print means printing on a paper with printer:). – Thanks, Jaikishan

---

## [How to set utc](https://www.ruby-forum.com/t/how-to-set-utc/149925)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 8:42am UTC](https://www.ruby-forum.com/t/how-to-set-utc/149925 "2008-10-01T08:42:28Z")

</div>

I am showing time according to user’s timezone. but while saving i saved as it is. but it always show me one hour late. Anybody know how to set UTC to correct time. I think this problem with adjust method in Time clas…

---

## [RJS and :visual\_effect](https://www.ruby-forum.com/t/rjs-and-visual-effect/149119)

<div class="topic-metadata">

**Author:** [@rvork](https://www.ruby-forum.com/u/rvork)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 7:30am UTC](https://www.ruby-forum.com/t/rjs-and-visual-effect/149119 "2008-10-01T07:30:09Z")

</div>

Hi everyone, I’m working with rails 2.1.1 and i’m in trouble with the scriptaculous helper. I have something like : \<%= link\_to\_function “Details” do |page| page\[‘toto’\].visual\_effect(:toggle\_blind) end %\> …

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

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