# Rails

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

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

---

## [Migrations in folders](https://www.ruby-forum.com/t/migrations-in-folders/141820)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 8:03pm UTC](https://www.ruby-forum.com/t/migrations-in-folders/141820 "2008-06-30T20:03:57Z")

</div>

Anyone know of a plugin or something that would let me put my migrations into separate folders? I have a growing project and the number of migrations is becoming unmanageable. Thanks, – Greg D. http://destiney.com…

---

## [Migrations and indexes on failure - db permanently polluted](https://www.ruby-forum.com/t/migrations-and-indexes-on-failure-db-permanently-polluted/141805)

<div class="topic-metadata">

**Author:** [@djconcepcion](https://www.ruby-forum.com/u/djconcepcion)\
**Replies:** 2\
**Last updated:** [June 30, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/migrations-and-indexes-on-failure-db-permanently-polluted/141805 "2008-06-30T19:40:22Z")

</div>

It’s unclear to me whether or not migrations are currently (rails 2.0.2) fully transactional. At least in the case of indexes, they don’t appear to be. If the second index create fails below: class CreateIndexes \< Ac…

---

## [NameError in AdminController#list\_raw\_data](https://www.ruby-forum.com/t/nameerror-in-admincontroller-list-raw-data/141762)

<div class="topic-metadata">

**Author:** [@junkone1](https://www.ruby-forum.com/u/junkone1)\
**Replies:** 7\
**Last updated:** [June 30, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/nameerror-in-admincontroller-list-raw-data/141762 "2008-06-30T19:32:53Z")

</div>

i need some help to fix this problem i have a model named rawdata.rb pointing to a table class Rawdata \< ActiveRecord::Base set\_table\_name “rawdatas” i have setup my controller file named admin\_controller.rb with the …

---

## [Form object suddenly can't read my routes?](https://www.ruby-forum.com/t/form-object-suddenly-cant-read-my-routes/141809)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/form-object-suddenly-cant-read-my-routes/141809 "2008-06-30T19:02:56Z")

</div>

I’m building a large application where I do everything exactly the same across most controllers and views. All of them have worked so far but now, I’m geting the strangest behaviour out of one. I am calling the same \_…

---

## [Form element names with multiple new rows](https://www.ruby-forum.com/t/form-element-names-with-multiple-new-rows/141808)

<div class="topic-metadata">

**Author:** [@alex](https://www.ruby-forum.com/u/alex)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/form-element-names-with-multiple-new-rows/141808 "2008-06-30T19:02:20Z")

</div>

I have a report with many rows some of which refer to an existing ActiveRecord model object and some new ones. I’m trying to figure out a naming convention for the form elements so that Rails will properly convert it…

---

## [OT: Ruby question: alternative to begin/ensure block](https://www.ruby-forum.com/t/ot-ruby-question-alternative-to-begin-ensure-block/141800)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 4\
**Last updated:** [June 30, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/ot-ruby-question-alternative-to-begin-ensure-block/141800 "2008-06-30T19:00:34Z")

</div>

Sorry for asking a purely Ruby question, but somebody on the list knows the answer to this. Are there any alternatives to begin/ensure blocks that can be used to ensure that specific cleanup code gets executed? In my…

---

## [Form element names with multiple new rows](https://www.ruby-forum.com/t/form-element-names-with-multiple-new-rows/141807)

<div class="topic-metadata">

**Author:** [@alex](https://www.ruby-forum.com/u/alex)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/form-element-names-with-multiple-new-rows/141807 "2008-06-30T19:00:34Z")

</div>

I have a report with multiple

---

## [Controller#index is getting called immediately after every single other call](https://www.ruby-forum.com/t/controller-index-is-getting-called-immediately-after-every-single-other-call/141746)

<div class="topic-metadata">

**Author:** [@Bret\_H](https://www.ruby-forum.com/u/Bret_H)\
**Replies:** 4\
**Last updated:** [June 30, 2008, 6:21pm UTC](https://www.ruby-forum.com/t/controller-index-is-getting-called-immediately-after-every-single-other-call/141746 "2008-06-30T18:21:08Z")

</div>

This is a very odd problem, it’s been happening, I think, ever since I patched to Rails 2.1.0 Every time a public method gets called in my Controller, the index method gets called immediately afterwards. It’s not in m…

---

## [Mod\_rails on 256meg slicehost vps crashing often](https://www.ruby-forum.com/t/mod-rails-on-256meg-slicehost-vps-crashing-often/141721)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 5\
**Last updated:** [June 30, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/mod-rails-on-256meg-slicehost-vps-crashing-often/141721 "2008-06-30T18:18:56Z")

</div>

I’m running ubuntu hardy 8.04 with mod\_rails on a site that gets about 1000 hits a day. the site runs perfectly fine if there are only a handful of users making request. but when the site gets busy i run out of memo…

---

## [Access of WML site through cell phone seems flakey](https://www.ruby-forum.com/t/access-of-wml-site-through-cell-phone-seems-flakey/141796)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/access-of-wml-site-through-cell-phone-seems-flakey/141796 "2008-06-30T18:15:25Z")

</div>

I just started a new subdomain on hosting rails. I launched it a couple of days ago. It is a site that can render onto mobile devices using WAP/WML or through a regular browser. It seems flaky with the mobile cell ph…

---

## [Id is getting incremented](https://www.ruby-forum.com/t/id-is-getting-incremented/141781)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/id-is-getting-incremented/141781 "2008-06-30T17:05:04Z")

</div>

hi iam using rails 2.1.o when i connected to my mysql.and i created a scaffold name user.in the database the id of the model user is incremented to 996332880 is this a problem in 2.1.0

---

## [Javascript onclick for thumbnails](https://www.ruby-forum.com/t/javascript-onclick-for-thumbnails/141785)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/javascript-onclick-for-thumbnails/141785 "2008-06-30T16:25:06Z")

</div>

Hi, i was struggling for a function where only 1 thumbnail should be active and others inactive when clicked on the particular thumbnail. code: view: \<% for eligible\_exercise in excercises %\> \<…

---

## [Stopped Upload kills my Apache/Passenger app](https://www.ruby-forum.com/t/stopped-upload-kills-my-apache-passenger-app/141786)

<div class="topic-metadata">

**Author:** [@vulpesfurvus](https://www.ruby-forum.com/u/vulpesfurvus)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/stopped-upload-kills-my-apache-passenger-app/141786 "2008-06-30T16:23:16Z")

</div>

Hi, I’m having a big problem with stoped uploads killing my app. I simply have a restfull controller and as follows, my view and models are: View new.html.erb: New Image \<%= error\_messages\_for :image %\> \<% form\_for(…

---

## [Does Anyone Know of a Way of Encrypting PDFs?](https://www.ruby-forum.com/t/does-anyone-know-of-a-way-of-encrypting-pdfs/141784)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/does-anyone-know-of-a-way-of-encrypting-pdfs/141784 "2008-06-30T16:13:46Z")

</div>

Does anyone know of ways of encrypting pdfs? I ask because pdf::writer that we are using no longer supports encrypt.

---

## [Clean way of creating and validating 2 related models in controller (with STI)?](https://www.ruby-forum.com/t/clean-way-of-creating-and-validating-2-related-models-in-controller-with-sti/141783)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/clean-way-of-creating-and-validating-2-related-models-in-controller-with-sti/141783 "2008-06-30T16:10:26Z")

</div>

Hi, I’ve got really typical problem, but with small twist - need to create a Foo and Bar objects in a single form with validation of both objects, where: Foo.belongs\_to :bar Bar.has\_one :foo. I’ve found really clea…

---

## [Â· is there way to set my text fields with searching paramete](https://www.ruby-forum.com/t/a-is-there-way-to-set-my-text-fields-with-searching-paramete/141779)

<div class="topic-metadata">

**Author:** [@hemisphere](https://www.ruby-forum.com/u/hemisphere)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 3:51pm UTC](https://www.ruby-forum.com/t/a-is-there-way-to-set-my-text-fields-with-searching-paramete/141779 "2008-06-30T15:51:06Z")

</div>

i used a search action. i’m printing the results to same page but after searching, my text fields set to empty. but i want to see what i search. For exmple if i write to search textfield ‘This’ i want the textfield se…

---

## [Empty emtry in database problem](https://www.ruby-forum.com/t/empty-emtry-in-database-problem/141757)

<div class="topic-metadata">

**Author:** [@supriyaiiita](https://www.ruby-forum.com/u/supriyaiiita)\
**Replies:** 5\
**Last updated:** [June 30, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/empty-emtry-in-database-problem/141757 "2008-06-30T15:20:38Z")

</div>

Hi, While adding a new entry in my database , if i dnt enter one of the field, it gets stored as emtry string and not as NULL field.This creates some problem while searching on that model. How can i deal with it?? …

---

## [Html\_escape doesn't work in a text\_field\_tag?](https://www.ruby-forum.com/t/html-escape-doesnt-work-in-a-text-field-tag/141771)

<div class="topic-metadata">

**Author:** [@deegee](https://www.ruby-forum.com/u/deegee)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 2:47pm UTC](https://www.ruby-forum.com/t/html-escape-doesnt-work-in-a-text-field-tag/141771 "2008-06-30T14:47:44Z")

</div>

I’ve got a standard login form: \<% form\_tag session\_path do -%\> Login \<%= text\_field\_tag 'login', h(@login) %\> Password \<%= password\_field\_tag 'password', nil %\> \<%= submit\_tag 'Log in' %\> \<% end -%\> I’ve included…

---

## [Def list routing](https://www.ruby-forum.com/t/def-list-routing/141742)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 4\
**Last updated:** [June 30, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/def-list-routing/141742 "2008-06-30T14:43:04Z")

</div>

Hi! I have made an scaffold for Item table like script/generate scaffold Item. Everything went fine, but now i like to add list action to controller Def list $items = Item.finde(:all) end I have added it, but how …

---

## [Setting expiration date based on creation date in model?](https://www.ruby-forum.com/t/setting-expiration-date-based-on-creation-date-in-model/141739)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 7\
**Last updated:** [June 30, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/setting-expiration-date-based-on-creation-date-in-model/141739 "2008-06-30T14:11:04Z")

</div>

Hi, I am handling some records that have expiration date. Records should expire 30 days after its creation. I could add the logic in the controller but I think that should/could be done in the model. How can I do th…

---

## [Classic pagination by button](https://www.ruby-forum.com/t/classic-pagination-by-button/141759)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 1:13pm UTC](https://www.ruby-forum.com/t/classic-pagination-by-button/141759 "2008-06-30T13:13:46Z")

</div>

Hi I am using classic pagination plugin and in my view i am using link to list items by updated at \<%= link\_to "list by id", {:action =\> "list\_by\_update"}%\> controll goes def list\_by\_update @item\_pages, @items = pa…

---

## [Recommendation for tagging](https://www.ruby-forum.com/t/recommendation-for-tagging/141704)

<div class="topic-metadata">

**Author:** [@tadatoshi](https://www.ruby-forum.com/u/tadatoshi)\
**Replies:** 2\
**Last updated:** [June 30, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/recommendation-for-tagging/141704 "2008-06-30T12:49:07Z")

</div>

I tried to install acts\_as\_taggable plugin. $ script/plugin install acts\_as\_taggable But the plugin was not found. Plugin not found: \[“acts\_as\_taggable”\] Is there any recommendation for other approaches for tagging …

---

## [Problem with javascript validation in rails](https://www.ruby-forum.com/t/problem-with-javascript-validation-in-rails/141754)

<div class="topic-metadata">

**Author:** [@supriyaiiita](https://www.ruby-forum.com/u/supriyaiiita)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/problem-with-javascript-validation-in-rails/141754 "2008-06-30T12:32:08Z")

</div>

Hi all, I have a form for adding new entries in my “dev” model. I need to check empty fields in that using javascript function. but in my form im having combo box and other fields in rails code. my query is : does j…

---

## [Include a second table in auto\_complete\_for](https://www.ruby-forum.com/t/include-a-second-table-in-auto-complete-for/141684)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 4\
**Last updated:** [June 30, 2008, 11:51am UTC](https://www.ruby-forum.com/t/include-a-second-table-in-auto-complete-for/141684 "2008-06-30T11:51:52Z")

</div>

Hi, I have 2 tables such as: create\_table “professionals” do |t| t.integer “user\_id” t.string “telephone” end create\_table “users” do |t| t.string “nicename” end …and I would like to edit the auto\_complete\_…

---

## [Rake aborted! undefined method \`time\_zone=' for #](https://www.ruby-forum.com/t/rake-aborted-undefined-method-time-zone-for/141745)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 11:47am UTC](https://www.ruby-forum.com/t/rake-aborted-undefined-method-time-zone-for/141745 "2008-06-30T11:47:34Z")

</div>

Dear I have uploaded one project on my account on one of the servers. When I do migrate the database rake db:migrate i get this error rake aborted! undefined method \`time\_zone=’ for # any idea on how to solve this …

---

## [No action responded to create](https://www.ruby-forum.com/t/no-action-responded-to-create/141714)

<div class="topic-metadata">

**Author:** [@cristina](https://www.ruby-forum.com/u/cristina)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 11:28am UTC](https://www.ruby-forum.com/t/no-action-responded-to-create/141714 "2008-06-30T11:28:29Z")

</div>

Hey guys!Ihave a problem with a nested resource: when i subbmit the new page i receive:No action responded to create the controller : def create @entry = @user.entries.new(params\[:entry\]) respond\_to do |format| if @…

---

## [Difference between %\> into-%\>](https://www.ruby-forum.com/t/difference-between-into/141740)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [June 30, 2008, 11:08am UTC](https://www.ruby-forum.com/t/difference-between-into/141740 "2008-06-30T11:08:16Z")

</div>

Experiment with adding and removing the minus sign at the end of the ERb \<%= %\> sequence (i.e., changing %\> into -%\>, and vice versa. what will be the difference

---

## [To choose from multiple email address while sending mail](https://www.ruby-forum.com/t/to-choose-from-multiple-email-address-while-sending-mail/141748)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 10:54am UTC](https://www.ruby-forum.com/t/to-choose-from-multiple-email-address-while-sending-mail/141748 "2008-06-30T10:54:16Z")

</div>

Hi, I want the user to have the facility to choose from which of his email address he wants to send the mail. example a user may wish to send mail from removed\_email\_address@domain.invalid or removed\_email\_address@do…

---

## [FCKEditor view problem](https://www.ruby-forum.com/t/fckeditor-view-problem/141146)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 4\
**Last updated:** [June 30, 2008, 10:50am UTC](https://www.ruby-forum.com/t/fckeditor-view-problem/141146 "2008-06-30T10:50:40Z")

</div>

Dear all I installed the FCKeditor plugin following this post http://blog.caronsoftware.com/2006/08/07/fckeditor-plugin-for-rails i put this in the view \<%= fckeditor\_textarea :company, :description, :height =\> ‘300’…

---

## [Routing error](https://www.ruby-forum.com/t/routing-error/141747)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 0\
**Last updated:** [June 30, 2008, 10:48am UTC](https://www.ruby-forum.com/t/routing-error/141747 "2008-06-30T10:48:47Z")

</div>

im receiving this error Routing Error No route matches “/ganesh/index” with {:method=\>:get} the path works fine yesterday…but it shows this error today…i cant open any of the project in rails controller/index…and so…

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

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