adva 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/base_controller.rb +5 -1
- data/config/initializers/menus.rb +1 -1
- data/lib/adva/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b65c993248ec85e7fcb087c5c45df3fe1ca6cf6ad93782a03d2615b9c765a7b
|
4
|
+
data.tar.gz: 4cc64de1660b137c49d8605f46bc574610ddf618b589458ad6fefebb127bb6fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 054c6ec0f47172177e33f9dfbe743ad622840cc666c6f4c56f0099eda147fa9a5183c67a373acc8c7db62823374b448408c6df96d80dc6fb20664b969fa06d44
|
7
|
+
data.tar.gz: 9eed64b308899c12003b1801065fecff1b98cd5f981bede25196f72daf90a9e5954fa47bc906c66454d4c1891bfd2196bdec762519e3431e2313f9201d96ee1f
|
@@ -28,7 +28,11 @@ class BaseController < ApplicationController
|
|
28
28
|
|
29
29
|
def set_section
|
30
30
|
@section ||= begin
|
31
|
-
|
31
|
+
if params.key?(:section_permalink)
|
32
|
+
sections.find_by_permalink!(params[:section_permalink])
|
33
|
+
else
|
34
|
+
sections.first
|
35
|
+
end
|
32
36
|
end
|
33
37
|
raise ActiveRecord::RecordNotFound unless @section.published?(true) || current_user.admin?
|
34
38
|
@section
|
@@ -152,7 +152,7 @@ module Menus
|
|
152
152
|
activates object.parent.find(:categories)
|
153
153
|
item :new, content: link_to("New", [:new, :admin, @section, :category])
|
154
154
|
if @category && !@category.new_record?
|
155
|
-
item :edit, :
|
155
|
+
item :edit, :content => link_to("Edit", [:edit, :admin, @section, @category])
|
156
156
|
item :delete, :content => link_to("Delete", [:admin, @section, @category], :method => :delete)
|
157
157
|
elsif !@category and @section.categories.size > 1
|
158
158
|
item :reorder, :content => link_to("Reorder", [:admin, @section, :categories], :id => 'reorder_categories', :class => 'reorder')
|
data/lib/adva/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: will_paginate
|