Sha256: 852b8e348f7f663f6e2139f7d741e21f2d7ac7aec970414371776c2e617113da

Contents?: true

Size: 484 Bytes

Versions: 11

Compression:

Stored size: 484 Bytes

Contents

class ModelController
  def initialize(model=nil)
    @model = model
  end
  
  def page
    $page.page
  end

  def store
    $page.store
  end

  def params
    $page.params 
  end

  def url
    $page.url 
  end
  
  def channel
    $page.channel
  end
  
  def tasks
    $page.tasks
  end
  
  def controller
    @controller ||= ReactiveValue.new(Model.new)
  end

  def method_missing(method_name, *args, &block)
    return @model.send(method_name, *args, &block)      
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
volt-0.4.9 lib/volt/controllers/model_controller.rb
volt-0.4.8 lib/volt/controllers/model_controller.rb
volt-0.4.7 lib/volt/controllers/model_controller.rb
volt-0.4.5 lib/volt/controllers/model_controller.rb
volt-0.4.4 lib/volt/controllers/model_controller.rb
volt-0.4.3 lib/volt/controllers/model_controller.rb
volt-0.4.2 lib/volt/controllers/model_controller.rb
volt-0.4.1 lib/volt/controllers/model_controller.rb
volt-0.4.0 lib/volt/controllers/model_controller.rb
volt-0.3.9 lib/volt/controllers/model_controller.rb
volt-0.3.8 lib/volt/controllers/model_controller.rb