# Rails

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

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

---

## [Bizarre interaction problem between acts\_as\_authenticated and a flash mp3 player](https://www.ruby-forum.com/t/bizarre-interaction-problem-between-acts-as-authenticated-and-a-flash-mp3-player/121399)

<div class="topic-metadata">

**Author:** [@jebw](https://www.ruby-forum.com/u/jebw)\
**Replies:** 1\
**Last updated:** [November 27, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/bizarre-interaction-problem-between-acts-as-authenticated-and-a-flash-mp3-player/121399 "2007-11-27T17:51:33Z")

</div>

I’m getting an odd problem where a flash movie (a simple mp3 player) does not load up correctly if a user is not logged in with an admin role. I’m using Acts As Authenticated and RoleRequirement plugins. After a day o…

---

## [Flah Plugin Trouble](https://www.ruby-forum.com/t/flah-plugin-trouble/121293)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [November 27, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/flah-plugin-trouble/121293 "2007-11-27T17:36:20Z")

</div>

Hi I use this plugin for flv streaming. Why cant I see videos from any other directory? I can view files only from /swf. Any ideas?

---

## [Multi-tasking with RESTful controllers?](https://www.ruby-forum.com/t/multi-tasking-with-restful-controllers/121316)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 9\
**Last updated:** [November 27, 2007, 5:24pm UTC](https://www.ruby-forum.com/t/multi-tasking-with-restful-controllers/121316 "2007-11-27T17:24:37Z")

</div>

Guys, I’m working to get my head around REST. Reading the chapter in AWDROR is not helping unfortunately, but I think it may be a result of either an error in my copy of the book, or my understanding in general. REST…

---

## [Environment Specific Data](https://www.ruby-forum.com/t/environment-specific-data/121336)

<div class="topic-metadata">

**Author:** [@Mike\_Deck](https://www.ruby-forum.com/u/Mike_Deck)\
**Replies:** 2\
**Last updated:** [November 27, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/environment-specific-data/121336 "2007-11-27T16:54:06Z")

</div>

I’m trying to figure out the best way to manage multiple sets of data across different environments. I have a situation where I want to automatically load some dummy data into my development environment but I do not …

---

## [Association :conditions & instance-variable evaluation](https://www.ruby-forum.com/t/association-conditions-instance-variable-evaluation/120718)

<div class="topic-metadata">

**Author:** [@tom\_302](https://www.ruby-forum.com/u/tom_302)\
**Replies:** 3\
**Last updated:** [November 27, 2007, 4:51pm UTC](https://www.ruby-forum.com/t/association-conditions-instance-variable-evaluation/120718 "2007-11-27T16:51:37Z")

</div>

Hello, I was wondering if it’s possible to add :conditions to an association, such that the conditions reference variables that need to be re- evaluated before each query? e.g.: has\_many :people, :conditions =\> “som…

---

## [Load error message and then load links](https://www.ruby-forum.com/t/load-error-message-and-then-load-links/121395)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/load-error-message-and-then-load-links/121395 "2007-11-27T16:41:02Z")

</div>

I have this part of my application where you can add memberships numbers to a list, but in the event that a bad membership number is added I would like my app to first display an error message followed by the valid me…

---

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

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [November 27, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/routing/121391 "2007-11-27T16:39:58Z")

</div>

Hi all, My site uses subdomains to define an item. Eg http://itemname.mysite.com I fetch the itemname and render the appropriate site from that itemname. The subdomain is used everywhere (eg http://itemname.mysite.co…

---

## [Rss aggregator schema](https://www.ruby-forum.com/t/rss-aggregator-schema/121396)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/rss-aggregator-schema/121396 "2007-11-27T16:38:11Z")

</div>

I’m working on building a rails on top of \<http://www.gnome.org/projects/ straw/\>. Currently I’m using MySQL while straw uses sqlite, so I’ll have to change to sqlite down the road. Here’s my schema: mysql\> mysql\>…

---

## [Exclude column from activerecord](https://www.ruby-forum.com/t/exclude-column-from-activerecord/121394)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/exclude-column-from-activerecord/121394 "2007-11-27T16:34:40Z")

</div>

i’d like to exclude columns from my model. i read some messages about it but nothing fits me. i found this one which seems to be great : http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/d3a0ae301c7…

---

## ["If the checkbox is checked, then do......."](https://www.ruby-forum.com/t/if-the-checkbox-is-checked-then-do/121367)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 3\
**Last updated:** [November 27, 2007, 3:48pm UTC](https://www.ruby-forum.com/t/if-the-checkbox-is-checked-then-do/121367 "2007-11-27T15:48:19Z")

</div>

Hello, I’m incorporating a small form that works like a “terms of service agreement”, and want to do XYZ if the checkbox is checked. I have this: \<%= check\_box\_tag “user\_agreement\[\]” %\> Now, is this the correct way …

---

## [Add to cart functionality(getting error)](https://www.ruby-forum.com/t/add-to-cart-functionality-getting-error/121383)

<div class="topic-metadata">

**Author:** [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 2:12pm UTC](https://www.ruby-forum.com/t/add-to-cart-functionality-getting-error/121383 "2007-11-27T14:12:37Z")

</div>

Hi, I am implementing shopping cart and getting error in add\_to\_cart. The error is: ActiveRecord::AssociationTypeMismatch in StoreController#cart Product expected, got Fixnum The add\_to\_cart method is: def add\_to\_c…

---

## [Images and CSS are not used correctly; both are stored in public folder](https://www.ruby-forum.com/t/images-and-css-are-not-used-correctly-both-are-stored-in-public-folder/121280)

<div class="topic-metadata">

**Author:** [@knut](https://www.ruby-forum.com/u/knut)\
**Replies:** 2\
**Last updated:** [November 27, 2007, 1:29pm UTC](https://www.ruby-forum.com/t/images-and-css-are-not-used-correctly-both-are-stored-in-public-folder/121280 "2007-11-27T13:29:36Z")

</div>

Hi, maybe someone of you had the same error in the past and can help me. I use “InstantRails” for learning Ruby on Rails. I have done some tests, but always images which are stored under public/images/ rails.png didn…

---

## [Working with one model from another](https://www.ruby-forum.com/t/working-with-one-model-from-another/121377)

<div class="topic-metadata">

**Author:** [@tobynicholas](https://www.ruby-forum.com/u/tobynicholas)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/working-with-one-model-from-another/121377 "2007-11-27T13:15:20Z")

</div>

Hi all, I have some code where I’d like to set up an instance of a non-database model from another, ActiveRecord, model in order to use some custom methods on a string, without mixing extra methods into the String cla…

---

## [Moving my app with instant rails to another machine](https://www.ruby-forum.com/t/moving-my-app-with-instant-rails-to-another-machine/121370)

<div class="topic-metadata">

**Author:** [@Vijay\_Rao](https://www.ruby-forum.com/u/Vijay_Rao)\
**Replies:** 1\
**Last updated:** [November 27, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/moving-my-app-with-instant-rails-to-another-machine/121370 "2007-11-27T13:02:33Z")

</div>

Hello, I am doing a poor man’s equivalent of deploying. I had Instant rails on my laptop with mysql and the whole shebang. I now want to show my work to my professor and I am not looking to do a “production deployme…

---

## [Plugin - How to access object from instance method](https://www.ruby-forum.com/t/plugin-how-to-access-object-from-instance-method/121345)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 1\
**Last updated:** [November 27, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/plugin-how-to-access-object-from-instance-method/121345 "2007-11-27T12:54:56Z")

</div>

Quick question: Given a basic plugin… how can I access an object that I instantiated in the acts\_as method from an instance method? Probably some sort of accessor… but where? def self.included(base) base.extend Class…

---

## [Does Rails 2.0 \*require\* a db? Sure seems that way](https://www.ruby-forum.com/t/does-rails-2-0-require-a-db-sure-seems-that-way/121352)

<div class="topic-metadata">

**Author:** [@rrwhite](https://www.ruby-forum.com/u/rrwhite)\
**Replies:** 3\
**Last updated:** [November 27, 2007, 12:20pm UTC](https://www.ruby-forum.com/t/does-rails-2-0-require-a-db-sure-seems-that-way/121352 "2007-11-27T12:20:16Z")

</div>

I do a number of protoype apps in Rails and up until 2.0 I haven’t had any issues running them without a DB. I’m running a naked Rails 2.0 app with only a few views, no ActiveRecord models and using the default sessio…

---

## [Rendering this to the html page](https://www.ruby-forum.com/t/rendering-this-to-the-html-page/121360)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 2\
**Last updated:** [November 27, 2007, 12:00pm UTC](https://www.ruby-forum.com/t/rendering-this-to-the-html-page/121360 "2007-11-27T12:00:43Z")

</div>

hi guys, i have develop some coding like login forms and registration forms in normal ROR way. they are working 100% ok as i want. bt not i have created the html interface to my page and find dificult to add the ROR …

---

## [Checklist for production deployment?](https://www.ruby-forum.com/t/checklist-for-production-deployment/121359)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 2\
**Last updated:** [November 27, 2007, 11:04am UTC](https://www.ruby-forum.com/t/checklist-for-production-deployment/121359 "2007-11-27T11:04:12Z")

</div>

Here is my checklist for deployment in production mode. I do everything on this list, but my app still refuses to run in production mode. Does anybody know what I’m missing? “mongrel\_rails start -d -e production -p …

---

## [ANN: Spraypaint - yet another tagging library for rails](https://www.ruby-forum.com/t/ann-spraypaint-yet-another-tagging-library-for-rails/121087)

<div class="topic-metadata">

**Author:** [@tomafro](https://www.ruby-forum.com/u/tomafro)\
**Replies:** 3\
**Last updated:** [November 27, 2007, 10:34am UTC](https://www.ruby-forum.com/t/ann-spraypaint-yet-another-tagging-library-for-rails/121087 "2007-11-27T10:34:15Z")

</div>

I’ve just open-sourced and released spraypaint, a tagging plugin I’ve developed. I can’t claim it’s better than all other tagging plugins out there (and there are certainly quite a few) but I think it’s different eno…

---

## [Validation without saving](https://www.ruby-forum.com/t/validation-without-saving/121364)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [November 27, 2007, 10:23am UTC](https://www.ruby-forum.com/t/validation-without-saving/121364 "2007-11-27T10:23:43Z")

</div>

One of the things that strikes me as odd about the validations as I understand them to work from AWDWR, is that the validations themselves are only triggered upon a save. I brought this up earlier that I am accustomed…

---

## [How to set a time-limit for mongrel?](https://www.ruby-forum.com/t/how-to-set-a-time-limit-for-mongrel/121298)

<div class="topic-metadata">

**Author:** [@Andreas\_Kappler](https://www.ruby-forum.com/u/Andreas_Kappler)\
**Replies:** 3\
**Last updated:** [November 27, 2007, 8:20am UTC](https://www.ruby-forum.com/t/how-to-set-a-time-limit-for-mongrel/121298 "2007-11-27T08:20:12Z")

</div>

Hi, we have a problem with a small-sized Rails application. It is currently in productive use, and sometimes the customer reports unavailability of the application. Today I could watch one of these occasions live and…

---

## [Opensocial container plugin](https://www.ruby-forum.com/t/opensocial-container-plugin/121356)

<div class="topic-metadata">

**Author:** [@Ryan\_Garver](https://www.ruby-forum.com/u/Ryan_Garver)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 7:43am UTC](https://www.ruby-forum.com/t/opensocial-container-plugin/121356 "2007-11-27T07:43:59Z")

</div>

Since OpenSocial is bound to take over the world, I’ve just released a very early version of my opensocial container plugin. If you are brave, try it out and let me know how it goes. You can check it out here: – R…

---

## [REST: Do I have to use the primary\_key in the path?](https://www.ruby-forum.com/t/rest-do-i-have-to-use-the-primary-key-in-the-path/121328)

<div class="topic-metadata">

**Author:** [@scott](https://www.ruby-forum.com/u/scott)\
**Replies:** 2\
**Last updated:** [November 27, 2007, 5:33am UTC](https://www.ruby-forum.com/t/rest-do-i-have-to-use-the-primary-key-in-the-path/121328 "2007-11-27T05:33:40Z")

</div>

Is there a way to use something other than the an object’s ID in a REST-ful API? For example, if an application stores a collection of plants, can a plant be referenced by the ‘scientific\_name’ rather than the ‘prima…

---

## [Alternate Style of Validations](https://www.ruby-forum.com/t/alternate-style-of-validations/121229)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 10\
**Last updated:** [November 27, 2007, 5:26am UTC](https://www.ruby-forum.com/t/alternate-style-of-validations/121229 "2007-11-27T05:26:37Z")

</div>

I’m not fond of Rails’ style of validation where one rule is followed by many fields. Trying to determine the rules of any one field is rather tedious with this setup. I’d rather have one field, followed by many rule…

---

## [Best Practice/Design: respond\_to in action with only one response type](https://www.ruby-forum.com/t/best-practice-design-respond-to-in-action-with-only-one-response-type/121349)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 1\
**Last updated:** [November 27, 2007, 5:02am UTC](https://www.ruby-forum.com/t/best-practice-design-respond-to-in-action-with-only-one-response-type/121349 "2007-11-27T05:02:06Z")

</div>

Question, if at first my controller is only going to be responding with html templates to requests is it best practice to keep the respond\_to block within each action? respond\_to do |format| format.html end I find …

---

## [Before\_validation attribute modification](https://www.ruby-forum.com/t/before-validation-attribute-modification/121256)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 7\
**Last updated:** [November 27, 2007, 4:09am UTC](https://www.ruby-forum.com/t/before-validation-attribute-modification/121256 "2007-11-27T04:09:25Z")

</div>

I want to strip out embedded separators from a harmonized tariff code before validating it. I thought (naively) that I could do this: class Product \< ActiveRecord::Base validates\_format\_of :hs\_class\_code, :with =\> /…

---

## [Best Practice:: Filling Models With Data](https://www.ruby-forum.com/t/best-practice-filling-models-with-data/121335)

<div class="topic-metadata">

**Author:** [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Replies:** 4\
**Last updated:** [November 27, 2007, 2:29am UTC](https://www.ruby-forum.com/t/best-practice-filling-models-with-data/121335 "2007-11-27T02:29:32Z")

</div>

What is the best way (Rails 2.0) for auto populating your models with data. For example if I have a category table with several types that are pre-defined. What is the best method of auto populating the database dur…

---

## [Virtualization + libvirt (with ruby bindings) + swarm idea (from azureus) to migrate virtual machine](https://www.ruby-forum.com/t/virtualization-libvirt-with-ruby-bindings-swarm-idea-from-azureus-to-migrate-virtual-machine/121342)

<div class="topic-metadata">

**Author:** [@Grabber](https://www.ruby-forum.com/u/Grabber)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 1:42am UTC](https://www.ruby-forum.com/t/virtualization-libvirt-with-ruby-bindings-swarm-idea-from-azureus-to-migrate-virtual-machine/121342 "2007-11-27T01:42:12Z")

</div>

Oh yeah! I’m working on a web interface to manage virtualization tecnologies like xen, kvm and lguest using libvirt connection. I need help! How i can code something like swarm (see azureus bittorrent client screensh…

---

## [Cap 2.1, Rails 1.2.5, rake task, and Dreamhost problem](https://www.ruby-forum.com/t/cap-2-1-rails-1-2-5-rake-task-and-dreamhost-problem/121341)

<div class="topic-metadata">

**Author:** [@ed\_ruder](https://www.ruby-forum.com/u/ed_ruder)\
**Replies:** 0\
**Last updated:** [November 27, 2007, 1:38am UTC](https://www.ruby-forum.com/t/cap-2-1-rails-1-2-5-rake-task-and-dreamhost-problem/121341 "2007-11-27T01:38:42Z")

</div>

\[Cross-posted from the Capistrano group\] I am experiencing a Catch-22 problem: Deploying a simple rails 1.2.5 app on a Dreamhost account. Dreamhost only has Rails 1.2.3 installed, so I’ve installed my own Ruby, r…

---

## [Is notify resevered word?](https://www.ruby-forum.com/t/is-notify-resevered-word/121218)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 4\
**Last updated:** [November 27, 2007, 12:36am UTC](https://www.ruby-forum.com/t/is-notify-resevered-word/121218 "2007-11-27T00:36:07Z")

</div>

Hi, When I added this association… class User \< ActiveRecord::Base has\_one :notify end …and tried then to update column in User table it will call queries for notify table automatic? Output User Columns (0.041488)…

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

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