crudify 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/crudify/hook_methods.rb +2 -2
- data/lib/crudify/version.rb +1 -1
- metadata +1 -1
data/lib/crudify/hook_methods.rb
CHANGED
@@ -62,7 +62,7 @@ module Crudify
|
|
62
62
|
unless request.xhr?
|
63
63
|
if params[:commit].match(/continue/)
|
64
64
|
if params[:action] == 'create'
|
65
|
-
redirect_to request.referer.sub('new', "#{what.to_param}/edit")
|
65
|
+
redirect_to request.referer.sub('new', "#{@what.to_param}/edit")
|
66
66
|
else
|
67
67
|
redirect_to request.referer
|
68
68
|
end
|
@@ -109,7 +109,7 @@ module Crudify
|
|
109
109
|
unless request.xhr?
|
110
110
|
render :action => request.post? ? 'new' : 'edit'
|
111
111
|
else
|
112
|
-
flash[:error] = [flash[:error], what.errors.collect{|key,value| "#{key} #{value}"}.join("<br/>")]
|
112
|
+
flash[:error] = [flash[:error], @what.errors.collect{|key,value| "#{key} #{value}"}.join("<br/>")]
|
113
113
|
render :partial => "/shared/message"
|
114
114
|
end
|
115
115
|
end
|
data/lib/crudify/version.rb
CHANGED