how_to 2.0.4 → 2.0.5

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: 38a6678382d460aed6b5cc73964516116364f0457398dc67f0acfdc6736bcf58
4
- data.tar.gz: ca93b7159df65e7c5a41f9e12ce92c93d69a1aecbea5b81071f3977392640390
3
+ metadata.gz: '0492337f20abc7910ca243a5e5db1ee3976e13795437b1d2652ef232ac6e1267'
4
+ data.tar.gz: cf86a678a117e4be9c85b8838582bfe2ff25b1e82ada07d851f6a8f17f154c0f
5
5
  SHA512:
6
- metadata.gz: 2080a50764672f28c000850495f936eb13f5e84bd5c54aa4d8aa1db9e9c614e1a3091d0de6890c4edb7969bf76311737f1d7bd9cc4e511e59a4ed88f619c8c1a
7
- data.tar.gz: e0061e294def75ae725f8b49236dfefca964e795edf51d4b8244e7b9c5f9bc1e5a1b9a72ce5497df022f350e4355afe12f90cb0d80d43d69e62d2492ce04228f
6
+ metadata.gz: 16f021c35d865f8a52e3ad38c2e2033edf65db7a0b6bfdc7301c2693f4490de51f75f9015601954eea792e7bfe6d566157834369c76758cf0d8f948ee306879c
7
+ data.tar.gz: 279cd1d9377a6f894edfee794342faa2e0e6204cd225efbb8ebdf0899b8e577beb802b0de77f277840ea780b73173d715336ff446e18bfbe3080aabf76d55f1b
@@ -2,7 +2,7 @@ require_dependency "how_to/application_controller"
2
2
 
3
3
  module HowTo
4
4
  class ContentsController < ApplicationController
5
- before_filter :authorise_how_to_manage!
5
+ before_action :authorise_how_to_manage!
6
6
 
7
7
  def index
8
8
  @contents = Content.all
@@ -2,7 +2,7 @@ require_dependency "how_to/application_controller"
2
2
 
3
3
  module HowTo
4
4
  class FaqController < ApplicationController
5
- before_filter :authorise_how_to_view!
5
+ before_action :authorise_how_to_view!
6
6
 
7
7
  def show
8
8
  end
@@ -2,7 +2,7 @@ require_dependency "how_to/application_controller"
2
2
 
3
3
  module HowTo
4
4
  class SectionsController < ApplicationController
5
- before_filter :authorise_how_to_manage!
5
+ before_action :authorise_how_to_manage!
6
6
 
7
7
  def index
8
8
  @sections = Section.all
@@ -12,8 +12,8 @@ module HowTo
12
12
 
13
13
  scope :active, -> { where(active: true) }
14
14
  scope :roots_only, -> { where(:parent_id => nil) }
15
- scope :without, ->(id) { where("id <> ? ", id) if id.present? }
16
- scope :with_content, -> { where("contents_count > 0") }
15
+ scope :without_ids, ->(id) { where("id <> ? ", id) if id.present? }
16
+ scope :having_content, -> { where("contents_count > 0") }
17
17
  scope :ordered, -> { order("position ASC") }
18
18
 
19
19
  # class Translation
@@ -1,7 +1,7 @@
1
- <div class="faq_content" id="faq_content" style="padding: 0">
1
+ <div class="faq_content" id="faq_content" style="padding: 0; margin-top: 15px">
2
2
  <div class="col-md-9">
3
3
  <div id="primary">
4
- <% HowTo::Section.with_content.ordered.each do |section| %>
4
+ <% HowTo::Section.having_content.ordered.each do |section| %>
5
5
  <div class="panel panel-primary">
6
6
  <div class="panel-heading" id="<%= dom_id(section) %>">
7
7
  <h3 class="panel-title"><%= section.name %></h3>
@@ -5,7 +5,7 @@
5
5
  <div class="control-group">
6
6
  <%= f.label :parent_section, :class => 'control-label' %>
7
7
  <div class="controls">
8
- <%= f.select :parent_id, nested_set_options(HowTo::Section.active.roots_only.without(@section.id)) { |i| "#{'-' * i.level} #{i.name}" }, {:prompt => 'select'}, :'chosen-enabled' => true %>
8
+ <%= f.select :parent_id, nested_set_options(HowTo::Section.active.roots_only.without_ids(@section.id)) { |i| "#{'-' * i.level} #{i.name}" }, {:prompt => 'select'}, :'chosen-enabled' => true %>
9
9
  </div>
10
10
  </div>
11
11
 
@@ -1,3 +1,3 @@
1
1
  module HowTo
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: how_to
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muntasim Ahmed