acts_as_multipart_form 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/VERSION +1 -1
- data/acts_as_multipart_form.gemspec +2 -2
- data/lib/acts_as_multipart_form/multipart_form_in_controller.rb +7 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.15
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "acts_as_multipart_form"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.15"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeremiah Hemphill", "Ethan Pemble"]
|
12
|
-
s.date = "2012-05-
|
12
|
+
s.date = "2012-05-24"
|
13
13
|
s.description = "Multipart forms using custom routes"
|
14
14
|
s.email = "jeremiah@cloudspace.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -131,11 +131,17 @@ module ActsAsMultipartForm
|
|
131
131
|
if(part.match(/_update$/))
|
132
132
|
if(result && result[:valid])
|
133
133
|
completed = redirect_to_next_multipart_form_part(form_name, @form_subject, part)
|
134
|
+
|
135
|
+
# if the form has been completed, set last_completed step to the first part of the form (JH 5-24-2012)
|
136
|
+
# the next time the user edits the form, they will go to the first page
|
137
|
+
# they should not be automatically redirected to the show page
|
138
|
+
saved_step = ( completed ? "none" : part )
|
139
|
+
|
134
140
|
# added form_subject_id in case it was not set when the in_progress_form was created (JH 5-15-2012)
|
135
141
|
# this would happen on a new page, but not an edit page
|
136
142
|
in_progress_form.update_attributes({
|
137
143
|
:form_subject_id => @form_subject.id,
|
138
|
-
:last_completed_step =>
|
144
|
+
:last_completed_step => saved_step,
|
139
145
|
:completed => completed })
|
140
146
|
else
|
141
147
|
# render the previous page but stay on this page so we keep the errors
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: acts_as_multipart_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.15
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jeremiah Hemphill
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2012-05-
|
14
|
+
date: 2012-05-24 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -258,7 +258,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
258
|
requirements:
|
259
259
|
- - ">="
|
260
260
|
- !ruby/object:Gem::Version
|
261
|
-
hash:
|
261
|
+
hash: 2070062318906622821
|
262
262
|
segments:
|
263
263
|
- 0
|
264
264
|
version: "0"
|