Class: Caboose::ChangeLogsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Caboose::ChangeLogsController
- Defined in:
- app/controllers/caboose/change_logs_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#add_ga_event, #admin_add, #admin_bulk_add, #admin_bulk_delete, #admin_bulk_update, #admin_delete, #admin_edit, #admin_json, #admin_json_single, #admin_update, #before_action, #before_before_action, #hashify_query_string, #init_cart, #logged_in?, #logged_in_user, #login_user, #logout_user, #parse_url_params, #reject_param, #under_construction_or_forwarding_domain?, #user_is_allowed, #user_is_allowed_to, #validate_cookie, #validate_token, #var, #verify_logged_in
Instance Method Details
#admin_index ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/caboose/change_logs_controller.rb', line 5 def admin_index return unless user_is_allowed('logs', 'view') mc = "Media Category" @logs = ChangeLog.where(:site_id => @site.id).where('(is_field = false and (action = ? OR action = ?)) OR (action != ? and action != ?) OR (is_field = true AND description ILIKE (?))','added','deleted','added','deleted',"%#{mc}%").order('timestamp desc, id desc').limit(500) render :layout => 'caboose/admin' end |