module ModelPresenter::Base

Attributes

model[R]

Public Class Methods

included(mod) click to toggle source
# File lib/model_presenter/base.rb, line 12
def self.included(mod)
  mod.extend ForwardFromModel
  mod.extend AsJson
  mod.extend Moneyize
  mod.extend HasMany
end
new(model) click to toggle source
# File lib/model_presenter/base.rb, line 19
def initialize(model)
  @model = model
end

Public Instance Methods

to_json(options={}) click to toggle source
# File lib/model_presenter/base.rb, line 23
def to_json(options={})
  JSON(as_json(options))
end