Class: Frontyard::ApplicationView

Inherits:
ApplicationComponent show all
Includes:
Phlex::Rails::Helpers::ContentFor
Defined in:
app/components/frontyard/application_view.rb

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#before_template, config, default_config, generate_css_class, #html_options, initialize_with, #namespace, #params, #render_model, #render_table, #view_template

Instance Method Details

#alertObject



22
# File 'app/components/frontyard/application_view.rb', line 22

def alert = flash[:alert]

#errorObject



24
# File 'app/components/frontyard/application_view.rb', line 24

def error = flash[:error]

#noticeObject



20
# File 'app/components/frontyard/application_view.rb', line 20

def notice = flash[:notice]


7
8
9
# File 'app/components/frontyard/application_view.rb', line 7

def page_links(&)
  render PageLinks.new(&)
end

#render_formObject



11
12
13
# File 'app/components/frontyard/application_view.rb', line 11

def render_form(**)
  render namespace::Form.new(**)
end

#render_fragment(namespace: nil) ⇒ Object



15
16
17
18
# File 'app/components/frontyard/application_view.rb', line 15

def render_fragment(namespace: nil, **)
  namespace ||= self.namespace
  render "#{namespace}::Fragment".constantize.new(**)
end