app/models/bit_player/navigator.rb in bit_player-0.3.0 vs app/models/bit_player/navigator.rb in bit_player-0.4.0

- old
+ new

@@ -1,5 +1,7 @@ +require "bit_core" + module BitPlayer # Business rules for proceeding statefully through an application. class Navigator RenderOptions = Struct.new( :view_context, :app_context, :position, :participant @@ -55,11 +57,11 @@ def initialize_context(context) @status.initialize_context(context) end def initialize_location(options) - content_module = ContentModule.find(options[:module_id]) + content_module = BitCore::ContentModule.find(options[:module_id]) @status.context = content_module.tool.title @status.module_position = content_module.position @status.provider_position = 1 if options[:provider_id] @status.provider_position = content_module.content_providers @@ -71,18 +73,18 @@ def current_module @current_module ||= nil module_attrs = { - bit_player_tool_id: Tool.find_by_title(context).try(:id), + bit_core_tool_id: BitCore::Tool.find_by_title(context).try(:id), position: module_position } if current_module_stale? - @current_module = ContentModule.where(module_attrs).first + @current_module = BitCore::ContentModule.where(module_attrs).first end - @current_module ||= ContentModule.new(module_attrs) + @current_module ||= BitCore::ContentModule.new(module_attrs) end private def current_module_stale?