Skip to content

Instantly share code, notes, and snippets.

View WolfpackGaming-SavSin's full-sized avatar

David Fountain WolfpackGaming-SavSin

View GitHub Profile
@WolfpackGaming-SavSin
WolfpackGaming-SavSin / _messages.html.erb
Last active January 23, 2019 02:47
Flash Messages using Semantic-UI and Devise
<!-- This is the partial I use to render messages to the layout -->
<% flash.each do | message_type, message_content | %>
<% flash.delete(:timedout) %> # Remove the :timedout key from the flash if it's present.
<div class="ui <%= flash_class(message_type) %> message transition">
<i class="close icon"></i>
<div class="header">
<%= message_content %>
</div>
</div>
<% end %>
Started POST "/update_profile" for 108.64.115.55 at 2018-03-04 18:53:32 +0000
Cannot render console from 108.64.115.55! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by UsersController#update_profile as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"ixUptosF3ckhMTmDc3/ch96XfjB0AmMecOWQN8VW3Y6icU0gNcOUPtN03Q89ryn5uEBvWTTy8R7br6gHgGiT8w==", "birthday"=>"1990-11-14", "website"=>"www.yodaoffroad.com", "bio"=>"This is a test bio Edited111", "show_name"=>"false", "show_email"=>"false", "show_birthday"=>"true", "show_website"=>"true", "button"=>""}
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
↳ /usr/local/rvm/gems/ruby-2.4.1/gems/activerecord-5.2.0.rc1/lib/active_record/log_subscriber.rb:98
[13, 22] in /home/ubuntu/rails_projects/yodaoffroad/app/controllers/users_controller.rb
13: @user = current_user
14: end
# app/models/user.rb
has_settings :user_show_settings, :user_settings
# app/views/users/edit_profile.html.erb
<div align="center">
<%= form_tag update_profile_path, method: :post do %>
<div class="form-group row no-padding text-center col-md-12">
<div class="col-md-10 profile-edit">
<strong> Birthday: </strong>
<%= text_field_tag :birthday, params[:birthday], placeholder: "Enter your birthday: YYYY-MM-DD", autofocus: true, value: @user.settings(:user_settings).birthday, class: 'form-control search-box input-sm' %>
#include "FBullCowGame.h"
#include <map>
#define TMap std::map
using FString = std::string;
using int32 = int;
bool IsLowercase(FString str);
FBullCowGame::FBullCowGame(){ Reset(); }