Module Rabl::Partials
In: lib/rabl/partials.rb

Methods

Included Modules

Rabl::Helpers

Public Instance methods

Returns source for a given relative file fetch_source("show", :view_path => "…") => "…contents…"

Returns a hash based representation of any data object given ejs template block object_to_hash(@user) { attribute :full_name } => { … } object_to_hash(@user, :source => "…") { attribute :full_name } => { … } object_to_hash([@user], :source => "…") { attribute :full_name } => { … } options must have :source (rabl file contents) options can have :source_location (source filename)

Renders a partial hash based on another rabl template partial("users/show", :object => @user) options must have :object options can have :view_path, :child_root, :root

[Validate]