module Familiarity module ApplicationHelper def familiaritySwitchBoard(options={}) _options= { position: 'bottomLeft' # Options are, topLeft, topRight, bottomRight, bottomLeft }.merge(options) content_tag('script') do # raw "$(document).on(\"page:change\", function () {FamiliarityAdmin.familiaritySwitchBoard(#{_options.to_json});});" raw "FamiliarityAdmin.familiaritySwitchBoard(#{_options.to_json});" end end def familiarityView(options={}) _options= { escape_to_exit: true, f1_to_start: true, show_tips_recursively: false, mandatory_all_tips: true, traverse_back: true, remember_duration: 30 #In Days }.merge(options) content_tag('script') do raw <