class ApplicationController < ActionController::Base
  protect_from_forgery with: :exception
  before_action :configure_permitted_parameters, if: :devise_controller?

  
  def index
    @updates = ProgressUpdate.all
  end

  

  protected

  def configure_permitted_parameters

    devise_parameter_sanitizer.permit(:sign_up) { |u| u.permit(:username, :email, :password,
    :password_confirmation, :remember_me, :avatar, :avatar_cache, :remove_avatar) }
    devise_parameter_sanitizer.permit(:account_update) { |u| u.permit(:username, :email, :password,
    :password_confirmation, :current_password, :avatar, :avatar_cache, :remove_avatar) }

  end
  
end

class ApplicationController < ActionController::Base
  protect_from_forgery with: :exception
  before_action :configure_permitted_parameters, if: :devise_controller?

  
  def index
    @updates = ProgressUpdate.order("created_at DESC")
  end

  

  protected

  def configure_permitted_parameters

    devise_parameter_sanitizer.permit(:sign_up) { |u| u.permit(:username, :email, :password,
    :password_confirmation, :remember_me, :avatar, :avatar_cache, :remove_avatar) }
    devise_parameter_sanitizer.permit(:account_update) { |u| u.permit(:username, :email, :password,
    :password_confirmation, :current_password, :avatar, :avatar_cache, :remove_avatar) }

  end
  
end

Make newest updates display first on index
Make newest updates display first on index
