in_place_editing 1.1.1 → 1.1.2

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.
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.8.7
4
+ - ree
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gem "rails", "~> 3.0.10"
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "in_place_editing"
6
- s.version = "1.1.1"
6
+ s.version = "1.1.2"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["David Heinemeier Hansson", "Jeremy Kemper", "Jose Fernandez", "Pawel Stradomski, Mark Turner"]
9
9
  s.email = ["mark@amerine.net"]
@@ -16,7 +16,7 @@ module InPlaceEditing
16
16
  module ClassMethods
17
17
  def in_place_edit_for(object, attribute, options = {})
18
18
  define_method("set_#{object}_#{attribute}") do
19
- unless [:post, :put].include?(request.method_symbol) then
19
+ unless request.post? or request.put? then
20
20
  return render(:text => 'Method not allowed', :status => 405)
21
21
  end
22
22
  @item = object.to_s.camelize.constantize.find(params[:id])
@@ -60,6 +60,8 @@ module InPlaceMacrosHelper
60
60
  js_options['callback'] = "function(form) { return #{options[:with]} }" if options[:with]
61
61
  js_options['clickToEditText'] = %('#{options[:click_to_edit_text]}') if options[:click_to_edit_text]
62
62
  js_options['textBetweenControls'] = %('#{options[:text_between_controls]}') if options[:text_between_controls]
63
+ js_options['onComplete'] = %('#{options[:on_complete]}') if options[:on_complete]
64
+ js_options['onFailure'] = %('#{options[:on_failure]}') if options[:on_failure]
63
65
  function << (', ' + options_for_javascript(js_options)) unless js_options.empty?
64
66
 
65
67
  function << ')'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: in_place_editing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2011-08-24 00:00:00.000000000Z
15
+ date: 2011-09-05 00:00:00.000000000Z
16
16
  dependencies: []
17
17
  description: In Place Editing Rails Plugin
18
18
  email:
@@ -22,6 +22,8 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
  files:
24
24
  - .gitignore
25
+ - .travis.yml
26
+ - Gemfile
25
27
  - README.rdoc
26
28
  - Rakefile
27
29
  - in_place_editing.gemspec