1 class HomeController < ApplicationController
2 before_filter :authenticate_user, :only => [
3 :index, :show, :profile, :configure, :create_token, :delete_token,
4 :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :resource_pictures, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors
6 before_filter :authenticate_author, :only => [:scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors]
7 before_filter :authenticate_artist, :only => [:resource_pictures]
19 if @operators.user.create_token
20 respond_to do |format|
21 flash[:notice] = I18n.t('flash.notice.created', :model => User.human_attribute_name(:authentication_token))
22 format.html { redirect_to({:action => :configure}) }
25 flash[:notice] = I18n.t('flash.notice.not_created', :model => User.human_attribute_name(:authentication_token))
26 format.html { render action: "configure" }
31 if @operators.user.delete_token
32 respond_to do |format|
33 flash[:notice] = I18n.t('flash.notice.destroyed', :model => User.human_attribute_name(:authentication_token))
34 format.html { redirect_to :action => :configure}
37 flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => User.human_attribute_name(:authentication_token))
38 format.html { render action: "configure" }