Guest User

Untitled

a guest
Jun 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. class CountersController < ApplicationController
  2. # GET /counters
  3. # GET /counters.xml
  4. def index
  5. @counter1 = Counter.find(1)
  6. @counter2 = Counter.find(2)
  7. @value1 = @counter1.count
  8. @value2 = @counter2.count
  9.  
  10. end
  11.  
  12. def goza
  13. @counter2 = Counter.find(1)
  14. @counter2.count += 1
  15. @counter2.save
  16. redirect_to :action => "index"
  17.  
  18. end
  19.  
  20. def carl
  21. @counter2 = Counter.find(2)
  22. @counter2.count += 1
  23. @counter2.save
  24. redirect_to :action => "index"
  25.  
  26. end
  27.  
  28. end
Add Comment
Please, Sign In to add comment