session_rememberable 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bab239455bc7b525f614fdbfea7cc51cb7916ee910ab2b61702ae77c12b0dea
4
- data.tar.gz: 4fc69684d8405580620990fd2d8b6836ba4113a8259b79639110f3ad20e33cbd
3
+ metadata.gz: ac8f7b7985641e7d69ddf12cdb30bf50918ba25dd8d033f9a76efe0c5a3c9e04
4
+ data.tar.gz: 59756b4ba60d8b3fb48778a737d5c7bbb102c19221b642bdf4e52b07ccf1f82c
5
5
  SHA512:
6
- metadata.gz: bde2bd889e9ba131bd3ebbd75a62c5df7ae17c8d454592256159d17ee9e806f39ebd7a5ed082c234044521e24f0689167466be8ff7220db175e1a677345df696
7
- data.tar.gz: 5a16083e0ab1ca4b1acf11452a373235c534eb25e052a1ca97ec08ec3c50acc06ba1eb51dea9118b55d7137a59ae15b11b204b3b484bc8421170c1d4e7d76702
6
+ metadata.gz: 449119f42850fe46c085294504d1dcb8d60e0cc7ec9bc4605eb68106e65d17a9e7e018b9941f200d2eab7b63ce2ee6ee3978be4d7bdd443007ff0ae937bf7b29
7
+ data.tar.gz: 5153d44f00f313b5a1543118b5baa1e3b2c2cc8c08bdaa88e7c7ec7840e1f383a34842a1331160617fa9fddf38fd97364365a8717f3704124fdb1944c12a60a5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- session_rememberable (0.3.1)
4
+ session_rememberable (0.3.2)
5
5
  actionpack
6
6
  activesupport
7
7
 
data/README.md CHANGED
@@ -41,7 +41,7 @@ class CustomersController < ApplicationController
41
41
  customer = User.new(permitted_params)
42
42
 
43
43
  if customer.save
44
- remember_customer customer
44
+ remember customer
45
45
  redirect_to customer
46
46
  else
47
47
  render :new
@@ -52,7 +52,7 @@ class CustomersController < ApplicationController
52
52
  customer = User.find(params[:id])
53
53
 
54
54
  if customer.destroy
55
- forget_customer
55
+ forget customer
56
56
  redirect_to root_path
57
57
  else
58
58
  render :edit
@@ -74,3 +74,15 @@ In your views (.html.haml)
74
74
  Welcome
75
75
  = current_customer.name
76
76
  ```
77
+
78
+ ## Initializer
79
+
80
+ `config/initializers/session_store.rb`
81
+
82
+ ```ruby
83
+ Rails.application.config.session_store SessionRememberable::Store, {
84
+ rememberable_options: {
85
+ permanent: true
86
+ }
87
+ }
88
+ ```
@@ -1,4 +1,6 @@
1
1
  module SessionRememberable
2
+ extend ActiveSupport::Concern
3
+
2
4
  module ClassMethods
3
5
  def remember(key, class_name: nil, static_data: false)
4
6
  define_method(:"current_#{key}") do
@@ -1,3 +1,3 @@
1
1
  module SessionRememberable
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -2,5 +2,4 @@ require_relative 'session_rememberable/methods'
2
2
  require_relative 'session_rememberable/store'
3
3
 
4
4
  module SessionRememberable
5
- extend ActiveSupport::Concern
6
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: session_rememberable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - wynk182