inline_forms 1.2.8 → 1.2.9
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/bin/inline_forms +1 -1
- data/lib/app/assets/javascripts/inline_forms_application.js +0 -1
- data/lib/app/controllers/geo_code_curacao_controller.rb +12 -0
- data/lib/app/helpers/form_elements/geo_code_curacao.rb +9 -1
- data/lib/inline_forms.rb +0 -3
- data/lib/inline_forms/version.rb +1 -1
- metadata +5 -4
data/bin/inline_forms
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Used in autocomplete
|
2
|
+
#
|
3
|
+
class GeoCodeCuracaoController < ApplicationController
|
4
|
+
def index
|
5
|
+
@term = params[:term]
|
6
|
+
respond_to do |format|
|
7
|
+
format.html { render 'inline_forms/_list', :layout => 'inline_forms' } unless @Klass.not_accessible_through_html?
|
8
|
+
format.js { render :list }
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -6,8 +6,16 @@ def geo_code_curacao_show(object, attribute)
|
|
6
6
|
link_to_inline_edit object, attribute, attribute_value
|
7
7
|
end
|
8
8
|
def geo_code_curacao_edit(object, attribute)
|
9
|
-
|
9
|
+
attribute_value = object.send(attribute).presentation rescue nil
|
10
|
+
out = text_field_tag attribute, attribute_value
|
11
|
+
out << '<script>
|
12
|
+
$( "#geo_code_curacao" ).autocomplete({
|
13
|
+
source: "/clients",
|
14
|
+
minLength: 2,
|
15
|
+
});
|
16
|
+
</script>'.html_safe
|
10
17
|
end
|
18
|
+
|
11
19
|
def geo_code_curacao_update(object, attribute)
|
12
20
|
# extract the geocode
|
13
21
|
geo_code = params[attribute.to_sym][:street].scan(/\d\d\d\d\d\d/).to_s || nil
|
data/lib/inline_forms.rb
CHANGED
data/lib/inline_forms/version.rb
CHANGED
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: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 9
|
10
|
+
version: 1.2.9
|
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: 2012-01
|
18
|
+
date: 2012-02-01 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec-rails
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/app/assets/stylesheets/inline_forms_application.css
|
144
144
|
- lib/app/assets/stylesheets/jquery-ui-1.8.16.custom.css
|
145
145
|
- lib/app/assets/stylesheets/validation_tooltips.css
|
146
|
+
- lib/app/controllers/geo_code_curacao_controller.rb
|
146
147
|
- lib/app/controllers/inline_forms_controller.rb
|
147
148
|
- lib/app/helpers/form_elements/check_box.rb
|
148
149
|
- lib/app/helpers/form_elements/check_list.rb
|