We will now create a page in our application and show various popups on that page.
Follow these steps:
Create a file
controller.rb
in theAlert
folder and add the following code:require 'rho/rhocontroller' class AlertController < Rho::RhoController // index is page which will show all the link for popup def index @flash = "Alerts Example" render :back => '/app' end // This action will create simple popup def simple_popup @flash = "A Simple popup" Alert.show_popup "A simple message " render :action => :index, :back => '/app' end //This action will create a popup which has title def popup_with_title_button @flash = "Show popup with Title and Button" Alert.show_popup( :message=>"Some message with button\n", :title=>"Some Title", :buttons => ["Ok"] ) render :action => :index, :back => '/app' end //This action will create...