Class: Ditty::ComponentController
Instance Method Summary
collapse
#find_template, #view_folders
Instance Method Details
#read(id) ⇒ Object
18
19
20
|
# File 'lib/ditty/controllers/component_controller.rb', line 18
def read(id)
dataset.with_pk(id)
end
|
#read!(id) ⇒ Object
22
23
24
25
|
# File 'lib/ditty/controllers/component_controller.rb', line 22
def read!(id)
halt 404 unless (entity = read(id))
entity
end
|
#skip_verify! ⇒ Object
27
28
29
|
# File 'lib/ditty/controllers/component_controller.rb', line 27
def skip_verify!
@skip_verify = true
end
|
#trigger(event, attribs = {}) ⇒ Object
31
32
33
34
35
|
# File 'lib/ditty/controllers/component_controller.rb', line 31
def trigger(event, attribs = {})
attribs[:target] ||= self
send(event, attribs) if respond_to? event
broadcast(event, attribs)
end
|