buoy :account do
   link 'Account', account_path
 end

 buoy :account_edit do |account|
   link 'Account Show', show_account_path(account)
   link 'Account Edit', edit_account_path(account)
   pre_buoy :account
 end
189919
def link(key, *args)
      options = args.extract_options!
      path = args.shift
      url = path ? context.url_for(path) : nil

      text = I18n.t(key, scope: 'buoys.breadcrumbs', default: key)

      links << Buoys::Link.new(text, url, options)
    end
286457
def navactive(request, urls):
    
    url_list = set(urls.split())

    resolved = resolve(request.path)
    resolved_urls = set()
    if resolved.url_name:
        resolved_urls.add(resolved.url_name)
    if resolved.namespaces:
        resolved_urls = resolved_urls.union(["{}:{}".format(namespace, resolved.url_name) for namespace in resolved.namespaces])
        resolved_urls = resolved_urls.union(["{}:".format(namespace) for namespace in resolved.namespaces])
    if getattr(resolved, 'app_name', None):
        resolved_urls = resolved_urls.union(["{}:{}".format(resolved.app_name, resolved.url_name), "{}:".format(resolved.app_name)])
    if getattr(resolved, 'app_names', []):
        resolved_urls = resolved_urls.union(["{}:{}".format(app_name, resolved.url_name) for app_name in resolved.app_names])
        resolved_urls = resolved_urls.union(["{}:".format(app_name) for app_name in resolved.app_names])
    if url_list and resolved_urls and bool(resolved_urls & url_list):
        return getattr(settings, "NAVHELPER_ACTIVE_CLASS", "active")
    return getattr(settings, "NAVHELPER_NOT_ACTIVE_CLASS", "")
180277
def confirm
      token = params[:token].to_s

      user = User.find_by(confirmation_token: token)

      if user.present? && user.confirmation_token_valid?
        if user.mark_as_confirmed!
          render json: {status: 'Account confirmed successfully.'}
        else
          render json: user.errors, status: 422
        end
      else
        render json: ['Invalid token'], status: :not_found
      end
    end
769186
protected function _setListNavigationParams()
    {
        // list navigation
        $showNavigation = false;
        $adminListSize = $this->_getViewListSize();
        if ($this->_iListSize > $adminListSize) {
            // yes, we need to build the navigation object
            $pageNavigation = new stdClass();
            $pageNavigation->pages = round((($this->_iListSize - 1) / $adminListSize) + 0.5, 0);
            $pageNavigation->actpage = ($pageNavigation->actpage > $pageNavigation->pages) ? $pageNavigation->pages : round(
                ($this->_iCurrListPos / $adminListSize) + 0.5,
                0
            );
            $pageNavigation->lastlink = ($pageNavigation->pages - 1) * $adminListSize;
            $pageNavigation->nextlink = null;
            $pageNavigation->backlink = null;

            $position = $this->_iCurrListPos + $adminListSize;
            if ($position < $this->_iListSize) {
                $pageNavigation->nextlink = $position = $this->_iCurrListPos + $adminListSize;
            }

            if (($this->_iCurrListPos - $adminListSize) >= 0) {
                $pageNavigation->backlink = $position = $this->_iCurrListPos - $adminListSize;
            }

            // calculating list start position
            $start = $pageNavigation->actpage - 5;
            $start = ($start <= 0) ? 1 : $start;

            // calculating list end position
            $end = $pageNavigation->actpage + 5;
            $end = ($end < $start + 10) ? $start + 10 : $end;
            $end = ($end > $pageNavigation->pages) ? $pageNavigation->pages : $end;

            // once again adjusting start pos ..
            $start = ($end - 10 > 0) ? $end - 10 : $start;
            $start = ($pageNavigation->pages <= 11) ? 1 : $start;

            // navigation urls
            for ($i = $start; $i <= $end; $i++) {
                $page = new stdclass();
                $page->selected = 0;
                if ($i == $pageNavigation->actpage) {
                    $page->selected = 1;
                }
                $pageNavigation->changePage[$i] = $page;
            }

            $this->_aViewData['pagenavi'] = $pageNavigation;

            if (isset($this->_iOverPos)) {
                $position = $this->_iOverPos;
                $this->_iOverPos = null;
            } else {
                $position = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('lstrt');
            }

            if (!$position) {
                $position = 0;
            }

            $this->_aViewData['lstrt'] = $position;
            $this->_aViewData['listsize'] = $this->_iListSize;
            $showNavigation = true;
        }

        // determine not used space in List
        $listSizeToShow = $this->_iListSize - $this->_iCurrListPos;
        $adminListSize = $this->_getViewListSize();
        $notUsed = $adminListSize - min($listSizeToShow, $adminListSize);
        $space = $notUsed * 15;

        if (!$showNavigation) {
            $space += 20;
        }

        $this->_aViewData['iListFillsize'] = $space;
    }
1034375
def options(path, options = {}, &block)
      perform_request Net::HTTP::Options, path, options, &block
    end
249406
def params
      {}.tap do |param|
        param[:status] = SubscriptionPaymentOrder::STATUSES[status.to_sym]
        param[:page] = page
        param[:maxPageResults] = options[:per_page]
        param[:credentials] = options[:credentials]
      end
    end
1152956
public function parseRoute()
    {
        // start at the home page
        $this->sailHome();

        // which way be we goin' ?
        $path = $this->uri;

        // Has th' route been set?
        if ($path != '/') {
            // Set the routes configgerd in th' config.php
            $this->setCustomRoutesFromConfig();

            // Match the feckin' route ya blubberin' seadog!
            $this->matchRoute();
        }

        // Merge th' GET POST and config params
        $this->setParams();
    }
341858
function get_account_url( $action = false, $params = array(), $add_action_nonce = true ) {
            if ( is_string( $action ) ) {
                $params['fs_action'] = $action;
            }

            self::require_pluggable_essentials();

            return ( $add_action_nonce && is_string( $action ) ) ?
                fs_nonce_url( $this->_get_admin_page_url( 'account', $params ), $action ) :
                $this->_get_admin_page_url( 'account', $params );
        }
449879
def account(transition, direction=Direction.BIDIRECTIONAL):
    
    if direction != Direction.BIDIRECTIONAL:
        return directed_account(transition, direction)

    return Account(directed_account(transition, Direction.CAUSE) +
                   directed_account(transition, Direction.EFFECT))
757548
def edit_link(self, inst):
        
        if not inst.is_active:
            return u'--'
        update_url = reverse('admin:{}_{}_add'.format(self.model._meta.app_label, self.model._meta.model_name))
        update_url += "?source={}".format(inst.pk)
        return u'<a href="{}">{}</a>'.format(update_url, _('Update'))
371560
def link2_(a, b)
      if a.nil?
        @first = b
      else
        a.instance_variable_set(:@next, b) unless a.nil?
      end
      if b.nil?
        @last = a
      else
        b.instance_variable_set(:@prev, a) unless b.nil?
      end
    end
197930
function (accountIdOrSlug, params) {
    var path;
    if (accountIdOrSlug) {
      path = this.constructPath(constants.ACCOUNTS, accountIdOrSlug);
      return this.Core.GET(path, params);
    } else {
      return this.rejectRequest('Bad Request: An account id or slug must be supplied for this operation');
    }
  }
1321253
def create
			account = if user_signed_in?
			Mtdevise::Account.create(account_params)
			else
				Mtdevise::Account.create_with_owner(account_params)
			end
		
			@account = account
			if account.valid?
				flash[:success] = "Your account has been successfully created."

			if user_signed_in?
				account.owner = current_user
				account.users << current_user
				account.save
				redirect_to mtdevise.accounts_path

			else
				sign_in account.owner
				redirect_to mtdevise.root_url(:subdomain => account.subdomain)
			end

			else
				flash[:error] = "Sorry, your account could not be created."
				render :new
			end

		end
371070
def login_from_basic_auth
      authenticate_with_http_basic do |accountname, password|
        account = Account.authenticate(accountname, password, true)
        self.auth_type_used = :basic if not account.nil?
        self.current_account = account
        account
      end
    end
371078
def _link_or_update_vars(self):
        
        for d, source in self.links.items():
            target = os.path.join(self.inventory_directory, d)
            source = os.path.join(self._config.scenario.directory, source)

            if not os.path.exists(source):
                msg = "The source path '{}' does not exist.".format(source)
                util.sysexit_with_message(msg)
            msg = "Inventory {} linked to {}".format(source, target)
            LOG.info(msg)
            os.symlink(source, target)
921045
def show
      if params[:set_session]
        session[:current_provider] = params[:id]
        redirect_to :back, provider: params[:id]
      elsif params[:clear_session]
        session.delete :current_provider
        redirect_to providers_path
      end
      @current_provider = Krikri::Provider.find(params[:id])
    end
65049
def edit_thing_path(model, object)
      id = object['ID'] || object['id']
      send(:"edit_admin_#{undersingularize(model)}_path", id: id)
    end