1 class ArtistsController < ApplicationController
2 if Manifest.manifest.magic_numbers['run_mode'] == 0
3 before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
4 before_filter :authenticate_artist, :only => [:edit, :update, :destroy]
6 before_filter :authenticate_resource_reader, :only => [:index, :show, :resource_pictures]
7 before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
8 before_filter :authenticate_artist, :only => [:edit, :update, :destroy]
15 def show_html_format format
22 respond_to do |format|
23 show_html_format format
24 show_prof_format format
25 show_json_format format
43 @item = @my_model_class.new
45 @item.attributes = params[@my_model_class.item_name]
46 @item.overwrite @operators
47 render_create root_path
52 @item.attributes = params[@my_model_class.item_name]
53 @item.overwrite @operators
54 render_update '/home/configure'
58 @artist = Artist.edit(params[:id], @operators)
61 respond_to do |format|
62 format.html { redirect_to artists_url }
63 format.json { head :ok }