Skip to content

Commit

Permalink
Add new rake task add_registered_lobbies
Browse files Browse the repository at this point in the history
  • Loading branch information
taitus committed Dec 26, 2017
1 parent 5476159 commit b0d4d15
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/tasks/organizations.rake
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,18 @@ namespace :organizations do
end
end

desc "Add new registered_lobbies to database if they do not exists"
task :add_registered_lobbies => :environment do
registered_lobbies = ['no_record',
'generalitat_catalunya',
'cnmc',
'europe_union',
'others']


registered_lobbies.each do |name|
RegisteredLobby.find_or_create_by(name: name)
end
end

end

0 comments on commit b0d4d15

Please sign in to comment.