Class: IshManager::IroWatchersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/ish_manager/iro_watchers_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#basic_auth, #home, #tinymce

Instance Method Details

#indexObject

def destroy

@w = Iro::Alert.find params[:id]
authorize! :destroy, @w
flag = @w.destroy
if flag
  flash[:notice] = 'Success.'
else
  flash[:alert] = @w.errors.full_messages.join(", ")
end
redirect_to action: 'index'

end



30
31
32
33
34
# File 'app/controllers/ish_manager/iro_watchers_controller.rb', line 30

def index
  authorize! :index, Iro::Watcher
  # @alerts = Iro::Alert.order_by( ticker: :asc, direction: :asc, price: :desc)
  # @option_get_chains = Iro::OptionGet.all_get_chains
end