def new
      @order = Effective::Order.new

      if params[:user_id]
        @order.user = User.where(id: params[:user_id]).first
      end

      if params[:duplicate_id]
        @duplicate = Effective::Order.deep.find(params[:duplicate_id])
        EffectiveOrders.authorize!(self, :show, @duplicate)

        @order.add(@duplicate)
      end

      @page_title = 'New Order'

      raise 'please install cocoon gem to use this page' unless defined?(Cocoon)

      authorize_effective_order!
    end
def new
      @order = Effective::Order.new

      if params[:user_id]
        @order.user = User.where(id: params[:user_id]).first
      end

      if params[:duplicate_id]
        @duplicate = Effective::Order.deep.find(params[:duplicate_id])
        EffectiveOrders.authorize!(self, :show, @duplicate)

        @order.add(@duplicate)
      end

      @page_title = 'New Order'

      raise 'please install cocoon gem to use this page' unless defined?(Cocoon)

      authorize_effective_order!
    end
def effective_resource
   @_effective_resource ||= Effective::Resource.new('effective/order', namespace: :admin)
 end