Class: Portfolio::SitesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/portfolio/sites_controller.rb

Instance Method Summary collapse

Instance Method Details

#defaultObject



12
13
14
15
16
# File 'app/controllers/portfolio/sites_controller.rb', line 12

def default
  @site = Site.where(default: true).first
  set_projects
  render :show
end

#show_by_keyObject



6
7
8
9
10
# File 'app/controllers/portfolio/sites_controller.rb', line 6

def show_by_key
  @site = Site.find_by(key: params[:portfolio_key])
  set_projects
  render :show
end