|# The following comments fill some of the gaps in Solargraph's understanding of|
|# Rails apps. Since they're all in YARD, they get mapped in Solargraph but|
|# ignored at runtime.|
|# You can put this file anywhere in the project, as long as it gets included in|
|# the workspace maps. It's recommended that you keep it in a standalone file|
|# instead of pasting it into an existing one.|
|# class ActionController::Base|
|expect(@user).to have(1).error_on(:username) # Checks whether there is an error in username|
|expect(@user.errors[:username]).to include("can't be blank") # check for the error message|
forked from https://gist.github.com/chetan/1827484 which is from early 2012 and contains outdated information.
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
How to delete Sidekiq jobs in a Rails app using ActiveJobs
Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.
job_id and jid
When using ActiveJobs, Rails will return a
job_id after sending the job to ActiveJobs
job = UserMailer.send_invite(params).deliver_later
Converting a Word Document to Markdown in One Move
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
On a mac you can use homebrew by running the command
brew install pandoc.