Looked into other people's plugins code in Discourse to see how to inject a controller into the app from our plugin.
Pulled Kaja's download branch to check the code that should render the JSON defined in the script but it didn't work. Looked into fixing the uninitialized constant, but I found a lot of new code and decided to create a different branch with a simpler approach prescinding of Engines.
Got the JSON rendered in the browser doing the following:
Created a controller with pluralised name (downloaders controller.rb), with a show action that initialises the DriveDownloader, calls the method that generates the json and renders it.
Loaded the controller file in the after_initialize method in plugin.rb
Appended a GET route in plugin.rb for
Got the new task from our mentor: tried to create a new action that enqueues a Job but I don't know how to debug or test if it's correct. Spent hours that led to nothing on this.
Started the Code School Rspec course.
You must be logged in to add a comment.