Sha256: 324219da3b946cde969eea8151601ccb288e388c4091b1acae83d4c0b91a3c4a

Contents?: true

Size: 1.21 KB

Versions: 20

Compression:

Stored size: 1.21 KB

Contents

module MyForum
  class Engine < ::Rails::Engine
    isolate_namespace MyForum

    require 'jquery-rails'
    require 'bootstrap-sass'

    config.after_initialize do
      ActionView::Base.sanitized_allowed_tags = %w(strong em a img br p i pre div span iframe)
      ActionView::Base.sanitized_allowed_attributes = %w(href title class src width height)
    end

    config.generators do |g|
      g.test_framework      :rspec,        :fixture => false
      g.assets false
      g.helper false
    end

    USE_CUSTOM_USER_MODEL       = false
    CUSTOM_USER_CLASS           = 'User'
    CUSTOM_USER_LOGIN_ATTR      = 'login'
    CUSTOM_USER_PASSWORD_ATTR   = 'password'
    CUSTOM_AUTHENTICATE_METHOD  = 'users#authenticate'

    attr_accessor :use_custom_user_model, :custom_user_class, :custom_user_login_attr, :custom_user_password_attr,
                  :custom_authenticate_method

    def initialize
      self.use_custom_user_model      = USE_CUSTOM_USER_MODEL
      self.custom_user_class          = CUSTOM_USER_CLASS
      self.custom_user_login_attr     = CUSTOM_USER_LOGIN_ATTR
      self.custom_user_password_attr  = CUSTOM_USER_PASSWORD_ATTR
      self.custom_authenticate_method = CUSTOM_AUTHENTICATE_METHOD
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
my_forum-0.0.1.beta52 lib/my_forum/engine.rb
my_forum-0.0.1.beta51 lib/my_forum/engine.rb
my_forum-0.0.1.beta50 lib/my_forum/engine.rb
my_forum-0.0.1.beta49 lib/my_forum/engine.rb
my_forum-0.0.1.beta48 lib/my_forum/engine.rb
my_forum-0.0.1.beta47 lib/my_forum/engine.rb
my_forum-0.0.1.beta46 lib/my_forum/engine.rb
my_forum-0.0.1.beta45 lib/my_forum/engine.rb
my_forum-0.0.1.beta44 lib/my_forum/engine.rb
my_forum-0.0.1.beta43 lib/my_forum/engine.rb
my_forum-0.0.1.beta42 lib/my_forum/engine.rb
my_forum-0.0.1.beta41 lib/my_forum/engine.rb
my_forum-0.0.1.beta40 lib/my_forum/engine.rb
my_forum-0.0.1.beta39 lib/my_forum/engine.rb
my_forum-0.0.1.beta38 lib/my_forum/engine.rb
my_forum-0.0.1.beta37 lib/my_forum/engine.rb
my_forum-0.0.1.beta36 lib/my_forum/engine.rb
my_forum-0.0.1.beta35 lib/my_forum/engine.rb
my_forum-0.0.1.beta34 lib/my_forum/engine.rb
my_forum-0.0.1.beta33 lib/my_forum/engine.rb