Module: Anubis::Core::Data::Callbacks
- Defined in:
- app/controllers/anoubis/core/data/callbacks.rb
Overview
Module presents all callbacks called in actions.
Instance Method Summary collapse
-
#after_create_data ⇒ Object
Fires after data was was created on the server and placed in self.output.data array.
-
#after_get_table_data ⇒ Object
Fires after data was received from server and placed in self.output.data array.
-
#after_update_data ⇒ Object
Fires after data was was updated on the server and placed in self.output.data array.
-
#around_output(data) ⇒ Object
Fires when data output to json value.
-
#before_create_data(data) ⇒ Hash
Fires after data was was created in self.output.data array and before it saved to server.
-
#before_output ⇒ Object
Fires right before output data to screen.
-
#before_update_data(data) ⇒ Hash
Fires before data will be verified and converted.
-
#destroy_data ⇒ Object
Fires when data is destroyed.
Instance Method Details
#after_create_data ⇒ Object
Fires after data was was created on the server and placed in self.output.data array. It's rewrote for change data before output.
41 42 43 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 41 def after_create_data end |
#after_get_table_data ⇒ Object
Fires after data was received from server and placed in self.output.data array. It's rewrote for change data before output.
10 11 12 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 10 def after_get_table_data end |
#after_update_data ⇒ Object
Fires after data was was updated on the server and placed in self.output.data array. It's rewrote for change data before output.
25 26 27 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 25 def after_update_data end |
#around_output(data) ⇒ Object
Fires when data output to json value
53 54 55 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 53 def around_output(data) data end |
#before_create_data(data) ⇒ Hash
Fires after data was was created in self.output.data array and before it saved to server. It's rewrote for change data before output.
34 35 36 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 34 def before_create_data(data) data end |
#before_output ⇒ Object
Fires right before output data to screen
47 48 49 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 47 def before_output end |
#before_update_data(data) ⇒ Hash
Fires before data will be verified and converted.
18 19 20 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 18 def before_update_data(data) data end |
#destroy_data ⇒ Object
Fires when data is destroyed
59 60 61 62 63 64 |
# File 'app/controllers/anoubis/core/data/callbacks.rb', line 59 def destroy_data if !self.etc.data.data.destroy self.output.errors.concat self.etc.data.data.errors. self.output.result = -4 end end |