Module: Jimothy
- Defined in:
- lib/jimothy.rb,
lib/jimothy/engine.rb,
lib/jimothy/version.rb,
app/jobs/jimothy/application_job.rb,
app/models/jimothy/application_record.rb,
app/helpers/jimothy/application_helper.rb,
app/mailers/jimothy/application_mailer.rb,
app/controllers/jimothy/application_controller.rb
Defined Under Namespace
Modules: ApplicationHelper
Classes: ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, Engine
Constant Summary
collapse
- VERSION =
"0.0.011"
Class Method Summary
collapse
Class Method Details
.get_users ⇒ Object
9
10
11
|
# File 'lib/jimothy.rb', line 9
def self.get_users
users = JSON.parse(IO.read("#{GEM_ROOT}/lib/jimothy/the-office-characters.json"))['users']
end
|
.seed_users ⇒ Object
13
14
15
16
17
18
|
# File 'lib/jimothy.rb', line 13
def self.seed_users
users = get_users
users.each do |user|
User.create(name: user['firstname'] + " " + user['lastname'], email: user['email'], image: user['image'])
end
end
|