test/dummy/config/initializers/kblog_init.rb in kblog-0.0.2 vs test/dummy/config/initializers/kblog_init.rb in kblog-0.0.3

- old
+ new

@@ -1,24 +1,31 @@ -ActiveSupport.on_load :action_controller do - helper Kblog::ArticlesHelper -end +# some initialization for kblog -# select either section basic or role-based authentication + +Kblog.blog_title = "A new KBlog is born" +Kblog.user_class = 'User' # class of blog-author + +# select EITHER section basic or role-based authentication # -######################################################### -# role-based rights to create/alter blog-articles # -######################################################### +####################################################### +# role-based rights to create/alter blog-articles # +# user_class must respond_to :roles - and each role # +# string representation role.to_s == Kblog.auth_role # +####################################################### + Kblog.auth_type = 'role' Kblog.auth_role = 'blogger' # role needed to alter blogs -Kblog.user_class = 'User' # class of blog-author ######################################################### # http-basic-auth # ######################################################### -#Kblog.auth_type == 'basic' +#Kblog.auth_type = 'basic' #Kblog.authname = 'blogger' #Kblog.authpassword = 'changeme' +ActiveSupport.on_load :action_controller do + helper Kblog::ArticlesHelper +end + require 'RedCloth' require 'will_paginate' -