class Amatista::BaseView

Overview

Set of methods to reduce the steps to display a view It needs a LayoutView class that works as a layout view. The views should be placed in app/views folder.

Included Modules

Defined in:

amatista/view/base_view.cr

Class Method Summary

Instance Method Summary

Macro Summary

Instance methods inherited from module Amatista::Flash

get_flash(key) get_flash, set_flash(key, value) set_flash

Instance methods inherited from module Amatista::Sessions

get_session(key) get_session, has_session? has_session?, remove_session(key) remove_session, send_sessions_to_cookie send_sessions_to_cookie, set_session(key, value) set_session

Instance methods inherited from module Amatista::ViewTag

check_box_tag(object_name, method, value = "1", checked = false, raw_options = [] of Hash(Symbol, String)) check_box_tag, content_tag(tag, value, raw_options = [] of Hash(Symbol, String)) content_tag, form_tag(url, method = "post", raw_options = [] of Hash(Symbol, String), &block) form_tag, hidden_tag(object_name, method, value, raw_options = [] of Hash(Symbol, String)) hidden_tag, label_tag(name, value, raw_options = [] of Hash(Symbol, String)) label_tag, link_to(name, url, raw_options = [] of Hash(Symbol, String)) link_to, password_field(object_name, method, raw_options = [] of Hash(Symbol, String)) password_field, radio_button_tag(object_name, method, value = "1", checked = false, raw_options = [] of Hash(Symbol, String)) radio_button_tag, select_tag(object_name, method, collection, raw_options = [] of Hash(Symbol, String)) select_tag, submit_tag(value = "Save", raw_options = [] of Hash(Symbol, String)) submit_tag, text_field(object_name, method, raw_options = [] of Hash(Symbol, String)) text_field

Class Method Detail

def self.new(arguments = nil) #

[View source]

Instance Method Detail

def set_view #

compiles the view with data in a string format


[View source]

Macro Detail

macro set_ecr(view_name, path = "src/views") #

[View source]