Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CountersController < ApplicationController
- # GET /counters
- # GET /counters.xml
- def index
- @counter1 = Counter.find(1)
- @counter2 = Counter.find(2)
- @value1 = @counter1.count
- @value2 = @counter2.count
- end
- def goza
- @counter2 = Counter.find(1)
- @counter2.count += 1
- @counter2.save
- redirect_to :action => "index"
- end
- def carl
- @counter2 = Counter.find(2)
- @counter2.count += 1
- @counter2.save
- redirect_to :action => "index"
- end
- end
Add Comment
Please, Sign In to add comment