By default, Devise redirects to a sign-in form when accessing a route that requires authentication. If for some reason you do not want this, but use Basic Authentication (and...

...sense) in devise.rb: config.http_authenticatable = true config.navigational_formats = [] You may want to also disable routes to the HTML forms in your routes.rb: devise_for :users, skip: [:sessions] # or skip: :all...

...one. Unfortunately, restangular collections are not plain arrays, but arrays with extra attributes, like route: $scope.photos.route // => "photos" $scope.photos = _.without($scope.photos, photo) $scope.photos.route // => undefined When doing somewhat advanced stuff with restangular...

...urlRouterProvider) -> # Prevent uiRouter's initialization, i.e. do not sync the current URL # with its routes $urlRouterProvider.deferIntercept() inject (_$httpBackend_, _SERVICE_) => @$httpBackend = _$httpBackend_ @SERVICE = _SERVICE_ afterEach -> @$httpBackend.verifyNoOutstandingExpectation() @$httpBackend.verifyNoOutstandingRequest() describe 'FUNCTION()', ->

...initialization. Otherwise it would attempt to sync the current URL (Jasmine's!) with its routes, fall back to the default route and then fail to load the corresponding template, which...

...using clearance, you can easily roll your own simple Rack-based authentication. Change your routes.rb to My::Application.routes.draw do # ... mount AuthenticatingResqueServer => '/resque' end Put a authenticating_resque_server.rb into config/initializers: require 'resque/server...

The goal is to get Jasmine specs running in a Rails project using Webpacker, with the browser based test runner...

...a different code, pass a :status option: redirect_to posts_url, status: 301 From routes When redirecting from your config/routes.rb, the default status code is 301 Moved Permanently:

def rss @notes = Note.all(:order => 'created_at DESC', :limit => 50) end end Routes Connect a route to the feed in config/routes.rb: map.feed 'feed.rss', :controller => 'feeds', :action => 'rss', :format...

...with the Single Thread Issue which caused my webrick to deadlock when an ActionController::RoutingError (No route matches "...") occurred. These steps brought me a little further (1) assert dependencies are...

...running the (2) steps. Important Note I still got this error when an ActionController::RoutingError (No route matches "...") occurred, e.g. missing a file like image, css, etc. because of broken...

Add the gateway PC as the default gateway using sudo ip route del default sudo ip route add default via Add another DNS server to /etc/resolv.conf, for...

...button to the tinyMCE toolbar and tell tinyMCE to open a dialog with the route to your dialog's view. tinymce.init({ // ... toolbar: 'myCustomButton', setup: function(editor) { editor.ui.registry.addButton('myCustom Button', {

makandra dev
github.com

...allows you to replace the Net::HTTP subsystem of Ruby with an equivalent that routes all requests to a Rack application. You can use Sinatra, raw Rack, or even Rails...

...to the remote service you are mocking out using familiar and convenient tools to route requests and build up responses...

...text => 'Hello Universe').text => "Hello Universe" It seems as if Capybara concatenates the selector "route" it took to get the initial elements to search for content, instead of search finding...

github.com

rack-cargo gives your API a new /batch route that lets clients perform multiple API calls with a single request. The batched calls are resolved internally and are then returned...

...to that function: $ type rake rake is a function rake () ... Next, try running rake routes on a Rails 4.1+ project -- the 2nd time should be significantly faster. On older projects...

...for the parent resource, another for the child resource. Say you have the following routes: resources :clients do resources :notes end And the following power definitions: class Power ... power :clients...

...LAN card. You can use the same cable that would otherwise connect to a router. Restart the Ubuntu box. While the Ubuntu box is restarting, change the connection settings of...

github.com

An example Bowerfile: # ./Bowerfile asset 'angular' asset 'angular-i18n' asset 'angular-ui-router' asset 'angular-ui-bootstrap' asset 'lodash' asset 'restangular' asset 'moment', '1.2.3' The following commands are...

...config.paths['config/routes.rb'] and registers its value with app.routes_reloader. This means you could put routing files anywhere and then require them. However, I recommend to put any routing files into...

...config/routes/: # config/routes/example.rb Rails.application.routes.draw do resources :example end After creating your routing files, tell Rails how to find them: # in config/application.rb # Rails::Engine will register these files with app.routes_reloader

makandra dev

...generators (including rails generators) with rails g -h. generator model migration controller entry in routes.rb views tests scaffold ✔ ✔ ✔ ✔ ✔ ✔ resource ✔ ✔ ✔ ✔ ✔ model ✔ ✔ ✔ controller ✔ ✔ ✔ migration ✔ Also see this blog post...

RestangularProvider.setDefaultHttpFields({ cache: true }); To invalidate cached responses e.g. on a state change in UI Router, you can do @app.run ['$rootScope', '$cacheFactory', ($rootScope, $cacheFactory) -> $rootScope.$on '$stateChangeSuccess', -> $cacheFactory.get('$http').removeAll() ]

...if the server is ready to accept requests. Since you don't have a route that responds to /__identify, Capybara will wrap your Rails app in a middleware that responds...

Solution Just define the action as cookies_action or similar and adjust your route, i.e.: get :cookies, to: 'footer_pages#cookies_action...

nginx.org

} } An example use case is reverse-proxying with nginx and simulating a route that drops connections...

makandra dev
github.com

...networks to extract IDs or screen names. It does not get confused by child routes: you may also pass URLs like a user's twitter photo stream and the gem...