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
set-option -g default-terminal 'screen-254color' | |
set-option -g terminal-overrides ',xterm-256color:RGB' | |
set -g prefix ^e | |
set -g base-index 1 # start indexing windows at 1 instead of 0 | |
set -g escape-time 0 # zero-out escape time delay | |
set -g history-limit 1000000 # increase history size (from 2,000) | |
set -g renumber-windows on # renumber all windows when any window is closed | |
set -g set-clipboard on # use system clipboard | |
set -g status-position top # macOS / darwin style |
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
RSpec.describe "Account", :type => :system do | |
it "creates an account" do | |
name = Faker::Name.name | |
email = Faker::Internet.email | |
password = Faker::Alphanumeric.alphanumeric(number: 10) | |
visit sign_up_path | |
within("#new_account") do |
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 ActiveStorage::BaseController < ApplicationController | |
include ActiveStorage::SetCurrent | |
before_action :authenticate_user! | |
protect_from_forgery with: :exception | |
def authenticate_user! | |
if current_user | |
else |
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
= form_tag "/admin/users/#{:id}/edit", method: :get do | |
.row | |
.col-sm-12.col-md-9 | |
= select_tag :id, options_from_collection_for_select(User.all, 'id', 'name',{ prompt: 'Find User' }), class: 'form-control select2' |
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
SELECT id FROM `caffeine_product_options`WHERE `product_option_title` = "we start with 5"; | |
UPDATE caffeine_product_options SET option_qty = option_qty - '$quantity' WHERE id= is_set_from_select |
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
ActionView::Template::Error (undefined method `to_datetime' for 0:Fixnum): | |
208: <div class="col-sm-4 col-xs-7"> | |
209: <%= f.select :dob_month, ['01', '02', '03','04', '05', '06','07', '08', '09','10', '11', '12'], :class => "float-right number", :prompt => "Month" %> | |
210: <%= f.select :dob_day, ['01', '02', '03','04', '05', '06','07', '08', '09','10', '11', '12','13', '14', '15','16', '17', '18','19', '20', '21','22','23', '24', '25','26', '27', '28','29', '30','31'], :class => "form-control margin-ten no-letter number", :prompt => "Day" %> | |
211: <%= f.date_select :dob_year, {:order => [:year], :start_year => 1920, :end_year => Time.now.year, :prompt => "Year" }, {:class => "texter"} %> | |
212: </div> | |
213: </div> | |
214: </div> | |
app/views/devise/registrations/_registrations.html.erb:211:in `block in _app_views_devise_registrations__registrations_html_erb__4136954747110916622_70221770454860' | |
app/views/devise/registrations/_registrations.html.erb: |
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
<%= f.date_select :dob_year, :start_year => 1995, :use_month_numbers => true %> | |
ActionView::Template::Error (undefined method `to_datetime' for 0:Fixnum): | |
208: <div class="col-sm-4 col-xs-7"> | |
1'], :class => "form-control margin-ten no-letter number", :prompt => "Day" %> | |
211: <%= f.date_select :dob_year, {:order => [:year], :start_year => 1920, :end_year => Date.today.year, :prompt => "Year" }, {:class => "texter"} %> | |
213: </div> | |
214: </div> | |
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 NotificationsMailer < ApplicationMailer | |
def notify(params) | |
@subject = params[:notification][:subject] | |
@message = params[:notification][:message] | |
users = params[:notification][:user_ids].reject(&:blank?) | |
additional_emails = params[:notification][:emails] | |
marketers = params[:notification][:marketer_ids].reject(&:blank?) | |
documents = params[:notification][:document_ids].reject(&:blank?) | |
state = params[:notification][:state] |
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
def find_emails_from_extra(search_term, name ) | |
emails = [] | |
emails << User.where(search_term: name).pluck(:email) | |
emails | |
end | |
how can I change the search_term: into whatever the attribute is? | |
so if I do | |
find_email_from_extra(employer_state, "FL") |
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
[ | |
['Alabama', 'AL'], | |
['Alaska', 'AK'], | |
['Arizona', 'AZ'], | |
['Arkansas', 'AR'], | |
['California', 'CA'], | |
['Colorado', 'CO'], | |
['Connecticut', 'CT'], | |
['Delaware', 'DE'], | |
['District Of Columbia', 'DC'], |
NewerOlder