# Rails

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

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

---

## [Will\_paginate urls and AJAX calls](https://www.ruby-forum.com/t/will-paginate-urls-and-ajax-calls/166756)

<div class="topic-metadata">

**Author:** [@trev](https://www.ruby-forum.com/u/trev)\
**Replies:** 1\
**Last updated:** [April 29, 2009, 12:30pm UTC](https://www.ruby-forum.com/t/will-paginate-urls-and-ajax-calls/166756 "2009-04-29T12:30:09Z")

</div>

I am using will\_paginate to paginate my site. I also have a link\_to\_remote in my view that will toggle view modes (from list to icon view). My will\_paginate code works fine until I click on my link\_to\_remote. At that …

---

## [Send some text as a csv file?](https://www.ruby-forum.com/t/send-some-text-as-a-csv-file/166770)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [April 29, 2009, 12:28pm UTC](https://www.ruby-forum.com/t/send-some-text-as-a-csv-file/166770 "2009-04-29T12:28:06Z")

</div>

I have a table on a page, and i want a link to download the table data as a csv. One way to do this would be to have my model class build a file, and pass the filename back to the controller, which uses send\_file to …

---

## [Driving me nuts! - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)](https://www.ruby-forum.com/t/driving-me-nuts-cant-connect-to-local-mysql-server-through-socket-tmp-mysql-sock-2/166753)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 29, 2009, 11:49am UTC](https://www.ruby-forum.com/t/driving-me-nuts-cant-connect-to-local-mysql-server-through-socket-tmp-mysql-sock-2/166753 "2009-04-29T11:49:27Z")

</div>

I had to put a new HD in, and now I’m reinstalling everything, and can’t get mysql to fully work. I can’t remember how I fixed it. I’ve searched everywhere online and can’t find anything. when I try to use the \>mysql …

---

## [HTMLDOC Table header row(s) to repeat on subsequent pages](https://www.ruby-forum.com/t/htmldoc-table-header-row-s-to-repeat-on-subsequent-pages/166769)

<div class="topic-metadata">

**Author:** [@dhanuja](https://www.ruby-forum.com/u/dhanuja)\
**Replies:** 0\
**Last updated:** [April 29, 2009, 11:37am UTC](https://www.ruby-forum.com/t/htmldoc-table-header-row-s-to-repeat-on-subsequent-pages/166769 "2009-04-29T11:37:42Z")

</div>

Hello, I need to display table headers on each page in the pdf generated using HTMLDOC. For example, my table contains header as Name, Address, Age. It is displayed in first page. When the content of the table extend…

---

## [Creating xml in controller and send to Web Service](https://www.ruby-forum.com/t/creating-xml-in-controller-and-send-to-web-service/166765)

<div class="topic-metadata">

**Author:** [@bhargavi](https://www.ruby-forum.com/u/bhargavi)\
**Replies:** 0\
**Last updated:** [April 29, 2009, 10:56am UTC](https://www.ruby-forum.com/t/creating-xml-in-controller-and-send-to-web-service/166765 "2009-04-29T10:56:27Z")

</div>

Hi All, I have a question regarding creating xml in controller class… I am designing a rails application, which is a client for java REST based Web services. in my rails client part, in my view, I have a simple index…

---

## [How to integration test forms with multiple models](https://www.ruby-forum.com/t/how-to-integration-test-forms-with-multiple-models/166567)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 1\
**Last updated:** [April 29, 2009, 8:54am UTC](https://www.ruby-forum.com/t/how-to-integration-test-forms-with-multiple-models/166567 "2009-04-29T08:54:00Z")

</div>

Hi. I try to create an integration test for a form that updates two models (order and floorplan), Creating a functional test for this situation works fine, however I cannot build an equivalent integration test. My ma…

---

## [Polymorphic comments table needs associated model](https://www.ruby-forum.com/t/polymorphic-comments-table-needs-associated-model/166748)

<div class="topic-metadata">

**Author:** [@jackson](https://www.ruby-forum.com/u/jackson)\
**Replies:** 0\
**Last updated:** [April 29, 2009, 7:00am UTC](https://www.ruby-forum.com/t/polymorphic-comments-table-needs-associated-model/166748 "2009-04-29T07:00:00Z")

</div>

Howdy, I’ve been banging my head on this problem for a bit. I’m using the acts\_as\_commentable plugin which works great. The scenario, I’m on the user’s dashboard and want to display comments with commentable\_type = V…

---

## [Controller access to POST Data in bulk?](https://www.ruby-forum.com/t/controller-access-to-post-data-in-bulk/166742)

<div class="topic-metadata">

**Author:** [@scafativ](https://www.ruby-forum.com/u/scafativ)\
**Replies:** 4\
**Last updated:** [April 29, 2009, 6:25am UTC](https://www.ruby-forum.com/t/controller-access-to-post-data-in-bulk/166742 "2009-04-29T06:25:35Z")

</div>

Hi, Ruby N. here, with a question. I’ve written rails web app, and I’d like to have the controller log the post data into the info log to keep track of how users are using my app. Is there a way to reference all of …

---

## [Custom error message](https://www.ruby-forum.com/t/custom-error-message/166687)

<div class="topic-metadata">

**Author:** [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Replies:** 2\
**Last updated:** [April 29, 2009, 6:23am UTC](https://www.ruby-forum.com/t/custom-error-message/166687 "2009-04-29T06:23:06Z")

</div>

Hello, How to get error page redirection when i am get rails conventional exception . Say like, i have error in my controller and rails will give me exception and will render me error page but i want custom error pag…

---

## [How do you make associations when a table has two unique columns?](https://www.ruby-forum.com/t/how-do-you-make-associations-when-a-table-has-two-unique-columns/166731)

<div class="topic-metadata">

**Author:** [@blgroup](https://www.ruby-forum.com/u/blgroup)\
**Replies:** 1\
**Last updated:** [April 29, 2009, 5:16am UTC](https://www.ruby-forum.com/t/how-do-you-make-associations-when-a-table-has-two-unique-columns/166731 "2009-04-29T05:16:59Z")

</div>

Having trouble with a somewhat unconventional modelling in Rails 2.2.2. Take three table. User model with primary integer id and a unique string guid. Model X has foreign key to User as integer user\_id and its mo…

---

## [Nested routes without id](https://www.ruby-forum.com/t/nested-routes-without-id/166738)

<div class="topic-metadata">

**Author:** [@shardul](https://www.ruby-forum.com/u/shardul)\
**Replies:** 1\
**Last updated:** [April 29, 2009, 4:27am UTC](https://www.ruby-forum.com/t/nested-routes-without-id/166738 "2009-04-29T04:27:16Z")

</div>

hi there, I am trying to create nested routes i have controller explores without model. (i.e this controller dont have model) And then there are other two. so i am trying to create routes like this . map.resources …

---

## [Updating parent resource whenever child is updated](https://www.ruby-forum.com/t/updating-parent-resource-whenever-child-is-updated/166732)

<div class="topic-metadata">

**Author:** [@neubyr](https://www.ruby-forum.com/u/neubyr)\
**Replies:** 6\
**Last updated:** [April 29, 2009, 4:23am UTC](https://www.ruby-forum.com/t/updating-parent-resource-whenever-child-is-updated/166732 "2009-04-29T04:23:03Z")

</div>

I have nested resources as follows: ‘albums has\_many photos’. Whenever someone edits photos, I would like update time stamp on albums. I tried to do this like: @photos.albums.updated\_by = @currentusername @photos.alb…

---

## [Action Mailer does not raise exceptions with Rails 2.3.2](https://www.ruby-forum.com/t/action-mailer-does-not-raise-exceptions-with-rails-2-3-2/166719)

<div class="topic-metadata">

**Author:** [@railzman](https://www.ruby-forum.com/u/railzman)\
**Replies:** 1\
**Last updated:** [April 29, 2009, 3:45am UTC](https://www.ruby-forum.com/t/action-mailer-does-not-raise-exceptions-with-rails-2-3-2/166719 "2009-04-29T03:45:38Z")

</div>

Hi, I am trying to have ActionMailer raise exceptions with rails 2.3.2 but it does not. In development.rd I have config.action\_mailer.raise\_delivery\_errors = true I tought it was due to a misconfiguration, so I modi…

---

## [Named routes in link\_to wrapper](https://www.ruby-forum.com/t/named-routes-in-link-to-wrapper/166316)

<div class="topic-metadata">

**Author:** [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Replies:** 3\
**Last updated:** [April 29, 2009, 2:52am UTC](https://www.ruby-forum.com/t/named-routes-in-link-to-wrapper/166316 "2009-04-29T02:52:43Z")

</div>

I am trying to create a custom link\_to helper that passes sort parameters to a link. It has the following code, which is pretty much just a rewrite of link\_to: def sort\_link\_to(sort, old\_sort, old\_dir, \*args, &block) …

---

## [Help active record modeling](https://www.ruby-forum.com/t/help-active-record-modeling/166716)

<div class="topic-metadata">

**Author:** [@serenobs](https://www.ruby-forum.com/u/serenobs)\
**Replies:** 1\
**Last updated:** [April 29, 2009, 2:32am UTC](https://www.ruby-forum.com/t/help-active-record-modeling/166716 "2009-04-29T02:32:25Z")

</div>

Hi. I have difficulties to model active record. So please help my trouble. Let’s suppose there are nations which have castles at least 1, and there are 3 types of castles. So I will make these tables. NationsTable, …

---

## [Controller helpers in app/helpers](https://www.ruby-forum.com/t/controller-helpers-in-app-helpers/166726)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 2\
**Last updated:** [April 29, 2009, 1:13am UTC](https://www.ruby-forum.com/t/controller-helpers-in-app-helpers/166726 "2009-04-29T01:13:31Z")

</div>

Hello list, Originally, afaik, the modules in app/helpers are, by convention, only meant to be used as view helpers. With time, however, we ended up by only calling them helpers, which can cause some confusion and m…

---

## [Writing a plugin: Need to get including class's name. Help?](https://www.ruby-forum.com/t/writing-a-plugin-need-to-get-including-classs-name-help/166633)

<div class="topic-metadata">

**Author:** [@cpher](https://www.ruby-forum.com/u/cpher)\
**Replies:** 3\
**Last updated:** [April 29, 2009, 12:36am UTC](https://www.ruby-forum.com/t/writing-a-plugin-need-to-get-including-classs-name-help/166633 "2009-04-29T00:36:34Z")

</div>

Hello. For reference, here is some sample code that exemplifies what I am trying to do: I am trying to dynamically defined a class, whose name is either passed in as a parameter or based on the including class name. …

---

## [Git push doen't change my live application](https://www.ruby-forum.com/t/git-push-doent-change-my-live-application/166554)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 9\
**Last updated:** [April 29, 2009, 12:34am UTC](https://www.ruby-forum.com/t/git-push-doent-change-my-live-application/166554 "2009-04-29T00:34:18Z")

</div>

Every time I make changes and push, my app doesn’t change. I use dreamhost and when I push the changes it make a folder with the app call releases/20090424185029 but it always shows the app of an older date? How do I …

---

## [What is 'Representational State Transfer'?](https://www.ruby-forum.com/t/what-is-representational-state-transfer/166612)

<div class="topic-metadata">

**Author:** [@amita0204](https://www.ruby-forum.com/u/amita0204)\
**Replies:** 8\
**Last updated:** [April 28, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/what-is-representational-state-transfer/166612 "2009-04-28T23:35:15Z")

</div>

I have read about REST, but never really understood meaning of ‘Representational State Transfer’. I tried to read Fielding’s dissertation, but did not understand this term and why has he used it. What does it mean? Wh…

---

## [Got error on method overriding :(](https://www.ruby-forum.com/t/got-error-on-method-overriding/166706)

<div class="topic-metadata">

**Author:** [@Volodymyr\_Gl](https://www.ruby-forum.com/u/Volodymyr_Gl)\
**Replies:** 2\
**Last updated:** [April 28, 2009, 10:17pm UTC](https://www.ruby-forum.com/t/got-error-on-method-overriding/166706 "2009-04-28T22:17:53Z")

</div>

What is wrong with this code? Running on ruby 1.8.6 #================================== module MFoo def printme puts ‘MFooPrint’ end def initialize puts ‘init’ end end class Foo include MFoo def printme puts…

---

## [Can't update my live site](https://www.ruby-forum.com/t/cant-update-my-live-site/166712)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 9:57pm UTC](https://www.ruby-forum.com/t/cant-update-my-live-site/166712 "2009-04-28T21:57:30Z")

</div>

So I wanted to change spelling errors and other thing on my live site so I changed them on my local machine but I not sure on how to over write though changes to dreamhost. I could do it manually though there FTP but …

---

## [Looking for RailsConf ticket](https://www.ruby-forum.com/t/looking-for-railsconf-ticket/166388)

<div class="topic-metadata">

**Author:** [@Teedub](https://www.ruby-forum.com/u/Teedub)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 9:45pm UTC](https://www.ruby-forum.com/t/looking-for-railsconf-ticket/166388 "2009-04-28T21:45:40Z")

</div>

I can’t really afford to go, but if I had a free/really cheap ticket, then I could swing it. If anyone has an extra ticket, I would love to keep it from going to waste. Last minute is OK. OK, quit laughing. Thanks.

---

## [Conditional Get](https://www.ruby-forum.com/t/conditional-get/166082)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 5\
**Last updated:** [April 28, 2009, 9:31pm UTC](https://www.ruby-forum.com/t/conditional-get/166082 "2009-04-28T21:31:36Z")

</div>

Does anyone have any suggestions on how to create Conditional Get requests in rails? I understand the basic philosophy of the concept, I was just wondering if there was an easy way (a helper or plugin) to automatical…

---

## [Long term contract for ROR Developer](https://www.ruby-forum.com/t/long-term-contract-for-ror-developer/141552)

<div class="topic-metadata">

**Author:** [@legend\_srini1](https://www.ruby-forum.com/u/legend_srini1)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/long-term-contract-for-ror-developer/141552 "2009-04-28T21:16:22Z")

</div>

Hello Friends, I have an couple of immediate fill positions for Ruby on Rails developer, herewith i have pasted the requirement details. Please take a look at them and send me your resume along with your expected com…

---

## [Stuck on deployment](https://www.ruby-forum.com/t/stuck-on-deployment/165950)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 2\
**Last updated:** [April 28, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/stuck-on-deployment/165950 "2009-04-28T20:19:05Z")

</div>

I’ve trying day and night for the past month to deploy a rails app and I just can’t get it. I followed every guide on the web. Using Git, SVN, Capistrano, Passenger, ect. The guide that has brought me the closest is: …

---

## [Strange path errors](https://www.ruby-forum.com/t/strange-path-errors/166710)

<div class="topic-metadata">

**Author:** [@furrot](https://www.ruby-forum.com/u/furrot)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 8:04pm UTC](https://www.ruby-forum.com/t/strange-path-errors/166710 "2009-04-28T20:04:43Z")

</div>

Hi all, I am suddenly getting path errors in my application where there were none before. I have a user login that directs the user to their profile page. I can login ok for some users, but others I am getting path er…

---

## [Interesting Class variable problem](https://www.ruby-forum.com/t/interesting-class-variable-problem/166630)

<div class="topic-metadata">

**Author:** [@Commander\_J](https://www.ruby-forum.com/u/Commander_J)\
**Replies:** 2\
**Last updated:** [April 28, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/interesting-class-variable-problem/166630 "2009-04-28T19:17:54Z")

</div>

class PostOfTheDay private def self.current\_day DateTime.now.utc.to\_date end @@current\_post = nil @@current\_day = current\_day def self.get\_random\_post posts = Post.all posts\[rand(posts.size)\] end public def s…

---

## [Ruby jasper report](https://www.ruby-forum.com/t/ruby-jasper-report/166553)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 5\
**Last updated:** [April 28, 2009, 7:08pm UTC](https://www.ruby-forum.com/t/ruby-jasper-report/166553 "2009-04-28T19:08:51Z")

</div>

Hi, I am trying to create a pdf using ruby jasper. For this I am referring this url:- http://oldwiki.rubyonrails.org/rails/pages/howtointegratejasperreports I have done everything whatever is in that link. Still I…

---

## [Two instances of a controller?](https://www.ruby-forum.com/t/two-instances-of-a-controller/166672)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 6\
**Last updated:** [April 28, 2009, 7:02pm UTC](https://www.ruby-forum.com/t/two-instances-of-a-controller/166672 "2009-04-28T19:02:02Z")

</div>

Hello, I have written a guestbook and I’d like to use it twice in my application. One public guestbook and one private guestbook. How can I use the very same controller for two different guestbooks? Thanks

---

## [Custom Validation on Many-To-Many Association breaks Unit-Tests](https://www.ruby-forum.com/t/custom-validation-on-many-to-many-association-breaks-unit-tests/166661)

<div class="topic-metadata">

**Author:** [@zeto](https://www.ruby-forum.com/u/zeto)\
**Replies:** 7\
**Last updated:** [April 28, 2009, 6:30pm UTC](https://www.ruby-forum.com/t/custom-validation-on-many-to-many-association-breaks-unit-tests/166661 "2009-04-28T18:30:56Z")

</div>

Hi, I have the following situation. I have two models Item and Genre. A Item has a name and a description. The genres-table contains a list of possible genres wich can be associated to items. So a Item could be associ…

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

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