I am developing a rubygem specifically for Rails applications and I want to add a controller from my gem so that it will be available on the Rails app(Similar to what devise does with RegistrationsController, SessionsController).
On the gem side:
I've tried adding the following app/controllers/samples_controller.rb
class SamplesController < ApplicationController
def index
.
.
end
end
And then on my rails routes add it either as:
match 'route' => 'samples#index'
or
resources :samples
Clearly I got something wrong over there but I have no idea what is it? Do I need to explicitly require my SampleController somewhere or an initializer on the app?
Right now I am getting this error when accessing the route
uninitialized constant SamplesController
Thanks :)