You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
489 B
18 lines
489 B
module Admins::RenderHelper
|
|
extend ActiveSupport::Concern
|
|
|
|
include Base::RenderHelper
|
|
|
|
def render_delete_success
|
|
render_js_template 'admins/shared/delete'
|
|
end
|
|
alias_method :render_success_js, :render_delete_success
|
|
|
|
def render_js_error(message, type: :alert)
|
|
if type == :notify
|
|
render js: "$.notify({ message: '#{message}' },{ type: 'danger', delay: 5000 });"
|
|
else
|
|
render_js_template 'admins/shared/error', locals: { message: message }
|
|
end
|
|
end
|
|
end |