naming conventions - Rails Load Class With Unconventional Folder Name -
i have module want call oauth , class inside called accesstoken. in rails want put in app/models/o_auth/access_token.rb
. how can load path app/models/oauth/access_token.rb
?
add require 'app/models/o_auth/access_token'
@ top of application.rb
, , @ top of other model uses it. you'd have every model, without ror's "convention on configuration" ideal, , magic importer.
Comments
Post a Comment