inline_forms 3.0.25 → 3.0.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZThhZDgyNzI2YTE2M2UxMzBjMGY0MTAyZjE2YzA1NTRlZDU4NDhmMg==
4
+ OTA1N2FkNTk2ZTU1ZjQ4ZjcxNWIwYzA5NzVhNTM2MTI4NjEzM2JjMw==
5
5
  data.tar.gz: !binary |-
6
- NDk4NDllOTUyZWRjMDIxNzAwZTMxMTI0ODMyYTdmNTVhZGQ3N2I3ZA==
6
+ NzJkMDRhYmM3ODhhZTVjNDZkOTZlNjY0NjJkZWViOTM3ZTIxNGYzMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTQ4NDNkZmU3ZjhiZTlmYmZlOTljOGYzZDgzMDBiMDQ5N2EwZmE1MDVjZjdm
10
- ODc4MDI2YTNkYjYxZDIxNjkxMGI0NGE4NTE5MDRlMmJjYmI2NTE5YjZiNWM3
11
- ZDVkNWUwYTQzYWMxYTNiZWUxOTY4ZmQxYjc0NDE5YjhmOGQ3YTU=
9
+ YmU0YmUxYjhkNzM5NDg4OTU4ZmNiYzQ0NGI4MDY5MjQxYzQ5NmI0NmM5Yjdm
10
+ NjViZDA4NWE3MGY0MGI5ODFhNzE3ZjFjNjlmMmE4ZGQxZjc3MTU4NTk2OGRk
11
+ YjBlZWRjOWY4OGYyMjg1YTZmZWQ2YTAxYzg4ZDJmYzNjZmJmMDA=
12
12
  data.tar.gz: !binary |-
13
- ZGM0ZDgwOGM0MTdjNDkwYWY5OTM3ZmQyNmI3NzhkNDc1Nzc0YzFiNGFhOWFj
14
- YTJlNTY1YzA4OGZiNGZiOTkwZWIyNjRmMGRkYWRmMTA1YjdlOTkxYzVlYjcz
15
- NTc0MjUxMmQ3MWFhZDViYjFhMjhmODJjNzk0ZWRmY2RjNDJkZmY=
13
+ NTkwOTc1NjI3NDlhZTRmN2Y5ZGUwMTFhZjg3MGQyYTAxZmYxZWRkYTZlNTMw
14
+ ZmU0MmM3MDNhMDhjOWU0NjE2YmZhZjQ5ZWMwNDVmZTEyYTIwOGJlOWM4MDhh
15
+ ZGZiYmJlOWQzN2M4M2I1MGJiMmE2NzY0NWFhNzE1MjM0NTdlN2I=
@@ -16,7 +16,7 @@ If you want to use mysql instead of sqlite as development database:
16
16
 
17
17
  If you want to install the example application:
18
18
 
19
- inline_forms create MyApp --example
19
+ inline_forms create MyApp -d sqlite --example
20
20
 
21
21
  Then point your browser to http://localhost:3000/apartments and log in with admin@example.com / admin999
22
22
 
@@ -32,6 +32,28 @@ You can install the example application manually if you like:
32
32
 
33
33
  Then point your browser to http://localhost:3000/apartments and log in with admin@example.com / admin999
34
34
 
35
+ = Build a vagrant virtualbox box for easier development
36
+
37
+ Go ahead and unzip lib/vagrant/vagrantbox-inline_forms.zip. Enter the created directory with
38
+
39
+ cd vagrantbox-inline_forms
40
+
41
+ then issue
42
+
43
+ vagrant up
44
+
45
+ after a while you should be able to use the created box like this:
46
+
47
+ vagrant ssh
48
+
49
+ Once inside the box, goto /vagrant and install_stuff:
50
+
51
+ cd /vagrant
52
+ ./install_stuff
53
+
54
+ This should update your box, install rvm and ruby and inline_forms, and create an example app.
55
+
56
+
35
57
  == Disclaimer
36
58
 
37
59
  It's work in progress. Until I learn to use git branch, new releases break as easy as Elijah Price's bones.
@@ -39,5 +61,5 @@ It's work in progress. Until I learn to use git branch, new releases break as ea
39
61
 
40
62
  == Copyright
41
63
 
42
- Copyright (c) 2011-2013 Ace Suares. See LICENSE.txt for further details.
64
+ Copyright (c) 2011-2015 Ace Suares. See LICENSE.txt for further details.
43
65
 
@@ -15,7 +15,7 @@ def image_field_show(object, attribute)
15
15
  end
16
16
 
17
17
  def image_field_edit(object, attribute)
18
- file_field_tag attribute, :class => 'input_text_field'
18
+ file_field_tag attribute, class: 'input_text_field'
19
19
  end
20
20
 
21
21
  def image_field_update(object, attribute)
@@ -0,0 +1,24 @@
1
+ # -*- encoding : utf-8 -*-
2
+ InlineForms::SPECIAL_COLUMN_TYPES[:multi_image_field]=:string
3
+
4
+ def multi_image_field_show(object, attribute)
5
+ o = object.send(attribute)
6
+ msg = "<i class='fi-plus'></i>".html_safe
7
+ if o.send(:present?)
8
+ if o.respond_to? :palm
9
+ msg = image_tag(o.send(:palm).send(:url))
10
+ else
11
+ msg = image_tag(o.send(:url))
12
+ end
13
+ end
14
+ link_to_inline_edit object, attribute, msg
15
+ end
16
+
17
+ def multi_image_field_edit(object, attribute)
18
+ file_field_tag attribute, multiple: true, class: 'input_text_field multi_image_field'
19
+ end
20
+
21
+ def multi_image_field_update(object, attribute)
22
+ object.send(attribute.to_s + '=', params[attribute.to_sym])
23
+ end
24
+
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "3.0.25"
3
+ VERSION = "3.0.26"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.25
4
+ version: 3.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-07 00:00:00.000000000 Z
11
+ date: 2015-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rvm
@@ -209,6 +209,7 @@ files:
209
209
  - lib/app/helpers/form_elements/month_select.rb
210
210
  - lib/app/helpers/form_elements/month_year_picker.rb
211
211
  - lib/app/helpers/form_elements/move.rb
212
+ - lib/app/helpers/form_elements/multi_image_field.rb
212
213
  - lib/app/helpers/form_elements/pdf_link.rb
213
214
  - lib/app/helpers/form_elements/plain_text_area.rb
214
215
  - lib/app/helpers/form_elements/question_list.rb