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 your case you have to play with:
1) rename table name "known_ips" to "known_ip_addresses" you are picky :)
2) set_table_name "known_ip_addresses" to a KnownIP class.
3) file name "known_ip" you can leave as is.

On 17.08.2011, at 16:01, Alexey Muranov wrote:

> Hello, i have a problem with autoloading model classes.
> I have had similar problems before when a file's name in Rails' opinion
> did not match with the name of the class defined inside, but eventually
> everything worked, so i didn't look into details.
> This time the problem comes from running Unit Tests and does not want to
> go away.
> 
> 

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to