| Class | EnterpriseValidationController |
| In: |
app/controllers/my_profile/enterprise_validation_controller.rb
|
| Parent: | MyProfileController |
# File app/controllers/my_profile/enterprise_validation_controller.rb, line 17
17: def approve
18: @pending = profile.find_pending_validation(params[:id])
19: if @pending
20: @pending.approve
21: redirect_to :action => 'view_processed', :id => @pending.code
22: else
23: render_not_found
24: end
25: end
# File app/controllers/my_profile/enterprise_validation_controller.rb, line 9
9: def details
10: @pending = profile.find_pending_validation(params[:id])
11: unless @pending
12: render_not_found
13: end
14: end
# File app/controllers/my_profile/enterprise_validation_controller.rb, line 54
54: def edit_validation_info
55: @info = profile.validation_info
56: if request.post?
57: if @info.update_attributes(params[:info])
58: redirect_to :action => 'index'
59: end
60: end
61: end
# File app/controllers/my_profile/enterprise_validation_controller.rb, line 5 5: def index 6: @pending_validations = profile.pending_validations 7: end
# File app/controllers/my_profile/enterprise_validation_controller.rb, line 43
43: def list_processed
44: @processed_validations = profile.processed_validations
45: end
# File app/controllers/my_profile/enterprise_validation_controller.rb, line 28
28: def reject
29: @pending = profile.find_pending_validation(params[:id])
30: if @pending
31: @pending.reject_explanation = params[:reject_explanation]
32: begin
33: @pending.reject
34: redirect_to :action => 'view_processed', :id => @pending.code
35: rescue ActiveRecord::RecordInvalid
36: render :action => 'details'
37: end
38: else
39: render_not_found
40: end
41: end