# Rails

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

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

---

## [RESTful routes not letting me rest](https://www.ruby-forum.com/t/restful-routes-not-letting-me-rest/125951)

<div class="topic-metadata">

**Author:** [@kopf1988](https://www.ruby-forum.com/u/kopf1988)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/restful-routes-not-letting-me-rest/125951 "2008-01-14T17:41:42Z")

</div>

Okay, so in my users controller I have defined a modify function. And then in my views I have placed my modify view. Then in my routes I have added: map.resources :users, :collection =\> {:login =\> :get, :logout =\> :g…

---

## [Date\_tag?](https://www.ruby-forum.com/t/date-tag/126001)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 3\
**Last updated:** [January 14, 2008, 5:34pm UTC](https://www.ruby-forum.com/t/date-tag/126001 "2008-01-14T17:34:38Z")

</div>

Hi- I have used helpers like text\_field\_tag when creating non-model forms and I would like to build a form that searches by date, also non- model. Is there such thing as datetime\_tag, or something similiar? Thanks f…

---

## [How to remove scaffold - model's, controller's and views](https://www.ruby-forum.com/t/how-to-remove-scaffold-models-controllers-and-views/126009)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 5:34pm UTC](https://www.ruby-forum.com/t/how-to-remove-scaffold-models-controllers-and-views/126009 "2008-01-14T17:34:01Z")

</div>

Is there a script to run that removes all the files that would be created by the generate command - “script/generate scaffold widget name:string description:text” thanks

---

## [Top five security tips](https://www.ruby-forum.com/t/top-five-security-tips/125975)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 4:51pm UTC](https://www.ruby-forum.com/t/top-five-security-tips/125975 "2008-01-14T16:51:03Z")

</div>

I’ve recently deployed my first app and although I don’t think I’ve done too much wrong I’m acutely aware of the importance of security. I’m sure people here are also. I’d be interested in learning more and as such I …

---

## [Validating linked ActiveRecords without saving them in DB](https://www.ruby-forum.com/t/validating-linked-activerecords-without-saving-them-in-db/126000)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/validating-linked-activerecords-without-saving-them-in-db/126000 "2008-01-14T16:35:47Z")

</div>

I would like to create new records @user = User.new(params\[:user\]) @activity = Activity.new(params\[:activity\]) … then validating them without saving to the DB… (as saving one depend upon saving others…) or should …

---

## [Help with many-to-many relationships](https://www.ruby-forum.com/t/help-with-many-to-many-relationships/125948)

<div class="topic-metadata">

**Author:** [@weloki](https://www.ruby-forum.com/u/weloki)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/help-with-many-to-many-relationships/125948 "2008-01-14T16:05:11Z")

</div>

Suppose there is a set of items, a set of stores, and a set of quantity values. Each item is located in at least one store and each store has at least one item. For each store, each item has a particular quantity. The …

---

## [How to generate a serial of random numbers](https://www.ruby-forum.com/t/how-to-generate-a-serial-of-random-numbers/125998)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/how-to-generate-a-serial-of-random-numbers/125998 "2008-01-14T15:57:09Z")

</div>

Hi all, I want to generate a serial of 5 random numbers based on the size of an array(let say the size of array is 100). Here are the rules:1) 5 random numbers are different 2) Once they are generated they can’t appe…

---

## [ANN - assert\_efficient\_sql](https://www.ruby-forum.com/t/ann-assert-efficient-sql/125999)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/ann-assert-efficient-sql/125999 "2008-01-14T15:53:55Z")

</div>

To ensure your test cases call efficient MySQL… def test\_my\_case assert\_efficient\_sql do # just wrap them in this block! end end The assertion intercepts and copies out your MySQL SELECT statements, then calls EX…

---

## [Simple syntax question (models, validation)](https://www.ruby-forum.com/t/simple-syntax-question-models-validation/125991)

<div class="topic-metadata">

**Author:** [@ajs](https://www.ruby-forum.com/u/ajs)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/simple-syntax-question-models-validation/125991 "2008-01-14T15:46:44Z")

</div>

who can explain this to me? def before\_validation logger.info url url = “http://” \<\< url if url\[0…3\]==“www.” end the logger line correctly logs any URL that’s been submitted, let’s say it’s “www.amazon.co.uk” BUT …

---

## [Form/field Generator](https://www.ruby-forum.com/t/form-field-generator/125941)

<div class="topic-metadata">

**Author:** [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/form-field-generator/125941 "2008-01-14T15:39:05Z")

</div>

Is there a generator akin to the scaffold generator that generates the views under some sort of control? I’ve seen ‘scaffold\_form’ and its just about acceptable for the \*\* FORMS\*\* (edit/new), but I’m wondering if ther…

---

## [Making rails application encrypted](https://www.ruby-forum.com/t/making-rails-application-encrypted/125982)

<div class="topic-metadata">

**Author:** [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/making-rails-application-encrypted/125982 "2008-01-14T14:26:32Z")

</div>

Hi All, I have a query, I want to encrypt my rails application, such that no one can see the code of that, like exe in asp and compiled jsp in java. It’s very urgent do you have any-any way to do so. Regards, Pavan …

---

## [Knowing the method from before\_filter](https://www.ruby-forum.com/t/knowing-the-method-from-before-filter/125960)

<div class="topic-metadata">

**Author:** [@hsun](https://www.ruby-forum.com/u/hsun)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/knowing-the-method-from-before-filter/125960 "2008-01-14T14:21:14Z")

</div>

I would like to know the method that will be called from before\_filter, is it possible? for example class TestController \< ApplicationController before\_filter :tell\_method\_name protected def tell\_method\_name #tell …

---

## [Problem with sessions](https://www.ruby-forum.com/t/problem-with-sessions/125949)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 5\
**Last updated:** [January 14, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/problem-with-sessions/125949 "2008-01-14T13:48:46Z")

</div>

Hi, Does anyone know is it possible to have more than one sessions in a web application? If it is possible, can someone please tell me how can I acheive this? Thanks fries 88

---

## [Ajax Problem](https://www.ruby-forum.com/t/ajax-problem/125986)

<div class="topic-metadata">

**Author:** [@manjularaj](https://www.ruby-forum.com/u/manjularaj)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/ajax-problem/125986 "2008-01-14T13:44:02Z")

</div>

Hi, I’m using Jquery on jrails. I used ajax to submit for one textbox. I want to put an image when ajax is calling. But i’m getting problem here. Please solve my problem.Here is the part of code Prouct Category \<%#…

---

## [Support for Rails on Linux and the readline package](https://www.ruby-forum.com/t/support-for-rails-on-linux-and-the-readline-package/125984)

<div class="topic-metadata">

**Author:** [@Onno\_van\_der\_Straat](https://www.ruby-forum.com/u/Onno_van_der_Straat)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 1:15pm UTC](https://www.ruby-forum.com/t/support-for-rails-on-linux-and-the-readline-package/125984 "2008-01-14T13:15:00Z")

</div>

Hi, I’m installing Rails on Linux and I want to share my experiences with it. I expected a smooth installation because the Rails experts often mention Linux as the preferred platform for Rails. I think it is true if …

---

## [From Development to production, Error](https://www.ruby-forum.com/t/from-development-to-production-error/125896)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 5\
**Last updated:** [January 14, 2008, 12:43pm UTC](https://www.ruby-forum.com/t/from-development-to-production-error/125896 "2008-01-14T12:43:11Z")

</div>

Hi you all, I have an app working correctly in Development mode. For changing to Production I have: Copied database schema and data from myapp\_development database to myapp\_production database. Executed the script/s…

---

## [Unit Testing for Acts\_as\_authenticated](https://www.ruby-forum.com/t/unit-testing-for-acts-as-authenticated/125980)

<div class="topic-metadata">

**Author:** [@Some1](https://www.ruby-forum.com/u/Some1)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/unit-testing-for-acts-as-authenticated/125980 "2008-01-14T12:32:03Z")

</div>

Hello Folks, I have built my rails application using ActiveScaffold, and Acts\_as\_authenticated, is there any Unit Testing for Acts\_as\_authenticated & ActiveScaffold report or example about this subject? I do not kno…

---

## [Module\_eval and scope question](https://www.ruby-forum.com/t/module-eval-and-scope-question/125880)

<div class="topic-metadata">

**Author:** [@ronny](https://www.ruby-forum.com/u/ronny)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/module-eval-and-scope-question/125880 "2008-01-14T12:12:40Z")

</div>

When trying to understand a piece of code from the Ruby-On-Rails framework, I found that I’m still lacking knowledge about scope issues in Ruby. Here is a stripped down version of the code I’m trying to understand (i…

---

## [Controller layout of private messaging](https://www.ruby-forum.com/t/controller-layout-of-private-messaging/125977)

<div class="topic-metadata">

**Author:** [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 11:12am UTC](https://www.ruby-forum.com/t/controller-layout-of-private-messaging/125977 "2008-01-14T11:12:14Z")

</div>

Hey am after some advice on how to layout my controllers and models for inbox/sentbox private messaging functionality. i have it all working at the moment but i believe it to be quite messy. i have this so far. cont…

---

## [Attachment\_fu: setting the default image](https://www.ruby-forum.com/t/attachment-fu-setting-the-default-image/120187)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 10:49am UTC](https://www.ruby-forum.com/t/attachment-fu-setting-the-default-image/120187 "2008-01-14T10:49:51Z")

</div>

Hey everyone, quick question , how can I set the default image using attachment\_fu? (this is not a quesiton on how to use it, cause I got it working and the first image is being set as default) Thing is, I want the u…

---

## [Opening for Ruby on Rails Developer @ Azri Solutions Pvt Ltd](https://www.ruby-forum.com/t/opening-for-ruby-on-rails-developer-azri-solutions-pvt-ltd/125970)

<div class="topic-metadata">

**Author:** [@Azri\_Careers](https://www.ruby-forum.com/u/Azri_Careers)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 10:31am UTC](https://www.ruby-forum.com/t/opening-for-ruby-on-rails-developer-azri-solutions-pvt-ltd/125970 "2008-01-14T10:31:06Z")

</div>

Is your passion for Open Source software stronger than the evil organizational forces (aka workplace idiosyncrasies) which try to blunt your effectiveness? Do you yearn for the freedom to truly contribute as per your …

---

## [Help need with REST-ful httprequest/post](https://www.ruby-forum.com/t/help-need-with-rest-ful-httprequest-post/125971)

<div class="topic-metadata">

**Author:** [@petem](https://www.ruby-forum.com/u/petem)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 10:14am UTC](https://www.ruby-forum.com/t/help-need-with-rest-ful-httprequest-post/125971 "2008-01-14T10:14:09Z")

</div>

development.log extract … Processing ClientsController#create (for 192.168.2.101 at 2008-01-14 19:58:17) \[POST\] Session ID: 2258f3de2b013ddc9c46d861d917466a Parameters: {“waypoints”=\>“wp”, “action”=\>“create”, “landt…

---

## [Problems with selection list](https://www.ruby-forum.com/t/problems-with-selection-list/125964)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 9:30am UTC](https://www.ruby-forum.com/t/problems-with-selection-list/125964 "2008-01-14T09:30:20Z")

</div>

Hi, I created 3 selection list. I am able to save the values of the selection lists into the table. But I have problems with editing page as only the last selection list’s value is shown on the edit page. View of fir…

---

## [Insert rows of the same table from different forms](https://www.ruby-forum.com/t/insert-rows-of-the-same-table-from-different-forms/125684)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 9\
**Last updated:** [January 14, 2008, 9:06am UTC](https://www.ruby-forum.com/t/insert-rows-of-the-same-table-from-different-forms/125684 "2008-01-14T09:06:34Z")

</div>

Hi, I tried to insert rows of the same table from different forms in different pages. Example: user table has name, address, telephone number and hobbies. I have two pages with one form in each page. One form in the …

---

## [Reservations and Availability](https://www.ruby-forum.com/t/reservations-and-availability/125933)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 8:14am UTC](https://www.ruby-forum.com/t/reservations-and-availability/125933 "2008-01-14T08:14:48Z")

</div>

Hello…this amounts more to SQL questions rather than Rails specific I guess. I’m new to both. Basically what I’m trying to do is perform a search for sites which are available for a reservations system. I have a Sit…

---

## [Issue with FOR loop?](https://www.ruby-forum.com/t/issue-with-for-loop/125958)

<div class="topic-metadata">

**Author:** [@venu](https://www.ruby-forum.com/u/venu)\
**Replies:** 3\
**Last updated:** [January 14, 2008, 8:06am UTC](https://www.ruby-forum.com/t/issue-with-for-loop/125958 "2008-01-14T08:06:35Z")

</div>

My view rhtml contains the following \<% for contactaddress in @contact\_address %\> \<%= text\_field “contactaddress”, “addr\_line1”, “size” =\> 50 %\>\</ \<%end%\> In the above code @contactact\_address contains several contac…

---

## [Download a file](https://www.ruby-forum.com/t/download-a-file/125874)

<div class="topic-metadata">

**Author:** [@nettome](https://www.ruby-forum.com/u/nettome)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 7:06am UTC](https://www.ruby-forum.com/t/download-a-file/125874 "2008-01-14T07:06:55Z")

</div>

I want to download a file previously uploaded in the database Its like providing a link and when clicked the file is downloaded to your file system How?? can i do that, I have no idea about it Please can anyone help …

---

## [Trying to automate a task](https://www.ruby-forum.com/t/trying-to-automate-a-task/125956)

<div class="topic-metadata">

**Author:** [@eggman2001](https://www.ruby-forum.com/u/eggman2001)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 6:35am UTC](https://www.ruby-forum.com/t/trying-to-automate-a-task/125956 "2008-01-14T06:35:22Z")

</div>

I’d like to automate a task that requires access to my models. Specifically, I’d like to fetch some rss feeds and then create model objects from them. I initially thought that I could do this with rake, but then I rea…

---

## [Comment: Role of Scaffolding Going Forward](https://www.ruby-forum.com/t/comment-role-of-scaffolding-going-forward/125784)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 6:08am UTC](https://www.ruby-forum.com/t/comment-role-of-scaffolding-going-forward/125784 "2008-01-14T06:08:30Z")

</div>

A public service announcement: Since the release of 2.0, there have been numerous questions on the list regarding scaffolding. I attribute this to two factors: Almost every tutorial uses scaffolding for up-and-runnin…

---

## [Ajax form helpers](https://www.ruby-forum.com/t/ajax-form-helpers/125875)

<div class="topic-metadata">

**Author:** [@nettome](https://www.ruby-forum.com/u/nettome)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 6:06am UTC](https://www.ruby-forum.com/t/ajax-form-helpers/125875 "2008-01-14T06:06:45Z")

</div>

Hello everybody, I read about the for helpers submit\_to\_remote form\_remote\_tag link\_to\_remote form\_for I’m confused about which one to use and when, please can anyone help me understand them thanks

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

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