Last active
August 29, 2015 14:11
-
-
Save antulik/0d7426df5770e466f288 to your computer and use it in GitHub Desktop.
render_js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
render_js do | |
if result[:error] | |
messenger_error(message: result[:error][:message]) | |
else | |
messenger_success(message: 'Your message was sent successfully') | |
end | |
hide_modal | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Messenger().post({ | |
"message":"Your message was sent successfully", | |
"type":"success", | |
"showCloseButton":true | |
}); | |
$('#modal').modal('hide'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if result[:error] %> | |
Messenger().post({ | |
"message":result[:error][:message], | |
"type":"error", | |
"showCloseButton":true | |
}); | |
<% else %> | |
Messenger().post({ | |
"message":"Your message was sent successfully", | |
"type":"success", | |
"showCloseButton":true | |
}); | |
<% end %> | |
$('#modal').modal('hide'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment