Created
December 2, 2013 17:08
Revisions
-
mamhoff created this gist
Dec 2, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ class AdminsController < ApplicationController def new @admin = Admin.new end def show @admin = Admin.find(params[:id]) end def create @admin = Admin.new(admin_params) if @admin.save flash[:success] = "Welcome to the Solar Explorer!" redirect_to @admin else render 'new' end end private def admin_params params.require(:admin).permit(:name, :email, :password, :password_confirmation) end end 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ class GuidesController < ApplicationController def new @guide = Guide.new end def show @guide = Guide.find(params[:id]) end def create @guide = Guide.new(guide_params) if @guide.save flash[:success] = "Welcome to the Solar Explorer!" redirect_to @guide else render 'new' end end private def guide_params params.require(:guide).permit(:name, :email, :password, :password_confirmation) end end