rooftop-rails-extras 0.2.3 → 0.2.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95575ead8ced8e8bf20dae584e3b84e2e093eae5
|
4
|
+
data.tar.gz: 560ac6353765ad51f0fa937f534e24ce955610e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de6c1020989c483725f54e3e0a6b22334cf1f1c038500d79192aa83e7a0ab0444fd3eda825dda52685d1c769a0c1552999036f1e1c377c29b55439c1f051208
|
7
|
+
data.tar.gz: a128af8b9d8bec17d19b5decb44a7c765d50c1bb6a62d89751f36041778bfefcb6a48167a5e15c83bab583ea35f0161d161dd3e274710f91a8d6a432d1b2eea8
|
@@ -28,10 +28,7 @@ module Rooftop
|
|
28
28
|
raise ArgumentError, "You need to call contact_form=(YourClass) in your controller, which must inherit from Rooftop::Rails::Extras::ContactForm" unless self.class.contact_form.ancestors.include?(Rooftop::Rails::Extras::ContactForm)
|
29
29
|
raise ArgumentError, "You need to include hidden fields for from_page and to_page IDs, so this controller can redirect appropriately" unless params.has_key?(:from_page) && params.has_key?(:to_page)
|
30
30
|
form = self.class.contact_form.new(contact_form_params)
|
31
|
-
|
32
|
-
# the honeypot has been hit - raise an error
|
33
|
-
raise ActionController::RoutingError, "you posted a human_check parameter, which is never supposed to be filled in (it's a honeypot)"
|
34
|
-
end
|
31
|
+
|
35
32
|
from_page, to_page = *self.class.page_class.where(post__in: [params[:from_page], params[:to_page]], orderby: :post__in)
|
36
33
|
if form.deliver
|
37
34
|
redirect_to Rooftop::Rails::RouteResolver.new(:page, to_page.nested_path).resolve
|
@@ -12,10 +12,9 @@ module Rooftop
|
|
12
12
|
raise ArgumentError, "You passed a current #{entity.class.to_s.downcase} which isn't a #{entity.class} object" unless (default_opts[:current].nil? || default_opts[:current].is_a?(entity.class))
|
13
13
|
resolved_children = entity.resolved_children
|
14
14
|
if resolved_children.any?
|
15
|
-
# byebug
|
16
15
|
content_tag(:ul, class: default_opts[:class]) do
|
17
16
|
items = resolved_children.collect do |child|
|
18
|
-
|
17
|
+
subnavigation_item_for(child, default_opts)
|
19
18
|
end
|
20
19
|
items.join.html_safe
|
21
20
|
end
|
@@ -98,7 +97,7 @@ module Rooftop
|
|
98
97
|
|
99
98
|
# Nested ul for children if necessary
|
100
99
|
if opts[:current].present? && (opts[:current].ancestors.collect(&:id).include?(entity.id) || opts[:current].id == entity.id)
|
101
|
-
children = entity.class.where(
|
100
|
+
children = entity.class.where(post_parent__in: entity.id, orderby: :menu_order, order: :asc)
|
102
101
|
if children.any?
|
103
102
|
child_links = content_tag :ul, class: "subnavigation-level-#{opts[:level]}" do
|
104
103
|
items = children.collect do |child|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rooftop-rails-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ed Jones
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|