# Rails

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

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

---

## [Link\_to\_remote gives a javascript error](https://www.ruby-forum.com/t/link-to-remote-gives-a-javascript-error/171307)

<div class="topic-metadata">

**Author:** [@Colorblind](https://www.ruby-forum.com/u/Colorblind)\
**Replies:** 3\
**Last updated:** [July 1, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/link-to-remote-gives-a-javascript-error/171307 "2009-07-01T18:21:07Z")

</div>

I’m using this code in controller when updating the page: render :update do |page| ... for p in @cat\_photos page \<\< "$('#flyingCats').html($(this).html() + '" + link\_to\_remote(image\_tag(p.image.url(:thumb…

---

## [How to get date\_select to default to unused date?](https://www.ruby-forum.com/t/how-to-get-date-select-to-default-to-unused-date/171054)

<div class="topic-metadata">

**Author:** [@dansinker](https://www.ruby-forum.com/u/dansinker)\
**Replies:** 4\
**Last updated:** [July 1, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/how-to-get-date-select-to-default-to-unused-date/171054 "2009-07-01T16:05:15Z")

</div>

I’ve got a simple form that uses date\_select and I’d love to have it automatically choose the next open date (bonus points: have it skip weekends). How would I do this? Thanks so much! Dan

---

## [How to directly use "app.get" in rake?](https://www.ruby-forum.com/t/how-to-directly-use-app-get-in-rake/171383)

<div class="topic-metadata">

**Author:** [@haoqi](https://www.ruby-forum.com/u/haoqi)\
**Replies:** 2\
**Last updated:** [July 1, 2009, 3:21pm UTC](https://www.ruby-forum.com/t/how-to-directly-use-app-get-in-rake/171383 "2009-07-01T15:21:46Z")

</div>

now I use: echo ‘app.get “/”’|./script/console production and,how to use ‘app.get’ in rake file directly?

---

## [Foreng key, compose keys](https://www.ruby-forum.com/t/foreng-key-compose-keys/171386)

<div class="topic-metadata">

**Author:** [@Augustus\_C](https://www.ruby-forum.com/u/Augustus_C)\
**Replies:** 0\
**Last updated:** [July 1, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/foreng-key-compose-keys/171386 "2009-07-01T14:46:57Z")

</div>

Hi, I have to work with a legade bank (SQLserver) and this bank have many foreng keys and compose keys. I have done it already: rake db:schema:dump. Wath i need to do now? – Horus Augustus C. C. Lima Sagarana Tech …

---

## [Routes.rb -- is it really needed?](https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381)

<div class="topic-metadata">

**Author:** [@awfreeman](https://www.ruby-forum.com/u/awfreeman)\
**Replies:** 2\
**Last updated:** [July 1, 2009, 2:20pm UTC](https://www.ruby-forum.com/t/routes-rb-is-it-really-needed/171381 "2009-07-01T14:20:39Z")

</div>

Has anyone recently thought about just merging routing into the controller? ActiveRecord handles associations very well. It seems like the controller should be able to handle its own associations just as well. Andy …

---

## [ActiveRecord statistics plugin](https://www.ruby-forum.com/t/activerecord-statistics-plugin/169436)

<div class="topic-metadata">

**Author:** [@combas](https://www.ruby-forum.com/u/combas)\
**Replies:** 1\
**Last updated:** [July 1, 2009, 11:45am UTC](https://www.ruby-forum.com/t/activerecord-statistics-plugin/169436 "2009-07-01T11:45:43Z")

</div>

An ActiverRecord plugin that allows you to easily define and pull statistics for AR models. This plugin was built with reporting in mind. Here is a link if anyone is interested:

---

## [Integration of codaslidr in rails](https://www.ruby-forum.com/t/integration-of-codaslidr-in-rails/171374)

<div class="topic-metadata">

**Author:** [@paulie111](https://www.ruby-forum.com/u/paulie111)\
**Replies:** 0\
**Last updated:** [July 1, 2009, 10:13am UTC](https://www.ruby-forum.com/t/integration-of-codaslidr-in-rails/171374 "2009-07-01T10:13:59Z")

</div>

hello all, i am currently dooing an ruby application in which i have to integrate codaslider effect . i have included all necessary js file but i am not getting the desired effect. is anybody tried it before, if so …

---

## [Integration of codaslidr in rails](https://www.ruby-forum.com/t/integration-of-codaslidr-in-rails/171373)

<div class="topic-metadata">

**Author:** [@paulie111](https://www.ruby-forum.com/u/paulie111)\
**Replies:** 0\
**Last updated:** [July 1, 2009, 10:12am UTC](https://www.ruby-forum.com/t/integration-of-codaslidr-in-rails/171373 "2009-07-01T10:12:41Z")

</div>

hello all, i am currently dooing an ruby application in which i have to integrate codaslider effect . i have included all necessary js file but i am not getting the desired effect. can anybody tried it before, if so…

---

## [Association proxy create](https://www.ruby-forum.com/t/association-proxy-create/171355)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 3\
**Last updated:** [July 1, 2009, 8:33am UTC](https://www.ruby-forum.com/t/association-proxy-create/171355 "2009-07-01T08:33:31Z")

</div>

A Feed has many Subscriptions class Feed \< ActiveRecord::Base has\_many :subscriptions end class Subscription \< ActiveRecord::Base belongs\_to :feed, :counter\_cache =\> true belongs\_to :user end This does not work …

---

## [Session or flash](https://www.ruby-forum.com/t/session-or-flash/171365)

<div class="topic-metadata">

**Author:** [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Replies:** 3\
**Last updated:** [July 1, 2009, 7:24am UTC](https://www.ruby-forum.com/t/session-or-flash/171365 "2009-07-01T07:24:56Z")

</div>

Hi everyone, What’s the difference between Flash and Session? Probably the most common use of the flash is to pass error and informational strings from one action to the next. But I wonder why I can’t use session for …

---

## [Rake Plugin Documentation Gives Error](https://www.ruby-forum.com/t/rake-plugin-documentation-gives-error/171368)

<div class="topic-metadata">

**Author:** [@drthingums](https://www.ruby-forum.com/u/drthingums)\
**Replies:** 0\
**Last updated:** [July 1, 2009, 6:35am UTC](https://www.ruby-forum.com/t/rake-plugin-documentation-gives-error/171368 "2009-07-01T06:35:46Z")

</div>

Whenever I try to run rake doc:plugins I get this: You have a nil object when you didn’t expect it! You might have expected an instance of Array. The error occurred while evaluating nil.split I have tried to rake 3 …

---

## [First time problem](https://www.ruby-forum.com/t/first-time-problem/171331)

<div class="topic-metadata">

**Author:** [@Relax\_Man](https://www.ruby-forum.com/u/Relax_Man)\
**Replies:** 2\
**Last updated:** [July 1, 2009, 6:24am UTC](https://www.ruby-forum.com/t/first-time-problem/171331 "2009-07-01T06:24:39Z")

</div>

This is the first time I am Running ruby on rails. When running the “blog” application I got the message “We’re sorry, but something went wrong. We’ve been notified about this issue and we’ll take a look at it shortl…

---

## [Data migration using find\_by\_name](https://www.ruby-forum.com/t/data-migration-using-find-by-name/171364)

<div class="topic-metadata">

**Author:** [@dmht81](https://www.ruby-forum.com/u/dmht81)\
**Replies:** 0\
**Last updated:** [July 1, 2009, 6:23am UTC](https://www.ruby-forum.com/t/data-migration-using-find-by-name/171364 "2009-07-01T06:23:46Z")

</div>

I am trying to set an attribute of a model based on a find\_by\_name search but it will always return the ID of 1. When i run this same search in the console it returns me the correct ID (6) class LoadDefaultUser \< Acti…

---

## [Ajax Date Selector or similar?](https://www.ruby-forum.com/t/ajax-date-selector-or-similar/171345)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 3\
**Last updated:** [July 1, 2009, 12:03am UTC](https://www.ruby-forum.com/t/ajax-date-selector-or-similar/171345 "2009-07-01T00:03:18Z")

</div>

I’ve been trying to find a date picker that works really well with Rails. I’ve looked into the following thus far: jMaki Widget jQuery.datepicker jRails jQuery.datepicker However, none of these provide any informati…

---

## [Installer for web rails app](https://www.ruby-forum.com/t/installer-for-web-rails-app/171347)

<div class="topic-metadata">

**Author:** [@Augustus\_C](https://www.ruby-forum.com/u/Augustus_C)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/installer-for-web-rails-app/171347 "2009-06-30T22:30:52Z")

</div>

Hi, i need to create an installer for flex + rails web app. install app. install server. install bank. Any ideia? – Horus Augustus C. C. Lima Sagarana Tech Mobile +55(85)8842.4402 Desk +55(85)3304.6530 removed\_…

---

## [Rails-authorization-plugin](https://www.ruby-forum.com/t/rails-authorization-plugin/171305)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 5\
**Last updated:** [June 30, 2009, 10:23pm UTC](https://www.ruby-forum.com/t/rails-authorization-plugin/171305 "2009-06-30T22:23:57Z")

</div>

I am sure i have configured the plugin well,but not know how to use it properly. first: set role using has\_role or accept role method. second:permit or permit? methods is used to check or set role? I think they are u…

---

## [Form\_for and saving models](https://www.ruby-forum.com/t/form-for-and-saving-models/171327)

<div class="topic-metadata">

**Author:** [@Jesterman81](https://www.ruby-forum.com/u/Jesterman81)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/form-for-and-saving-models/171327 "2009-06-30T22:05:44Z")

</div>

Greetings Ladies and Gents, I am learning rails and am wondering about a best practice? Currently I am trying to save specific tasks for a project. So tasks has a belongs\_to :project and project does has\_many :tasks…

---

## [Primary\_key / legacy db](https://www.ruby-forum.com/t/primary-key-legacy-db/171332)

<div class="topic-metadata">

**Author:** [@dan](https://www.ruby-forum.com/u/dan)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/primary-key-legacy-db/171332 "2009-06-30T21:38:11Z")

</div>

Hi, I am forced to use an old database with rails. Relevant db structure; mysql\> select id,permission,incid from acl group by id; ±—±-----------±------+ | id | permission | incid | ±—±-----------±------+ | 1 | …

---

## [Using rails for testing a non-Rails web app](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266)

<div class="topic-metadata">

**Author:** [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Replies:** 4\
**Last updated:** [June 30, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/using-rails-for-testing-a-non-rails-web-app/171266 "2009-06-30T21:34:41Z")

</div>

I have a question…right now I work at a place where we have implemented an automated test framework in Ruby-Watir-RSpec. The application is a Java-based web application. My question is…is there any value to setting …

---

## [Nested Forms adding \[-\]](https://www.ruby-forum.com/t/nested-forms-adding/171344)

<div class="topic-metadata">

**Author:** [@Bob\_O](https://www.ruby-forum.com/u/Bob_O)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/nested-forms-adding/171344 "2009-06-30T21:32:55Z")

</div>

Im stumped. I followed Ryan B. screencast 73 and had this working the other day for an assets model. Today im trying to implement the same thing for a case\_study model that belongs\_to :services. MODEL: CaseStudy belo…

---

## [\[ANN\] Last Day for 50% Off Aloha on Rails Conference Registration](https://www.ruby-forum.com/t/ann-last-day-for-50-off-aloha-on-rails-conference-registration/171343)

<div class="topic-metadata">

**Author:** [@seth](https://www.ruby-forum.com/u/seth)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 9:22pm UTC](https://www.ruby-forum.com/t/ann-last-day-for-50-off-aloha-on-rails-conference-registration/171343 "2009-06-30T21:22:58Z")

</div>

Aloha, Today, June 30th, is the last day for 50% Off conference registration for Aloha on Rails, the Hawaii Ruby on Rails conference. Held in Waikiki, Oct 4-6, 2009, Aloha on Rails is the premier destination event f…

---

## [Controller.controller\_ name](https://www.ruby-forum.com/t/controller-controller-name/171337)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/controller-controller-name/171337 "2009-06-30T20:53:07Z")

</div>

hey guys really got stuck and i guess this is the place where i can get a solution. I want to retrieve the controller name in a layout so i am using the following command controller.controller\_ name But what if i hav…

---

## [Create without triggering callbacks?](https://www.ruby-forum.com/t/create-without-triggering-callbacks/171321)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 7\
**Last updated:** [June 30, 2009, 8:43pm UTC](https://www.ruby-forum.com/t/create-without-triggering-callbacks/171321 "2009-06-30T20:43:45Z")

</div>

Is there a way to do ModelName.create without triggering the various callbacks that would normally be triggered? I’m in an rspec test and want to save a model without worrying about the callback stuff. thanks max

---

## [Search month](https://www.ruby-forum.com/t/search-month/171330)

<div class="topic-metadata">

**Author:** [@Marcos\_Vinicius\_Sch](https://www.ruby-forum.com/u/Marcos_Vinicius_Sch)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/search-month/171330 "2009-06-30T19:39:52Z")

</div>

HI , help fetch only the same one controller: def mes @data = Date.today if params\[:mes\] @ordems = Ordem.find(:all,:limit =\> 10, :conditions =\> \[‘MONTH (data)= ?’, params\[:mes\]\]) view: Selecione o mes \<% form\_ta…

---

## [Multiple models in one form concurrency problem](https://www.ruby-forum.com/t/multiple-models-in-one-form-concurrency-problem/171324)

<div class="topic-metadata">

**Author:** [@ben](https://www.ruby-forum.com/u/ben)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/multiple-models-in-one-form-concurrency-problem/171324 "2009-06-30T18:52:19Z")

</div>

I’m using the Advanced Rails recipe ‘Handle multiple models in one form’ and everything works as expected until I start concurrency testing. For example I have a Task model and a Server model where a task can have mu…

---

## [Prototype Event.observe doesn't work in partial](https://www.ruby-forum.com/t/prototype-event-observe-doesnt-work-in-partial/171309)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/prototype-event-observe-doesnt-work-in-partial/171309 "2009-06-30T16:56:29Z")

</div>

Dear all I encountered a problem to generate a zebra stripe table. My program is no problem when the page is first load. But after the form\_remote\_tag submitted, the prototype script could not addClassName to the new …

---

## [Announcing Rails application for distributed Social Networking](https://www.ruby-forum.com/t/announcing-rails-application-for-distributed-social-networking/171306)

<div class="topic-metadata">

**Author:** [@vikrant](https://www.ruby-forum.com/u/vikrant)\
**Replies:** 1\
**Last updated:** [June 30, 2009, 4:53pm UTC](https://www.ruby-forum.com/t/announcing-rails-application-for-distributed-social-networking/171306 "2009-06-30T16:53:33Z")

</div>

Hi, I’ve been writing a set of standards and its reference implementation in Rails about distributed social networking. I hope that publishing a post in this group might help in spreading the word at initial stage. I…

---

## [Invalid source reflection macro?](https://www.ruby-forum.com/t/invalid-source-reflection-macro/171217)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 5\
**Last updated:** [June 30, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/invalid-source-reflection-macro/171217 "2009-06-30T16:47:06Z")

</div>

I’m trying to model a somewhat complicated genetic relationship in Rails. class Gene \< ActiveRecord::Base belongs\_to :species, :foreign\_key =\> “species\_id”, :class\_name =\> “Species” has\_many :genes\_orthogroups, :cla…

---

## [Order for a each loop](https://www.ruby-forum.com/t/order-for-a-each-loop/171277)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 4\
**Last updated:** [June 30, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/order-for-a-each-loop/171277 "2009-06-30T16:35:32Z")

</div>

I have a model for users and another model for linenumbers and I have some code that looks like: @user.linenumbers.each do |line| end and it loops through a user and their line numbers. What if I want to order this …

---

## [Problem In Rails + Urgent](https://www.ruby-forum.com/t/problem-in-rails-urgent/171314)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 0\
**Last updated:** [June 30, 2009, 3:53pm UTC](https://www.ruby-forum.com/t/problem-in-rails-urgent/171314 "2009-06-30T15:53:04Z")

</div>

Hello Champs … Once again seeking for u people … Actually, the thing is:- I am facing problem with Opera web browser. Under Opera I have exception as “ActionController::InvalidAuthenticityToken”. Under Firefox, Chr…

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

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