Class: RailsWorkflow::ContextDecorator

Inherits:
Draper::Decorator
  • Object
show all
Defined in:
app/decorators/rails_workflow/context_decorator.rb

Instance Method Summary collapse

Instance Method Details

#dataObject



8
9
10
11
12
13
14
15
# File 'app/decorators/rails_workflow/context_decorator.rb', line 8

def data
  if object.present?
    object.prepare_data object.data
  else
    {}
  end

end

#partial_nameObject



4
5
6
# File 'app/decorators/rails_workflow/context_decorator.rb', line 4

def partial_name
  object.parent.template.partial_name.presence || "application/context"
end