Module: ApplicationHelper

Defined in:
lib/qa-rails.rb

Instance Method Summary collapse

Instance Method Details

#qa_setup(domid, category_id = 1, options = {}) ⇒ Object

Setup QA mini forum

domid - which dom you want to append category_id - board_id

options => function(uid) { return “gravater.com/” + uid + “.png” };



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/qa-rails.rb', line 29

def qa_setup domid, category_id = 1, options = {}
  @qa_options = options
  @qa_options[:domid] = domid
  @qa_options[:category_id] = category_id
  params[:category_id] = category_id

  raise "Your should setup jsfun_user_avatar_url" if not @qa_options[:jsfun_user_avatar_url]
  raise "Your should setup jsfun_user_info" if not @qa_options[:jsfun_user_info]

  render :partial => "qa/qa"
end