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