I have just updated rails and added polymorphic associations but they
are not working properly. I''m following the recipe 17 of "Rails
Recipes"
and I''m getting an "Unknown key(s): as" error. These
associations work
properly on the console. The problem occurs when I''m listing the
items... perhaps the problem is pagination. Is this a bug or what should
I do?
Here is the log:
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/hash/keys.rb:48:in
`assert_valid_keys''
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations.rb:438:in
`has_one_without_reflection''
(eval):5:in `has_one''
#{RAILS_ROOT}/app/models/person.rb:4
#{RAILS_ROOT}/app/controllers/company_controller.rb:7:in `list''
-e:3
--
Posted via http://www.ruby-forum.com/.
I think, it is working after all. I had to restart the computer and that was all... perhaps the old sessions were there. I have seen somewhere a script to remove old sessions, does anyone knows that script? Thanks -- Posted via http://www.ruby-forum.com/.
Rath wrote:> I think, it is working after all. I had to restart the computer and that > was all... perhaps the old sessions were there. I have seen somewhere a > script to remove old sessions, does anyone knows that script?I don''t know about a script - from your previous post it appears you are on Windows, so your session files should be in: C:\Documents and Settings\YourUserName\Local Settings\Temp with names of the form: ruby_sess.5e85a819a49ed1c2 ...just delete those files. regards Justin
On 3/23/06, Rath <rathjunk@gmail.com> wrote:> I think, it is working after all. I had to restart the computer and that > was all... perhaps the old sessions were there. I have seen somewhere a > script to remove old sessions, does anyone knows that script? > > ThanksYou have to restart your app when the rails framework has been updated. -- Rick Olson http://techno-weenie.net
Thanks guys It was just that, I restarted my computer and everything worked fine. I tried removing the session files and didn''t work at the begining. Rick Olson wrote:> On 3/23/06, Rath <rathjunk@gmail.com> wrote: >> I think, it is working after all. I had to restart the computer and that >> was all... perhaps the old sessions were there. I have seen somewhere a >> script to remove old sessions, does anyone knows that script? >> >> Thanks > > You have to restart your app when the rails framework has been updated. > > -- > Rick Olson > http://techno-weenie.net-- Posted via http://www.ruby-forum.com/.
Rath wrote:> Thanks guys > > It was just that, I restarted my computer and everything worked fine. I > tried removing the session files and didn''t work at the begining.Which OS are you using? You shouldn''t need to restart the whole machine, just the app... -- Alex