how_to 0.0.6 → 0.0.7

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.
@@ -14,7 +14,7 @@ module HowTo
14
14
  scope :roots_only, where(:parent_id => nil)
15
15
  scope :without, ->(id) { where("id <> ? ", id) if id.present?}
16
16
  scope :with_content, where("contents_count > 0")
17
- scope :ordered, order("`order` ASC")
17
+ scope :ordered, order("position ASC")
18
18
 
19
19
  class Translation
20
20
  attr_accessible :locale, :name
@@ -69,9 +69,9 @@
69
69
 
70
70
 
71
71
  <div class="control-group">
72
- <%= f.label :order, :class => 'control-label' %>
72
+ <%= f.label :position, :class => 'control-label' %>
73
73
  <div class="controls">
74
- <%= f.text_field :order, :class => 'text_field' %>
74
+ <%= f.text_field :position, :class => 'text_field' %>
75
75
  </div>
76
76
  </div>
77
77
  <div class="form-actions">
@@ -40,7 +40,7 @@
40
40
  <h3>Select Category</h3>
41
41
 
42
42
  <div id="sidetreecontrol"><a href="?#">Collapse All</a> | <a href="?#">Expand All</a></div>
43
- <%= sorted_nested_li(HowTo::Section.active, :order, "id='tree_root'") do |section| %>
43
+ <%= sorted_nested_li(HowTo::Section.active, :position, "id='tree_root'") do |section| %>
44
44
  <% if section.contents_count > 0 %>
45
45
  <%= link_to section.name, "##{dom_id(section)}" %>
46
46
  <% else %>
@@ -20,9 +20,9 @@
20
20
  <% end %>
21
21
 
22
22
  <div class="control-group">
23
- <%= f.label :order, :class => 'control-label' %>
23
+ <%= f.label :position, :class => 'control-label' %>
24
24
  <div class="controls">
25
- <%= f.text_field :order, :class => 'text_field'%>
25
+ <%= f.text_field :position, :class => 'text_field'%>
26
26
  </div>
27
27
  </div>
28
28
  <div class="form-actions">
@@ -0,0 +1,11 @@
1
+ class AlterOrderColumn < ActiveRecord::Migration
2
+ def up
3
+ rename_column :how_to_sections, :order, :position
4
+ rename_column :how_to_contents, :order, :position
5
+ end
6
+
7
+ def down
8
+ rename_column :how_to_sections, :position, :order
9
+ rename_column :how_to_contents, :position, :order
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module HowTo
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -2,10 +2,10 @@
2
2
 
3
3
  one:
4
4
  section_id: 1
5
- order: 1
5
+ position: 1
6
6
  active: false
7
7
 
8
8
  two:
9
9
  section_id: 1
10
- order: 1
10
+ position: 1
11
11
  active: false
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: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -151,6 +151,7 @@ files:
151
151
  - config/routes.rb
152
152
  - db/migrate/20130602053453_create_how_to_sections.rb
153
153
  - db/migrate/20130602054608_create_how_to_contents.rb
154
+ - db/migrate/20130906034009_alter_order_column.rb
154
155
  - lib/generators/how_to/config_generator.rb
155
156
  - lib/generators/how_to/layout_generator.rb
156
157
  - lib/generators/how_to/templates/how_to_config.rb