inline_forms 0.9.14 → 0.9.15
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.
- data/VERSION +1 -1
- data/app/controllers/inline_forms_controller.rb +2 -2
- data/app/helpers/inline_forms_helper.rb +1 -1
- data/inline_forms.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.15
|
@@ -54,7 +54,7 @@ class InlineFormsController < ApplicationController
|
|
54
54
|
@parent_class = params[:parent_class]
|
55
55
|
@parent_id = params[:parent_id]
|
56
56
|
@ul_needed = params[:ul_needed]
|
57
|
-
@parent_class.nil? ? conditions = [] : conditions = [ "#{@parent_class.foreign_key} = ?", @parent_id ]
|
57
|
+
@parent_class.nil? ? conditions = ["name like ?", "%#{params[:search]}%" ] : conditions = [ "name like ? AND #{@parent_class.foreign_key} = ?", "%#{params[:search]}%" , @parent_id ]
|
58
58
|
if cancan_enabled?
|
59
59
|
@objects = @Klass.accessible_by(current_ability).order(@Klass.order_by_clause).paginate :page => params[:page], :conditions => conditions
|
60
60
|
else
|
@@ -117,7 +117,7 @@ class InlineFormsController < ApplicationController
|
|
117
117
|
end
|
118
118
|
@parent_class = params[:parent_class]
|
119
119
|
@parent_id = params[:parent_id]
|
120
|
-
@parent_class.nil? ? conditions = [] : conditions = [ "#{@parent_class.foreign_key} = ?", @parent_id ]
|
120
|
+
@parent_class.nil? ? conditions = ["name like ?", "%#{params[:search]}%" ] : conditions = [ "name like ? AND #{@parent_class.foreign_key} = ?", "%#{params[:search]}%" , @parent_id ]
|
121
121
|
object[@parent_class.foreign_key] = @parent_id unless @parent_class.nil?
|
122
122
|
if object.save
|
123
123
|
flash.now[:success] = "Successfully created #{object.class.to_s.underscore}."
|
@@ -57,7 +57,7 @@ module InlineFormsHelper
|
|
57
57
|
out << (link_to text, send(path_to_new, :update => update_span, :parent_class => parent_class, :parent_id => parent_id ), :remote => true)
|
58
58
|
out << "</li>"
|
59
59
|
""
|
60
|
-
raw out if cancan_disabled? || ( can? :
|
60
|
+
raw out if cancan_disabled? || ( can? :manage, parent_class.nil? ? Client : parent_class.find(parent_id) )
|
61
61
|
end
|
62
62
|
|
63
63
|
|
data/inline_forms.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{inline_forms}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.15"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ace Suares"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-15}
|
13
13
|
s.description = %q{Inline Forms aims to ease the setup of forms that provide inline editing. The field list can be specified in the model.}
|
14
14
|
s.email = %q{ace@suares.an}
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 37
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 15
|
10
|
+
version: 0.9.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ace Suares
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-15 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|