Sha256: d29dfced6759f538c1b7f6f68c5f78dc51cb2ae87e36c4b6e0549d4ca834737d

Contents?: true

Size: 481 Bytes

Versions: 16

Compression:

Stored size: 481 Bytes

Contents

# desc "Explaining what the task does"
# task :optimacms do
#   # Task goes here
# end


namespace :optimacms do
  desc "Set admin password or create a new admin user"
  task :create_admin_user, [:email, :password] => :environment do |t, args|
    email = args[:email]
    row = Optimacms::CmsAdminUser.where(email: email).first || Optimacms::CmsAdminUser.new(email: email)
    row.password = args[:password]
    row.password_confirmation = args[:password]

    row.save
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
optimacms-0.3.2 lib/tasks/optimacms_tasks.rake
optimacms-0.3.1 lib/tasks/optimacms_tasks.rake
optimacms-0.2.23 lib/tasks/optimacms_tasks.rake
optimacms-0.2.22 lib/tasks/optimacms_tasks.rake
optimacms-0.2.21 lib/tasks/optimacms_tasks.rake
optimacms-0.2.20 lib/tasks/optimacms_tasks.rake
optimacms-0.2.19 lib/tasks/optimacms_tasks.rake
optimacms-0.2.18 lib/tasks/optimacms_tasks.rake
optimacms-0.2.17 lib/tasks/optimacms_tasks.rake
optimacms-0.2.16 lib/tasks/optimacms_tasks.rake
optimacms-0.2.15 lib/tasks/optimacms_tasks.rake
optimacms-0.2.14 lib/tasks/optimacms_tasks.rake
optimacms-0.2.13 lib/tasks/optimacms_tasks.rake
optimacms-0.2.12 lib/tasks/optimacms_tasks.rake
optimacms-0.2.11 lib/tasks/optimacms_tasks.rake
optimacms-0.2.9 lib/tasks/optimacms_tasks.rake