Class: AdminAssistant::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/admin_assistant/column.rb

Defined Under Namespace

Modules: FormViewMethods, IndexViewMethods, SearchViewMethods, ShowViewMethods, SimpleColumnSearchViewMethods Classes: FormView, IndexView, SearchView, ShowView, View

Instance Method Summary collapse

Instance Method Details

#form_view(action_view, admin_assistant, opts = {}) ⇒ Object



3
4
5
# File 'lib/admin_assistant/column.rb', line 3

def form_view(action_view, admin_assistant, opts = {})
  view 'FormView', action_view, admin_assistant, opts
end

#index_view(action_view, admin_assistant, opts = {}) ⇒ Object



7
8
9
# File 'lib/admin_assistant/column.rb', line 7

def index_view(action_view, admin_assistant, opts = {})
  view 'IndexView', action_view, admin_assistant, opts
end

#search_view(action_view, admin_assistant, opts = {}) ⇒ Object



11
12
13
# File 'lib/admin_assistant/column.rb', line 11

def search_view(action_view, admin_assistant, opts = {})
  view 'SearchView', action_view, admin_assistant, opts
end

#show_view(action_view, admin_assistant, opts = {}) ⇒ Object



15
16
17
# File 'lib/admin_assistant/column.rb', line 15

def show_view(action_view, admin_assistant, opts = {})
  view 'ShowView', action_view, admin_assistant, opts
end

#verify_for_searchObject



19
20
21
# File 'lib/admin_assistant/column.rb', line 19

def verify_for_search
  # nothing here, maybe implemented in subclasses
end

#view(view_class_name, action_view, admin_assistant, opts) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/admin_assistant/column.rb', line 23

def view(view_class_name, action_view, admin_assistant, opts)
  klass = begin
    self.class.const_get view_class_name
  rescue NameError
    AdminAssistant::Column.const_get view_class_name
  end
  klass.new self, action_view, admin_assistant, opts
end