Sha256: d2eb8868a701e4bb2248096768b8a8efc63e910f2cda7765d43b06494fa7d2bc
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 KB
Contents
class ::IshManager::IroWatchersController < IshManager::ApplicationController # before_action :set_lists # def create # @alert = Iro::Alert.new params[:iro_alert].permit! # authorize! :create, @alert # flag = @alert.save # if flag # flash[:notice] = 'Created iro alert.' # else # flash[:alert] = "Cannot create iro alert: #{@alert.errors.full_messages.join(', ')}." # end # redirect_to action: 'index' # end # 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 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 # def update # @alert = Iro::Alert.find params[:id] # authorize! :update, @alert # flag = @alert.update_attributes params[:iro_alert].permit! # if flag # flash[:notice] = 'Updated iro alert.' # else # flash[:alert] = "Cannot update iro alert: #{@alert.errors.full_messages.join(', ')}." # end # redirect_to action: 'index' # end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ish_manager-0.1.8.513 | app/controllers/ish_manager/iro_watchers_controller.rb |
ish_manager-0.1.8.512 | app/controllers/ish_manager/iro_watchers_controller.rb |