Given this code, which choice would be expected to be a true statement if the user requests the index action? class DocumentsController < ApplicationController before_action :require_login def index @documents = Document.visible.sorted end end
1.The user’s documents will be loaded.
2.The index action will run normally because :index is not listed as an argument to before_action.
3. The require_login method will automatically log in the user before running the index action.
4.The index action will not be run if the require_login method calls render or redirect_to.
Posted Date:-2022-09-17 03:44:23