Module: Zena::Use::Rendering::ZafuMethods

Defined in:
lib/zena/use/rendering.rb

Overview

ControllerMethods

Instance Method Summary collapse

Instance Method Details

#r_headersObject



291
292
293
294
295
296
297
298
299
300
301
# File 'lib/zena/use/rendering.rb', line 291

def r_headers
  headers = []
  @params.each do |k, v|
    headers << "#{k.to_s.inspect} => #{RubyLess.translate_string(self, v)}"
  end
  if headers.empty?
    out ""
  else
    out "<% set_headers(#{headers.join(', ')}) %>"
  end
end

#r_not_foundObject



308
309
310
# File 'lib/zena/use/rendering.rb', line 308

def r_not_found
  out "<% raise ActiveRecord::RecordNotFound %>"
end

#r_styleObject



303
304
305
306
# File 'lib/zena/use/rendering.rb', line 303

def r_style
  @markup.tag = 'style'
  expand_with
end