tienda 1.1.1 → 1.1.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
  SHA1:
3
- metadata.gz: 07750df3dfa6f422cdcb288f7bda9b06af07a209
4
- data.tar.gz: 9dc1f6a7436845dacb55613786b8ebf004b84c2f
3
+ metadata.gz: 731275b6c8beefea44889b34597732c9dfbcc4b0
4
+ data.tar.gz: 9b55af96fd3b8af48430dc3b6245184bb6648c22
5
5
  SHA512:
6
- metadata.gz: 14c77ee404c51e3ec42f07e70b8014461195990d97efd1bf544559696f5e3df2f99566fe60e481cfd9de921bd90af861dcb67a2f259a8987290edf534f263c72
7
- data.tar.gz: fe69ce2d94501a4ae60a562cb4ae27a42d817dbbd4cb3ec1b7c06bfea754f2ddba419917b43e304383eee0c0dc6b21ecff8c28c72ca530f6c4882f38cf9d60bf
6
+ metadata.gz: c8a7feb4833e37768c7a70c4a03bc76786d51592117ed77256f308c3f7eda9e7d4cf0dcab6c9a64e51be14496a91ec0bc3d979421e01126f7b2a89a8e413c4a5
7
+ data.tar.gz: de0a16ab7e693d1a357eec0795de9afb3a92ecd6c890a6dfbccc42928aa317484930bb4c3e0a8cc6247c414ea5604434564a54d7bfdea18e226905acd805691c
@@ -1,11 +1,10 @@
1
1
  module Tienda
2
2
  class UsersController < Tienda::ApplicationController
3
-
4
3
  before_filter { @active_nav = :users }
5
4
  before_filter { params[:id] && @user = Tienda::User.find(params[:id]) }
6
5
  before_filter(only: [:create, :update, :destroy]) do
7
6
  if Tienda.settings.demo_mode?
8
- raise Tienda::Error, t('tienda.users.demo_mode_error')
7
+ fail Tienda::Error, t('tienda.users.demo_mode_error')
9
8
  end
10
9
  end
11
10
 
@@ -22,7 +21,7 @@ module Tienda
22
21
  if @user.save
23
22
  redirect_to :users, flash: { notice: t('tienda.users.create_notice') }
24
23
  else
25
- render action: "new"
24
+ render action: 'new'
26
25
  end
27
26
  end
28
27
 
@@ -31,14 +30,14 @@ module Tienda
31
30
 
32
31
  def update
33
32
  if @user.update(safe_params)
34
- redirect_to [:edit, @user], flash: { notice t('tienda.users.update_notice') }
33
+ redirect_to [:edit, @user], flash: { notice: t('tienda.users.update_notice') }
35
34
  else
36
- render action: "edit"
35
+ render action: 'edit'
37
36
  end
38
37
  end
39
38
 
40
39
  def destroy
41
- raise Tienda::Error, t('tienda.users.self_remove_error') if @user == current_user
40
+ fail Tienda::Error, t('tienda.users.self_remove_error') if @user == current_user
42
41
  @user.destroy
43
42
  redirect_to :users, flash: { notice: t('tienda.users.destroy_notice') }
44
43
  end
@@ -48,6 +47,5 @@ module Tienda
48
47
  def safe_params
49
48
  params[:user].permit(:first_name, :last_name, :email_address, :password, :password_confirmation)
50
49
  end
51
-
52
50
  end
53
51
  end
@@ -1,3 +1,3 @@
1
1
  module Tienda
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tienda
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Robaina