Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def plan
- if params[:argument]
- unless params[:argument] =~ /^[1-4]$/
- flash[:notice] = 'Invalid plan number.'
- redirect_to :action => :index
- exit
- return
- end
- end
- @id = params[:id]
- # Pick the plan and then go to the
- # purchase page.
- if params[:argument]
- @firm = Firm.find(@id)
- @firm.plan = params[:argument].to_i
- if @firm.save
- redirect_to "/buy/first_account/#{@firm.id}"
- end
- end
- end
Add Comment
Please, Sign In to add comment