Class: TinyAdmin::Views::BasicLayout

Inherits:
Phlex::HTML
  • Object
show all
Includes:
Utils
Defined in:
lib/tiny_admin/views/basic_layout.rb

Direct Known Subclasses

DefaultLayout

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#humanize, #params_to_s, #prepare_page, #to_class

Instance Attribute Details

#contentObject

Returns the value of attribute content.



8
9
10
# File 'lib/tiny_admin/views/basic_layout.rb', line 8

def content
  @content
end

#paramsObject

Returns the value of attribute params.



8
9
10
# File 'lib/tiny_admin/views/basic_layout.rb', line 8

def params
  @params
end

#widgetsObject

Returns the value of attribute widgets.



8
9
10
# File 'lib/tiny_admin/views/basic_layout.rb', line 8

def widgets
  @widgets
end

Instance Method Details

#label_for(value, options: []) ⇒ Object



10
11
12
# File 'lib/tiny_admin/views/basic_layout.rb', line 10

def label_for(value, options: [])
  TinyAdmin.settings.helper_class.label_for(value, options: options)
end

#update_attributes(attributes) ⇒ Object



14
15
16
17
18
# File 'lib/tiny_admin/views/basic_layout.rb', line 14

def update_attributes(attributes)
  attributes.each do |key, value|
    send("#{key}=", value)
  end
end