adva 0.1.1 → 0.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
  SHA256:
3
- metadata.gz: 7baa47c6075f9798d681ccacd0033d3d5c36891e9b2e1387884dfffb6d5c29c7
4
- data.tar.gz: aa3f0dada6d1cc160c1f6eccc4a4d30ecbc62121b0c40809ac3eb1da1def7380
3
+ metadata.gz: ee3ba355548f2d435cab4bed75a24bcd57ce604bccb9ce8040895c7cd7071cb1
4
+ data.tar.gz: c97a5d6de8e170695e217513ad3f915d6057c363ac909edd4d99af4d6b7e71a8
5
5
  SHA512:
6
- metadata.gz: 3876f18f354af37a91a8a8b1782b117e4fa48e228dc4fd360f13fc5c2c626510cf4890d5a981739723e15bc2c62126dbb389dac79127157dbfb7ecb205755b78
7
- data.tar.gz: ab617bdb379883b286fe903d17d7b6c4c06a7a1dbc6f0f64fe314e09f36f3a54f380a7267e0363b0177f64b665942756ef3f2cbd46333505640299ff7164b33a
6
+ metadata.gz: d49f370f2085930f92abce6373b902416ababc8d903c1fa019151363d4575d2258bf98413c171e8f5c5b915f32974ae17c7a59683ebfde49c2a39d03ea2df792
7
+ data.tar.gz: ed9b3eba97128897b5ed432e727fca912a02fc2e0b2ac60ff45b4f327a1c41275a50dbeec73bd5f54fb602ef1a068446fc1b23cceec38f7f4029d07a7fb98430
@@ -1,9 +1,9 @@
1
1
  class Admin::UsersController < Admin::BaseController
2
- before_action :set_users, :only => [:index]
3
2
  before_action :set_user, :only => [:show, :edit, :update, :destroy]
4
3
  before_action :authorize_access
5
4
 
6
5
  def index
6
+ @users = User.where(admin: true).to_a + @site.users.to_a
7
7
  end
8
8
 
9
9
  def show
@@ -59,10 +59,6 @@ class Admin::UsersController < Admin::BaseController
59
59
  @menu = Menus::Admin::Users.new
60
60
  end
61
61
 
62
- def set_users
63
- @users = @site.users
64
- end
65
-
66
62
  def set_user
67
63
  @user = User.find(params[:id])
68
64
  end
@@ -1,48 +1,4 @@
1
1
  module Admin::BaseHelper
2
- def self.define_shallow_resource_helpers options
3
- from = options.delete(:from)
4
- to = options.delete(:to)
5
-
6
- from_namespace = from[0..-2].collect(&:to_s).join("_")
7
- to_namespace = to[0..-2].collect(&:to_s).join("_")
8
- resource = from[-1].to_s
9
-
10
- def self.define_path_and_url_methods options
11
- from = options.delete(:from)
12
- to = options.delete(:to)
13
-
14
- %w(path url).each do |suffix|
15
- eval "def #{from}_#{suffix} *args; #{to}_#{suffix} *args; end"
16
- end
17
- end
18
-
19
- # index
20
- define_path_and_url_methods \
21
- :from => [from_namespace, resource.pluralize].join("_"),
22
- :to => [to_namespace, resource.pluralize].join("_")
23
-
24
- # show
25
- define_path_and_url_methods \
26
- :from => [from_namespace, resource].join("_"),
27
- :to => [to_namespace, resource].join("_")
28
-
29
- # new
30
- define_path_and_url_methods \
31
- :from => [:new, from_namespace, resource].join("_"),
32
- :to => [:new, to_namespace, resource].join("_")
33
-
34
- # edit
35
- define_path_and_url_methods \
36
- :from => [:edit, from_namespace, resource].join("_"),
37
- :to => [:edit, to_namespace, resource].join("_")
38
- end
39
-
40
- define_shallow_resource_helpers :from => [:admin, :category], :to => [:admin, :section, :category]
41
- define_shallow_resource_helpers :from => [:admin, :content], :to => [:admin, :section, :content]
42
- define_shallow_resource_helpers :from => [:admin, :article], :to => [:admin, :section, :article]
43
- define_shallow_resource_helpers :from => [:admin, :link], :to => [:admin, :section, :link]
44
-
45
-
46
2
  def save_or_cancel_links(builder, options = {})
47
3
  save_text = options.delete(:save_text) || t(:'adva.common.save')
48
4
  or_text = options.delete(:or_text) || t(:'adva.common.connector.or')
data/lib/adva/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Adva
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-01 00:00:00.000000000 Z
11
+ date: 2022-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate
@@ -1170,7 +1170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1170
1170
  - !ruby/object:Gem::Version
1171
1171
  version: '0'
1172
1172
  requirements: []
1173
- rubygems_version: 3.2.3
1173
+ rubygems_version: 3.2.32
1174
1174
  signing_key:
1175
1175
  specification_version: 4
1176
1176
  summary: cutting edge cms, blog, wiki, forum