improve events
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
class ProfilesController < ApplicationController
|
||||
before_action :set_profile, only: %i[ show edit update destroy ]
|
||||
|
||||
def index
|
||||
@profiles = Profile.page params[:page]
|
||||
def teachers
|
||||
@profiles = Profile.where(kind: :teacher).page( 1 ).per(50)
|
||||
@header = "Meet Hub Feenix teachers and organizers"
|
||||
render :index
|
||||
end
|
||||
|
||||
def show
|
||||
@ -52,6 +54,7 @@ class ProfilesController < ApplicationController
|
||||
|
||||
# Only allow a list of trusted parameters through.
|
||||
def profile_params
|
||||
params.require(:profile).permit(:name, :bio, :picture,:picture_cache, :kind)
|
||||
params.require(:profile).permit(:name, :bio, :picture,:picture_cache,
|
||||
:kind , :info)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user