Class: OdaniaProfile::ProfilesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- OdaniaProfile::ProfilesController
- Defined in:
- app/controllers/odania_profile/profiles_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
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 |
#show ⇒ Object
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 |