Ruby on Rails Sunday, April 3, 2011

Frederick Cheung wrote in post #990688:
> For what it's worth you can declare any class in any file - however if
> you don't put classes where rails expects to find them then it won't
> be able to magically load them for you

Thanks, i think this answers my question.
So, i need to put
require 'known_ips_controller.rb'
somewhere?
I'll try to figure it out from here.

By the way, if i rename the migration
class CreateKnownIps < ActiveRecord::Migration
to
class CreateKnownIPs < ActiveRecord::Migration
is there a way to make it run with
$ rake db:migrate
?
Where to put
requre "20110402204538_create_known_ips.rb"
in this case?
Well, with migrations it seems more complicated and probably not worth
the efforts anyway.

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

No comments:

Post a Comment