Class: Xhive::StylesheetCell

Inherits:
BaseCell
  • Object
show all
Defined in:
app/cells/xhive/stylesheet_cell.rb

Instance Method Summary collapse

Methods inherited from BaseCell

render_action

Instance Method Details

#inline(params) ⇒ Object



3
4
5
6
7
# File 'app/cells/xhive/stylesheet_cell.rb', line 3

def inline(params)
  site = params[:site].present? ? Xhive::Site.find(params[:site]) : Xhive::Site.first
  stylesheet = site.stylesheets.find(params[:id])
  "<style type='text/css'>#{stylesheet.presenter.compressed}</style>"
end