kitsune 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/generators/kitsune/kitsune_generator.rb +1 -0
- data/lib/kitsune.rb +1 -1
- data/lib/kitsune/page.rb +6 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rake'
|
|
2
2
|
|
3
3
|
gem_spec = Gem::Specification.new do |gem_spec|
|
4
4
|
gem_spec.name = "kitsune"
|
5
|
-
gem_spec.version = "0.1.
|
5
|
+
gem_spec.version = "0.1.2"
|
6
6
|
gem_spec.summary = "Integrated Rails Content Management System."
|
7
7
|
gem_spec.email = "matt@toastyapps.com"
|
8
8
|
gem_spec.homepage = "http://github.com/toastyapps/kitsune"
|
@@ -22,6 +22,7 @@ class KitsuneGenerator < Rails::Generator::Base
|
|
22
22
|
end
|
23
23
|
|
24
24
|
unless !!@dont_include_users
|
25
|
+
m.sleep 1 unless !!@dont_include_pages
|
25
26
|
m.migration_template "migrations/create_kitsune_users.rb", 'db/migrate', :migration_file_name => "kitsune_create_kitsune_users"
|
26
27
|
end
|
27
28
|
|
data/lib/kitsune.rb
CHANGED
data/lib/kitsune/page.rb
CHANGED
@@ -9,10 +9,14 @@ module Kitsune
|
|
9
9
|
|
10
10
|
before_save :update_url
|
11
11
|
belongs_to :page, :foreign_key => "parent_id"
|
12
|
-
belongs_to :parent
|
12
|
+
belongs_to :parent, :class_name => 'Page'
|
13
13
|
|
14
14
|
def update_url
|
15
|
-
|
15
|
+
unless url.present?
|
16
|
+
write_attribute :url, CGI.escape(title.downcase.gsub(/\s+/, '-'))
|
17
|
+
else
|
18
|
+
write_attribute :url, CGI.escape(url)
|
19
|
+
end
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|