Last active
June 6, 2017 16:27
-
-
Save ryenski/6b7826e882c96591f0448205e78e0195 to your computer and use it in GitHub Desktop.
Example controller using Single Table Inheritance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OptInsController < FormsController | |
private | |
def skope | |
current_user.opt_ins | |
end | |
def form_params | |
params[:form] = params[:opt_in] | |
params.require(:form).permit(permitted_params) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment