using activeresouce in plugin
Added by tom tomik over 13 years ago
hi, i am new to rails and redmine and i am having trouble using activeresouce in my plugin for redmine.
I have a form with 3 fields on the index page of my plugin, after the information are filled in and sent, i work with them in a controller, but i need to use activeresource... so the beginning of my controller look like this
class AnotherProject < ActiveResource::Base
self.site="http://localhost:3000"
self.user="admin"
self.password="admin"
self.element_name="project"
end
and then in the class of my controller i am using it like that
AnotherProject.find(:all)
it crashes on this line
is it bad to define another class in my controller? should it be somewhere else?