Sha256: f82799a689c2f121fefe3ac1ca724e954247a1d427626c6dab2a5275d9f39ba6
Contents?: true
Size: 837 Bytes
Versions: 16
Compression:
Stored size: 837 Bytes
Contents
require 'clearance' Clearance.configure do |config| # need an empty block to initialize the configuration object end class ApplicationController < ActionController::Base include Clearance::Controller end class User < ActiveRecord::Base include Clearance::User end class UserWithOptionalPassword < User private def password_optional? true end end module Clearance module Test module Redirects def redirect_to_url_after_create redirect_to(@controller.send(:url_after_create)) end def redirect_to_url_after_update redirect_to(@controller.send(:url_after_update)) end def redirect_to_url_after_destroy redirect_to(@controller.send(:url_after_destroy)) end end end end RSpec.configure do |config| config.include Clearance::Test::Redirects end
Version data entries
16 entries across 16 versions & 1 rubygems