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.
16 lines
471 B
16 lines
471 B
5 years ago
|
module Cooperative::RenderHelper
|
||
|
include Base::RenderHelper
|
||
|
|
||
|
def render_delete_success
|
||
|
render_js_template 'cooperative/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 'cooperative/shared/error', locals: { message: message }
|
||
|
end
|
||
|
end
|
||
|
end
|