I am very new and quite scared of jquery. I'll get over it soon but what I am trying achieve is that, after a form has been submitted an alert pops up to say it was a success or failiure. I have this working, but it is the ugly alert popup. what I would like is the bootsrap alert notice or alert warning.
My controller is currently looking like this
def create
@subscription = Subscription.new(subscription_params)
respond_to do |format|
if @subscription.save
format.html
format.js { render :js=>'alert("You have been added to the mailing list");' }
else
format.html
format.js { render :js=>'alert("You have entered an invalid email address");' }
end
end
end
I have bootstrap.js loaded I am just unsure how to implement it.
$('#myModal').modal(options);refer bootstrap documentation