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 => [
7 :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors
9 before_filter :authenticate_artist, :only => [:resource_pictures]
21 if @operators.user.create_token
22 respond_to do |format|
23 flash[:notice] = I18n.t('flash.notice.created', :model => User.human_attribute_name(:authentication_token))
24 format.html { redirect_to({:action => :configure}) }
27 flash[:notice] = I18n.t('flash.notice.not_created', :model => User.human_attribute_name(:authentication_token))
28 format.html { render action: "configure" }
33 if @operators.user.delete_token
34 respond_to do |format|
35 flash[:notice] = I18n.t('flash.notice.destroyed', :model => User.human_attribute_name(:authentication_token))
36 format.html { redirect_to :action => :configure}
39 flash[:notice] = I18n.t('flash.notice.not_destroyed', :model => User.human_attribute_name(:authentication_token))
40 format.html { render action: "configure" }