# Rails

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

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

---

## [Replace default action "index" with another one?](https://www.ruby-forum.com/t/replace-default-action-index-with-another-one/120903)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 4:44pm UTC](https://www.ruby-forum.com/t/replace-default-action-index-with-another-one/120903 "2007-11-21T16:44:54Z")

</div>

Hi all Is there a way to make Rails load another action than “index” when no action is specified? Something like MyController default\_action :some\_action def some\_action … end end Thanks for help :slight\_smile: …

---

## [Regarding date\_field](https://www.ruby-forum.com/t/regarding-date-field/120898)

<div class="topic-metadata">

**Author:** [@raghav](https://www.ruby-forum.com/u/raghav)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/regarding-date-field/120898 "2007-11-21T16:26:57Z")

</div>

Hi, i have date\_field in a form where i am allowing users to enter the date. The calender pop up comes fine in IE but the pop up wont come in Firefox. Can someone help me in getting that pop up ? Thanks and Rega…

---

## [Prototype.js: Ajax.Request failing IE7 and working in FF2](https://www.ruby-forum.com/t/prototype-js-ajax-request-failing-ie7-and-working-in-ff2/120587)

<div class="topic-metadata">

**Author:** [@fredistic](https://www.ruby-forum.com/u/fredistic)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/prototype-js-ajax-request-failing-ie7-and-working-in-ff2/120587 "2007-11-21T16:21:05Z")

</div>

Reviewing Ajax with the book ‘Ajax on Rails’. At the bottom of page 24 the examples uses Ajax.request from prototype.js to replace text. It works in FF2 but fails in IE7. That’s a bug I need to fix. Here’s the faili…

---

## [RDocs Issues](https://www.ruby-forum.com/t/rdocs-issues/120793)

<div class="topic-metadata">

**Author:** [@rubyiat](https://www.ruby-forum.com/u/rubyiat)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/rdocs-issues/120793 "2007-11-21T16:18:33Z")

</div>

Hi, I need to use the Rdocs to generate/collect documentation from my controllers etc. I have figured out the basics but am still having some annoying issues that I can’t seem to get past. I would greatly appreciate …

---

## [Builder::XmlMarkup adds \<inspect/\> on printing and \<clone/\> on saving](https://www.ruby-forum.com/t/builder-xmlmarkup-adds-inspect-on-printing-and-clone-on-saving/120887)

<div class="topic-metadata">

**Author:** [@SUzB](https://www.ruby-forum.com/u/SUzB)\
**Replies:** 4\
**Last updated:** [November 21, 2007, 3:02pm UTC](https://www.ruby-forum.com/t/builder-xmlmarkup-adds-inspect-on-printing-and-clone-on-saving/120887 "2007-11-21T15:02:18Z")

</div>

Hello, I am new in this group. Please give me a short hint, in case this is the wrong place for my posting. I want to create an XML file and store it in “filetransfer”. The XML part of the file (the body) sould go to…

---

## [Rails:freeze:gems](https://www.ruby-forum.com/t/railsgems/120892)

<div class="topic-metadata">

**Author:** [@deliak](https://www.ruby-forum.com/u/deliak)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 2:53pm UTC](https://www.ruby-forum.com/t/railsgems/120892 "2007-11-21T14:53:43Z")

</div>

I’ can’t figure out why rake doesnt work when I try to freeze rails (Cannot freeze gems - Rails - Ruby-Forum). So, how could I freeze my rails gems in vendor without using rake rails:freeze:gems ? Does anyone know?

---

## [Plugin: create instance methods dynamically in ClassMethods?](https://www.ruby-forum.com/t/plugin-create-instance-methods-dynamically-in-classmethods/120803)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/plugin-create-instance-methods-dynamically-in-classmethods/120803 "2007-11-21T14:04:22Z")

</div>

Hi all I have the following plugin code: module IncenseCrud def self.included(base\_class) base\_class.extend(ClassMethods) end module ClassMethods def performs\_incense\_crud def index list return render(:action =\>…

---

## [PDF:writer and Simpletable problem](https://www.ruby-forum.com/t/pdf-writer-and-simpletable-problem/120763)

<div class="topic-metadata">

**Author:** [@Sudarshan\_Purohit](https://www.ruby-forum.com/u/Sudarshan_Purohit)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/pdf-writer-and-simpletable-problem/120763 "2007-11-21T13:52:31Z")

</div>

Hi all, I’m facing a problem generating PDF documents using PDF:writer. My code generates a couple of dozen documents in a loop. Each contains something between 8 to 30 tables. Most of the documents generate just fin…

---

## [Page caching with custom route](https://www.ruby-forum.com/t/page-caching-with-custom-route/120840)

<div class="topic-metadata">

**Author:** [@konrad](https://www.ruby-forum.com/u/konrad)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 1:17pm UTC](https://www.ruby-forum.com/t/page-caching-with-custom-route/120840 "2007-11-21T13:17:23Z")

</div>

I know the subject has been discussed a lot already, and there’s plenty of articles about it on the web. But I still haven’t figured out a solution to my problem, so here goes a cry for help. I have the following cust…

---

## [Problem installin rails](https://www.ruby-forum.com/t/problem-installin-rails/120634)

<div class="topic-metadata">

**Author:** [@ramesh](https://www.ruby-forum.com/u/ramesh)\
**Replies:** 5\
**Last updated:** [November 21, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/problem-installin-rails/120634 "2007-11-21T13:13:18Z")

</div>

i have rubygems installed. trying to install rails using the command: gem install rails -v1.2.5, it gives me the error: ERROR: while executing gem … (Gem::RemoteFetcher::FetchError) getaddrinfo: Temporary failure in n…

---

## [Administration of RESTFul-based entities (admin namespace)](https://www.ruby-forum.com/t/administration-of-restful-based-entities-admin-namespace/120813)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 1:09pm UTC](https://www.ruby-forum.com/t/administration-of-restful-based-entities-admin-namespace/120813 "2007-11-21T13:09:47Z")

</div>

Hello list, I’m building a youtube-like application in Rails. I’m basing it on the wootube open source project (kudos to wootube developers!). I’m not into the RESTful model yet but I want to avoid modifying the arch…

---

## [Add Javascript to :confirm in form submit](https://www.ruby-forum.com/t/add-javascript-to-confirm-in-form-submit/120881)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 12:46pm UTC](https://www.ruby-forum.com/t/add-javascript-to-confirm-in-form-submit/120881 "2007-11-21T12:46:55Z")

</div>

I want to have some logic in my :confirm message, so that if the user enters some illegal data, it will notify directly when clicking on submit, and doesn’t have to go through the server. How can I add my Javascript c…

---

## [Cannot freeze gems](https://www.ruby-forum.com/t/cannot-freeze-gems/120877)

<div class="topic-metadata">

**Author:** [@deliak](https://www.ruby-forum.com/u/deliak)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/cannot-freeze-gems/120877 "2007-11-21T12:17:31Z")

</div>

Running rake rails:freeze:gems I got the following error: \[root@WiNN-Mesh web\_interface\]# /usr/local/bin/rake rails:freeze:gems –trace (in /usr/sbin/web\_interface) \*\* Invoke rails:freeze:gems (first\_time) \*\* Execute…

---

## [How to use two submit\_tag in a form?](https://www.ruby-forum.com/t/how-to-use-two-submit-tag-in-a-form/120871)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 7\
**Last updated:** [November 21, 2007, 12:02pm UTC](https://www.ruby-forum.com/t/how-to-use-two-submit-tag-in-a-form/120871 "2007-11-21T12:02:54Z")

</div>

any idea to use 2 submit\_tag in a from ,and the action also should be two… like below(absolutely below code will not work ,but i want like that)… \<%=start\_form\_tag %\> something here \<%=submit\_tag “submit1” ,:action=\>…

---

## [Can someone tell my why my drag and drop doesn't work here?](https://www.ruby-forum.com/t/can-someone-tell-my-why-my-drag-and-drop-doesnt-work-here/120596)

<div class="topic-metadata">

**Author:** [@theogb](https://www.ruby-forum.com/u/theogb)\
**Replies:** 9\
**Last updated:** [November 21, 2007, 10:56am UTC](https://www.ruby-forum.com/t/can-someone-tell-my-why-my-drag-and-drop-doesnt-work-here/120596 "2007-11-21T10:56:16Z")

</div>

I’m attmepting to follow the Agile Web D. book but frankly the AJAX section is pretty awful. When it comes to the drag and drop bit why doesn’t it tell you what the actions in the controller should be? I’ve checked sc…

---

## [How do I put a date column from a collection as a header for a XHTML Table?](https://www.ruby-forum.com/t/how-do-i-put-a-date-column-from-a-collection-as-a-header-for-a-xhtml-table/120869)

<div class="topic-metadata">

**Author:** [@Tonkatsufan](https://www.ruby-forum.com/u/Tonkatsufan)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 10:41am UTC](https://www.ruby-forum.com/t/how-do-i-put-a-date-column-from-a-collection-as-a-header-for-a-xhtml-table/120869 "2007-11-21T10:41:52Z")

</div>

Hi, what’s the best way to achieve this. Say I have a data collection ordered by a date column (ASC or DESC) like this one. Date;Name;Amount 20071001;John;500 20071001;Jim;400 20070902;Bob;300 20070901;Ron;700 Now…

---

## [Implementing remote document (through FTP connection)](https://www.ruby-forum.com/t/implementing-remote-document-through-ftp-connection/120579)

<div class="topic-metadata">

**Author:** [@nelson](https://www.ruby-forum.com/u/nelson)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 9:45am UTC](https://www.ruby-forum.com/t/implementing-remote-document-through-ftp-connection/120579 "2007-11-21T09:45:41Z")

</div>

hi all! i’m implementing a web application that lets the user to handle remote files.I have my application one the machine A and the docs have to be on machine B (accessibile through FTP). I think to make a model tha…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/120867)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 9:13am UTC](https://www.ruby-forum.com/t/no-subject/120867 "2007-11-21T09:13:30Z")

</div>

Hi, how can I read the calendar week (this week: 47) from a time variable - and vice versa how can I read a time variable from calendar week (e.g. monday 0h)? thx, Rudolf

---

## [AJAX with Ruby](https://www.ruby-forum.com/t/ajax-with-ruby/120858)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 8:17am UTC](https://www.ruby-forum.com/t/ajax-with-ruby/120858 "2007-11-21T08:17:44Z")

</div>

hi all i want to integrate AjAX to my ROR project. i have familiar using AJAX in normal HTML and PHP. but i could not found a way to use it in ROR. bz of MVC concept.(hard to call the controls and to models as wanted…

---

## [Will\_paginate and render :update](https://www.ruby-forum.com/t/will-paginate-and-render-update/120860)

<div class="topic-metadata">

**Author:** [@cbinckly](https://www.ruby-forum.com/u/cbinckly)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 8:11am UTC](https://www.ruby-forum.com/t/will-paginate-and-render-update/120860 "2007-11-21T08:11:06Z")

</div>

Hi, I am trying to update a paginated collection of photo objects after a form\_tag\_remote call. I have a partial that renders the collection, and then executes will\_paginate on the updated collection. When the page …

---

## [How do I set a datetime field to "now"](https://www.ruby-forum.com/t/how-do-i-set-a-datetime-field-to-now/120857)

<div class="topic-metadata">

**Author:** [@nozavroni](https://www.ruby-forum.com/u/nozavroni)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 8:03am UTC](https://www.ruby-forum.com/t/how-do-i-set-a-datetime-field-to-now/120857 "2007-11-21T08:03:13Z")

</div>

In my controller I have a model called Todo. It has a column called date\_completed that is null by default, and when the todo is “done” this date is filled out. How do I set the date to “now” on the model? I tried thi…

---

## [Other validations fail even if there is no validates\_presence\_of](https://www.ruby-forum.com/t/other-validations-fail-even-if-there-is-no-validates-presence-of/120760)

<div class="topic-metadata">

**Author:** [@Love\_AJAX](https://www.ruby-forum.com/u/Love_AJAX)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 7:13am UTC](https://www.ruby-forum.com/t/other-validations-fail-even-if-there-is-no-validates-presence-of/120760 "2007-11-21T07:13:30Z")

</div>

Hi, I have a set of validations like: validates\_format\_of :city, :with =\> /^\[a-zA-Z\\s’&\]+$/, :message =\> “is not a valid name” validates\_format\_of :zip, :with =\> /^\[\\d\]{5}+$/, :allow\_nil =\> true, :message =\> “i…

---

## [Shopping cart implementation](https://www.ruby-forum.com/t/shopping-cart-implementation/120739)

<div class="topic-metadata">

**Author:** [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Replies:** 10\
**Last updated:** [November 21, 2007, 5:41am UTC](https://www.ruby-forum.com/t/shopping-cart-implementation/120739 "2007-11-21T05:41:50Z")

</div>

Hi all, I am implementing the functionality of shopping cart. The problem is there is a textbox for updating quantity of the product on the same page where the products are displayed after ading in the cart. By defau…

---

## [Table scheme question](https://www.ruby-forum.com/t/table-scheme-question/196522)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 3\
**Last updated:** [November 21, 2007, 2:59am UTC](https://www.ruby-forum.com/t/table-scheme-question/196522 "2007-11-21T02:59:50Z")

</div>

Hi… I am getting grey hair…i don’t now the right setup for the solution. Maybe you can help?.. Concept. companyX has for each period (1 year, 2 years ect) different 5 values… So for example: 2 years…has the value …

---

## [HABTM to call after\_update?](https://www.ruby-forum.com/t/habtm-to-call-after-update/120841)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 1:31am UTC](https://www.ruby-forum.com/t/habtm-to-call-after-update/120841 "2007-11-21T01:31:37Z")

</div>

Railsters: Given two models, Frog and Pond, suppose we have a habtm between them frogs\_ponds. This statement… frog.ponds \<\< Pond.new …does not trigger any frog.after\_update calls. How can we connect frogs to ponds…

---

## [Rails theme support](https://www.ruby-forum.com/t/rails-theme-support/119750)

<div class="topic-metadata">

**Author:** [@Piotr\_N](https://www.ruby-forum.com/u/Piotr_N)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 1:14am UTC](https://www.ruby-forum.com/t/rails-theme-support/119750 "2007-11-21T01:14:05Z")

</div>

i have rails 1.2.5 installed installed gem install theme\_generator Need to update 21 gems from http://gems.rubyforge.org … complete Successfully installed theme\_generator-1.3.0 when started webrick got following e…

---

## [Does anyone have any good 'phone' validation routines?](https://www.ruby-forum.com/t/does-anyone-have-any-good-phone-validation-routines/120790)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [November 20, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/does-anyone-have-any-good-phone-validation-routines/120790 "2007-11-20T23:06:33Z")

</div>

I’m on the final stages of a large project and am now going through all the model validations. I’ve got many of them and am happy to share if anyone’s in need. I’d like to find a good, practical PHONE validation if an…

---

## [Google AuthSub](https://www.ruby-forum.com/t/google-authsub/120831)

<div class="topic-metadata">

**Author:** [@lgauth](https://www.ruby-forum.com/u/lgauth)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/google-authsub/120831 "2007-11-20T22:58:21Z")

</div>

Hey, as anyone implemented google authsub? Is there a good plugin out there for google auth and api’s in general? I can’t seem to find much… L-P Gauthier

---

## [Adding :order to the find method using a self-referencing model](https://www.ruby-forum.com/t/adding-order-to-the-find-method-using-a-self-referencing-model/120827)

<div class="topic-metadata">

**Author:** [@carp](https://www.ruby-forum.com/u/carp)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/adding-order-to-the-find-method-using-a-self-referencing-model/120827 "2007-11-20T22:27:17Z")

</div>

My issue is with a single table, Conferences, that uses a column parent\_id to reference itself. This way, I identify big conferences (like NCAA) and the smaller conferences that make it up (like PAC 10). What I’d li…

---

## [Using UUID in a Migration](https://www.ruby-forum.com/t/using-uuid-in-a-migration/118691)

<div class="topic-metadata">

**Author:** [@chief7](https://www.ruby-forum.com/u/chief7)\
**Replies:** 5\
**Last updated:** [November 20, 2007, 10:22pm UTC](https://www.ruby-forum.com/t/using-uuid-in-a-migration/118691 "2007-11-20T22:22:36Z")

</div>

Has anyone ever used UUID in a migration? I thought I could set the default value of a field to be â€˜UUIDâ€™ but that only sets the value the string instead of executing the function to create a new unique identifier…

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

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