adva 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee3ba355548f2d435cab4bed75a24bcd57ce604bccb9ce8040895c7cd7071cb1
4
- data.tar.gz: c97a5d6de8e170695e217513ad3f915d6057c363ac909edd4d99af4d6b7e71a8
3
+ metadata.gz: 8b65c993248ec85e7fcb087c5c45df3fe1ca6cf6ad93782a03d2615b9c765a7b
4
+ data.tar.gz: 4cc64de1660b137c49d8605f46bc574610ddf618b589458ad6fefebb127bb6fd
5
5
  SHA512:
6
- metadata.gz: d49f370f2085930f92abce6373b902416ababc8d903c1fa019151363d4575d2258bf98413c171e8f5c5b915f32974ae17c7a59683ebfde49c2a39d03ea2df792
7
- data.tar.gz: ed9b3eba97128897b5ed432e727fca912a02fc2e0b2ac60ff45b4f327a1c41275a50dbeec73bd5f54fb602ef1a068446fc1b23cceec38f7f4029d07a7fb98430
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
- sections.find_by_permalink(params[:section_permalink]) || sections.first
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, :action => :edit, :resource => @category
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
@@ -1,3 +1,3 @@
1
1
  module Adva
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
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.2
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: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2023-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate