[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-18 Thread Alexey Muranov
I couldn't make it work with Admin:: namespace and submitted a bug report: https://github.com/rails/rails/issues/2572 Please comment. Alexey. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.

[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-17 Thread Alexey Muranov
I am sorry, i have cheated. I tried with a new application, and in the described above case there were no errors, i only had to add set_fixture_class :known_ips => KnownIP AFTER `fixtures :all` in `test_helper.rb` In my application, however, the class actually is `Admin::KnownIP`, and add

[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-17 Thread Alexey Muranov
I have advanced a bit: the error does not show up if i comment out fixtures :all in test_helper.rb and do not run known_ip_test.rb. I need to find out now how to load the known_ips.yml fixture and known_ip.rb class definition without complains from rails... -- Posted via http://www.ruby-forum

[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-17 Thread Alexey Muranov
Valery Kvon wrote in post #1017132: > If I'm not mistaking, Rails in any case when found file name(.rb) named > (passing .tableize method) as a table name, it accepts that file as a > model file and seeking the class according to a convention(!) passing > .classify.constantize chunk of methods. In

[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-17 Thread Alexey Muranov
I should probably add that adding explicit "require" or "load" did not help. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.c

[Rails] Re: autoloading LoadError: Expected known_ip.rb to define KnownIp

2011-08-17 Thread Alexey Muranov
I've found a recent similar question on StackOverflow: http://stackoverflow.com/questions/7081782/inconsistent-loaderror-behavior-with-lib-namespacing-autoloading/7093083 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Rub