This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name 'edit_accredited_body' | |
summary 'Edit accredited bodies on courses directly in the DB' | |
usage 'edit_accredited_body <provider_code>' | |
param :provider_code, transform: ->(code) { code.upcase } | |
class EditAccreditedBody | |
attr_reader :cli | |
attr_reader :provider | |
def initialize(provider) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name 'assign_to_courses' | |
summary 'Assign a new site to multiple courses in db' | |
usage 'assign_to_courses <provider_code> <site_code<' | |
param :provider_code, transform: ->(code) { code.upcase } | |
param :site_code, transform: ->(code) { code.upcase } | |
run do |opts, args, _cmd| | |
MCB.init_rails(opts) | |
provider = Provider.find_by!(provider_code: args[:provider_code]) |
OlderNewer