her
her copied to clipboard
include Her::Model not working
Maybe I'm making a stupid mistake, but I can't figure out yet.
I'm trying to connect with an api, my config/initializers/her.rb looks like:
Her::API.setup url: "http://localhost:3000/myapi/" do |c|
Request
c.use Faraday::Request::UrlEncoded
Response
c.use Her::Middleware::DefaultParseJSON
Adapter
c.use Faraday::Adapter::NetHttp end
and my model looks like
class Set include Her::Model
end
But when I try inside rails console to use Set.find I receive "NoMethodError: undefined method `find' for Set:Class"
any clue?
It looks like everything is setup properly. Is your code open source somewhere to look at?
Any chance Set is having some sort of collision with Ruby's Set? http://www.ruby-doc.org/stdlib-1.9.3/libdoc/set/rdoc/Set.html
@annacruz I think @moofish32 is right about this. You should namespace it differently. Could you close the issue if this is the case?
True