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: 6936bd1c4002ba2f782197baae815e6767b67efa
4
- data.tar.gz: 2f3f326c94b2d2d33d904dc65e1f6e415e892a9d
3
+ metadata.gz: 95575ead8ced8e8bf20dae584e3b84e2e093eae5
4
+ data.tar.gz: 560ac6353765ad51f0fa937f534e24ce955610e4
5
5
  SHA512:
6
- metadata.gz: bc122fb650cf1fc016b45473a06f59ef69837caf5aba62f81763198ed046573c4b50d5e75027a091a3c0baad21550cbc12861953d94f9cb0186eb33f80ba9bdc
7
- data.tar.gz: ff4be3a1dfd947ab7ee0027f5322e54c37f8f77e2910b6b44529752d8cd15c4bcf062b68009f658f9089932f7d2415215d34b947ae35d98a7dba17237b72e39b
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
- if params.has_key?(:human_check) && params[:human_check].present?
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
- subnavigation_item_for(child, default_opts)
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(post_parent: entity.id, orderby: :menu_order, order: :asc)
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|
@@ -1,7 +1,7 @@
1
1
  module Rooftop
2
2
  module Rails
3
3
  module Extras
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.5"
5
5
  end
6
6
  end
7
7
  end
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.3
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-07-07 00:00:00.000000000 Z
11
+ date: 2017-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler