module KirguduBase module SystemPrepare def self.prepare result = false ActiveRecord::Base.transaction do user = ::KirguduBase::Security::User.create_system_user('system@kirgudu.net') if user.valid? ::KirguduBase::Security::LoginProvider.create_system_provider('Facebook Login', 'facebook', user) ::KirguduBase::Security::LoginProvider.create_system_provider('Twitter Login', 'twitter', user) ::KirguduBase::Security::LoginProvider.create_system_provider('Google Login', 'google', user) ::KirguduBase::Security::LoginProvider.create_system_provider('VKontakte Login', 'google', user) end end result end end end