Class: OdaniaProfile::ProfilesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/odania_profile/profiles_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



2
3
4
# File 'app/controllers/odania_profile/profiles_controller.rb', line 2

def index
	@profiles = OdaniaProfile::Profile.where(published: true).order('updated_at DESC')
end

#showObject



6
7
8
9
# File 'app/controllers/odania_profile/profiles_controller.rb', line 6

def show
	@profile = OdaniaProfile::Profile.where(published: true, id: params[:id].to_i).first
	redirect_to odania_profile_profiles_path if @profile.nil?
end