Sha256: e31429c81940ed2eb86a833336b6055b6aa99cba745e2092157f06401f96b3de
Contents?: true
Size: 1.68 KB
Versions: 9
Compression:
Stored size: 1.68 KB
Contents
require "colorize" module Devise module CustomizeMessage class << self def say msg, options = nil options = case options when Symbol {:color => options} when Hash option end puts msg.colorize(options) if options puts msg if !options end def retrieve_password say %q{Currently Cream only supports a username/password retrieval strategy for :active_record and :mongoid Please help add a strategy for your ORM of choice by adding a FindRecord.#[orm] method to the Cream 'app_generator.rb' file. Thanks! See: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address for how to do it!}, :yellow end def find_record say %Q{Currently Cream only supports generic login strategy for :active_record and :mongoid. Please help add a strategy for your ORM of choice by adding a FindRecord#[name of your orm] method to the Cream 'app_generator.rb' file. How: Add a self#[orm]_find_record method in your User class, make it work, then submit it as a patch to Cream. It should be very simple :) The example for mongoid: ... module FindRecord def self.mongoid #{FindRecord.mongoid} end end See: https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address for how to do it!}, :yellow end def locales_update say %q{ Modify config/locales/en.yml to contain something like: activemodel: attributes: user: login: "Username or email" }, :green end end end end
Version data entries
9 entries across 9 versions & 1 rubygems