app/controllers/camps_controller.rb
# Display a camp and its users
Display a camp and its users
Display a camp and its users
def show
    @users = @camp.users.select(:email)
    if @camp.default_image.present?
      @mainImage = @camp.default_image.attachment.url(:large)
    end
    if current_user
      @user_grant_limit = current_user.grants
    end
  end
def show @users = @camp . users . select ( :email ) if @camp . default_image . present? @mainImage = @camp . default_image . attachment . url ( :large ) end if current_user @user_grant_limit = current_user . grants end end
Display a camp and its users
Display a camp and its users
# Added this to move some code out of the view.