typus 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- typus (3.0.4)
12
+ typus (3.0.5)
13
13
  fastercsv (~> 1.5)
14
14
  render_inheritable
15
15
  will_paginate (~> 3.0.pre2)
@@ -6,8 +6,8 @@ class Admin::AccountController < Admin::BaseController
6
6
  skip_before_filter :authenticate
7
7
  skip_before_filter :set_locale
8
8
 
9
- before_filter :sign_in?, :except => [:forgot_password, :show]
10
- before_filter :new?, :only => [:forgot_password]
9
+ before_filter :sign_in?, :except => [:forgot_password, :send_password, :show]
10
+ before_filter :new?, :only => [:forgot_password, :send_password]
11
11
 
12
12
  def new
13
13
  flash[:notice] = Typus::I18n.t("Enter your email below to create the first user.")
@@ -20,8 +20,9 @@ class Admin::AccountController < Admin::BaseController
20
20
  end
21
21
 
22
22
  def forgot_password
23
- return unless request.post?
23
+ end
24
24
 
25
+ def send_password
25
26
  if user = Typus.user_class.find_by_email(params[:typus_user][:email])
26
27
  url = admin_account_url(user.token)
27
28
  Admin::Mailer.reset_password_link(user, url).deliver
@@ -3,7 +3,7 @@
3
3
  title(page_title)
4
4
  %>
5
5
 
6
- <%= form_for :typus_user, :url => { :action => :forgot_password } do |form| %>
6
+ <%= form_for :typus_user, :url => { :action => :send_password } do |form| %>
7
7
 
8
8
  <ul>
9
9
 
@@ -8,7 +8,10 @@ Rails.application.routes.draw do
8
8
  if Typus.authentication == :session
9
9
  resource :session, :only => [:new, :create, :destroy], :controller => :session
10
10
  resources :account, :only => [:new, :create, :show, :forgot_password] do
11
- collection { get :forgot_password }
11
+ collection do
12
+ get :forgot_password
13
+ post :send_password
14
+ end
12
15
  end
13
16
  end
14
17
 
@@ -1,3 +1,3 @@
1
1
  module Typus
2
- VERSION = "3.0.5"
2
+ VERSION = "3.0.6"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 5
10
- version: 3.0.5
9
+ - 6
10
+ version: 3.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Francesc Esplugas