class ComicsController < ApplicationController
- layout 'test' if Pettanr::Application.test_layout
- if Const.run_mode == 0
+ layout 'test' if MagicNumber['test_layout']
+ if MagicNumber['run_mode'] == 0
before_filter :authenticate_user!, :only => [:new, :create, :edit, :update, :destroy]
+ before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
else
- before_filter :authenticate_user!, :only => [:top, :index, :show, :play, :new, :create, :edit, :update, :destroy]
+ before_filter :authenticate_user!, :only => [:top, :index, :show, :new, :create, :edit, :update, :destroy]
+ before_filter :authenticate_author, :only => [:top, :index, :show, :new, :create, :edit, :update, :destroy]
end
before_filter :authenticate_admin!, :only => [:list, :browse]
def top
- @new_comics = Comic.find(:all,
- :include => :author, :conditions => ['visible > 0'], :order => 'updated_at desc', :limit => 5
- )
- @new_pictures = OriginalPicture.list @artist.id
-
respond_to do |format|
format.html # index.html.erb
end