Module: CamelTrail::Config
- Defined in:
- lib/camel_trail/config.rb
Class Method Summary collapse
-
.config(&block) ⇒ Object
Allows to set configurion for CamelTrail.
-
.current_session_user_id(&block) ⇒ Object
Sets ‘current_session_user_id` to include user info in `camel_trail_histories` table.
-
.table_name_prefix(value) ⇒ Object
Optionally set ‘table_name_prefix` to customize default table name.
Class Method Details
.config(&block) ⇒ Object
Allows to set configurion for CamelTrail
14 15 16 |
# File 'lib/camel_trail/config.rb', line 14 def config(&block) class_eval(&block) end |
.current_session_user_id(&block) ⇒ Object
Sets ‘current_session_user_id` to include user info in `camel_trail_histories` table.
25 26 27 28 |
# File 'lib/camel_trail/config.rb', line 25 def current_session_user_id(&block) @current_session_user_id = block if block @current_session_user_id end |
.table_name_prefix(value) ⇒ Object
Optionally set ‘table_name_prefix` to customize default table name. Defaults to `camel_trail_histories`
20 21 22 |
# File 'lib/camel_trail/config.rb', line 20 def table_name_prefix(value) CamelTrail.table_name_prefix = value end |