This is not the problem with friendly id gem. The problem is that you are redirecting to a show method without supplying id, hence params[:id]
is nil.
You can go around this by changing your show
method:
def show
@current_user = current_user # why do you need this?
@user = params[:id] ? User.friendly.find(params[:id]) : current_user
@username = "@" + @user.username
@posting = Posting.new
end