Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # GET /todos
- # GET /todos.json
- def index
- @todos = current_user.todos.all
- if params.has_key?(:done)
- @todos = @todos.where(done: !!params[:done]) # !! forces the boolean context
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement