app/controllers/admin_events_controller.rb
#to approve/unapprove an event:
to approve/unapprove an event.
to approve / unapprove an event .
def approve
    @event.toggle(:approved)
    @event.save!
    if @event.approved?
      tweet_event_check
      inform_applicants_country
      inform_applicants_field_of_interest
      redirect_to admin_url, notice: t('.event_approved', event_name: @event.name)
    else
      redirect_to admin_url, notice: t('.event_unapproved', event_name: @event.name)
    end
  end
def approve @event . toggle ( :approved ) @event . save! if @event . approved? tweet_event_check inform_applicants_country inform_applicants_field_of_interest redirect_to admin_url , notice : t ( '.event_approved' , event_name : @event . name ) else redirect_to admin_url , notice : t ( '.event_unapproved' , event_name : @event . name ) end end
to approve/unapprove an event:
to approve / unapprove an event :