app/admin/moderation.rb
# This code is evaluated within the controller class
This code is evaluated within the controller class
This code is evaluated within the controller class
def create
      id = params[:id]
      if !Moderation.exists?(id)
        s = Moderation.new(story_params)
        s.update_attributes(story_params)
        if s.save
          redirect_to admin_moderation_path(s)
        else
          render "new"
        end
      else
        render "new"
      end
    end
def create id = params [ :id ] if ! Moderation . exists? ( id ) s = Moderation . new ( story_params ) s . update_attributes ( story_params ) if s . save redirect_to admin_moderation_path ( s ) else render "new" end else render "new" end end
This code is evaluated within the controller class
This code is evaluated within the controller class