wheels 0.0.42 → 0.0.43

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.42
1
+ 0.0.43
@@ -20,7 +20,6 @@ class UsersController < InheritedResources::Base
20
20
  end
21
21
 
22
22
  def resource
23
- a = ValidatorCallbacks.new
24
23
  @user ||= lambda{
25
24
  user = User.find(current_user)
26
25
  user.class_eval do
data/app/models/page.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class Page < ActiveRecord::Base
2
2
  has_many :attachments
3
- validates_presence_of :title
3
+ validates :title, :presence=>true
4
4
  belongs_to :parent, :class_name=>'Page', :foreign_key=>'parent_id'
5
5
  has_many :children, :class_name=>'Page', :foreign_key=>'parent_id'
6
6
  acts_as_taggable
@@ -8,3 +8,20 @@
8
8
  = form_for form_object, {:url=>form_url} do |f|
9
9
  = render :partial => "form_fields", :locals=>{:f=>f}
10
10
 
11
+ = content_for :head do
12
+ = javascript_include_tag 'jquery-validate/jquery.validate.pack'
13
+
14
+ :javascript
15
+ $(function(){
16
+ jQuery.validator.addMethod("verify_user", function(value, element, params) {
17
+ //alert($(element).attr('data-verify-user-path'));
18
+ xhr = $.ajax({
19
+ async: false,
20
+ url: $(element).attr('data-verify-user-path')+ '?password='+value
21
+ });
22
+ return xhr.responseText=="true";
23
+ }, "Password is incorrect.");
24
+
25
+ $('form').validate();
26
+ });
27
+
@@ -8,9 +8,9 @@
8
8
  = f.label :title
9
9
  = f.text_field :title
10
10
 
11
- .field
11
+ .textarea
12
12
  = f.label :body
13
- = f.text_area :body, :class=>'ckeditor_textarea'
13
+ = f.text_area :body, :class=>'ckeditor_textarea', :cols=>100
14
14
  .actions
15
15
  = f.submit 'Save'
16
16
 
data/wheels.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wheels}
8
- s.version = "0.0.42"
8
+ s.version = "0.0.43"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyler Gannon"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 42
9
- version: 0.0.42
8
+ - 43
9
+ version: 0.0.43
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tyler Gannon