text
stringlengths
10
2.61M
# => Contient la classe FenetreNiveau pour la fenêtre de choix de la difficulté # # => Author:: Valentin, DanAurea # => Version:: 0.1 # => Copyright:: © 2016 # => License:: Distributes under the same terms as Ruby ## ## classe FenetreNiveau ## class FenetreNiveau < View # VI box @boxTop ...
class FontIbmPlexSansCondensed < Formula head "https://github.com/google/fonts.git", verified: "github.com/google/fonts", branch: "main", only_path: "ofl/ibmplexsanscondensed" desc "IBM Plex Sans Condensed" homepage "https://fonts.google.com/specimen/IBM+Plex+Sans+Condensed" def install (share/"fonts").inst...
FactoryGirl.define do factory :product do name { 'Product A' } price { 30 } description { 'Good Product' } end end
require 'spec_helper' describe Stage do describe 'synchronization' do let!(:remote_attrs) do [ build(:remote_stage, tour_id: '1', eman: 'ignored'), build(:remote_stage, tour_id: '2'), build(:remote_stage, tour_id: '3') ] end describe 'skipping with before_sync hook' d...
#!/usr/bin/env ruby require 'optparse' require 'rubygems' require 'aejis_backup' options = {} optparse = OptionParser.new do |opts| opts.banner = "\nUsage: backup [options]\n " opts.on('-c', '--config [PATH]', "Path to backup configuration") do |config| options[:config] = config end opts.on('-b x,y,z',...
module PermitConcern extend ActiveSupport::Concern module ClassMethods private # DSL # Разрешить передачу параметров из params # @param [Hash] attributes def permit(attributes) attributes = attributes.symbolize_keys @permitter = ->(params_scope, controller) do (params_scope....
class PosdsController < ApplicationController before_action :set_posd, only: [:show, :edit, :update, :destroy, :upvote] before_filter :authenticate_user!, :only => [:edit, :new, :destroy] # GET /posds # GET /posds.json def index @posds = Posd.order ('publish_date DESC') @posds = @posds.published ...
# class Hamming def self.compute(string1, string2) raise ArgumentError if string1.length != string2.length string1.chars.zip(string2.chars).count { |a, b| a != b } end end
# frozen_string_literal: true require "spec_helper" module Decidim module Amendable describe CreateDraft do let!(:component) { create(:opinion_component, :with_amendments_enabled) } let!(:user) { create :user, :confirmed, organization: component.organization } let!(:amendable) { create(:opinio...
class Bill include Virtus.model attribute :name end class SampleInteraction include Faire input :some_string, klass: String input :name, nullify_blank: true input :other, required: false input :bill, klass: Bill def execute bill end end
module SQLiterate module Node module MultiString def value ([single_string.value] + \ t.elements.map do |e| e.single_string.value end ).join end end module Character module Quote def value "'" end end ...
include_recipe 'yumrepo::datadog' package 'datadog-agent' datadog_credentials = Chef::EncryptedDataBagItem.load('credentials', 'datadog') template '/etc/dd-agent/datadog.conf' do owner 'dd-agent' group 'root' mode '0640' variables datadog_apikey: datadog_credentials['api_key'], datadog_hostname: 'home.a-kno...
class CommentsController < ApplicationController def new @topic = Topic.find(params[:topic_id]) @comment = @topic.comments.new @comment.attributes = comment_params if request.post? end def confirm @topic = Topic.find(params[:topic_id]) if request.post? @comment = @topic.comments.new(co...
module OrientdbBinary module BinDataPrimitives class ProtocolString < BinData::Primitive endian :big int32 :len, value: -> { data.length } string :data, read_length: :len, onlyif: -> {len > -1} def get data end def set(v) self.data = v end end ...
require 'spec_helper' describe SrpmDecorator do it 'should return "&ndash;" on Srpm.short_url with empty url' do Srpm.new.decorate.short_url.should eq('&ndash;') end it 'should return "http://example.com" if url length less than 27' do srpm = Srpm.new(url: 'http://example.com').decorate html = srpm....
namespace :rates do desc "generate rates for rate-less exchanges" task :generate => :environment do Rails.logger.info "" Rails.logger.info "generate rates process started" Rails.logger.info "" current_rates = Currency.rates currency_updatable = Currency.updatable Exchange.with_no_r...
require 'spec_helper' describe "Affiliations" do before do mock_geocoding! @affiliation = FactoryGirl.create(:affiliation) end describe "without admin login" do it "should redirect to admin login" do get affiliations_path response.should redirect_to(new_admin_session_path) end en...
class CourseMeta < ActiveRecord::Base attr_accessible :course_name validates :course_name, :presence => true before_save :update_overall_scores has_many :courses has_many :course_reviews def update_overall_scores overallQualitySum = 0.0 difficultySum = 0.0 numOverallReviews = 0.0 numDifficul...
class Api::V1::UsersController < ApiController def current if current_user.nil? render json: {user: {}} else render json: current_user, serializer: CurrentUserSerializer end end end
class Tagging < ActiveRecord::Base validates :tag, :taggable, presence: :true validates :tag, uniqueness: { scope: [:taggable_id, :taggable_type] } belongs_to :taggable, polymorphic: true belongs_to :tag end
class GreenhousesController < ApplicationController before_action :set_greenhouse, only: [:show, :edit, :update, :destroy] # GET /greenhouses # GET /greenhouses.json def index @action_entries = ActionEntry.all @greenhouse = Greenhouse.first end end
class DropProductOrders < ActiveRecord::Migration[6.0] def change drop_table :product_orders end end
class CreateArrivalItems < ActiveRecord::Migration[5.2] def change create_table :arrival_items do |t| t.integer :arrival_count, :null => false t.datetime :arrival_time, :null => false t.integer :item_id, :null => false t.boolean :is_deleted, :null => false, :default =>false t.timest...
class Genre extend Concerns::Findable attr_accessor :name attr_reader :songs @@all = [] def initialize(name) @name = name @songs = [] end def self.all @@all end def self.destroy_all @@all.clear end def save @@all << self end def self.create(name) genre = Genre.new(name) genre.save genre...
require 'spec_helper' module Headjack describe Connection do let(:q1){"RETURN true"} let(:match_rel){ match( "id" => String, "type" => "TYPE", "startNode" => String, "endNode" => String, "properties" => {} ) } let(:match_node){ match( ...
class SessionsController < ApplicationController def create # this is what comes back from facebook @omniauth = request.env['omniauth.auth'] # save all our user details to the session session[:provider] = @omniauth[:provider] session[:provider_id] = @omniauth[:uid] session[:name] = @omniauth[:info][:na...
class UserCard < ActiveRecord::Base belongs_to :user belongs_to :card scope :with_cards, ->(cards){ where(card_id: cards) } end
class PagesController < ApplicationController def home @testVar = "Ruby" end end
class AddFieldToContractPayments < ActiveRecord::Migration def change add_column :contract_payments, :all_scope, :boolean end end
module Sudoku class Group class InvalidArgumentError < StandardError; end def initialize(cells) validate_input(cells) @cells = cells end def solved? cells.all? &:solved? end private attr_reader :cells def validate_input(cells) raise InvalidArgumentError if c...
class CreatePurchases < ActiveRecord::Migration[5.0] def change create_table :purchases do |t| t.string :total_amount t.date :valid_since t.date :valid_until t.references :vehicle, foreign_key: true t.references :payment, foreign_key: true t.timestamps end end end
require 'yaml' require_relative '../../tictactoeruby.core/exceptions/nil_reference_error.rb' require_relative '../../tictactoeruby.core/exceptions/invalid_value_error.rb' module TicTacToeRZ module Languages module YAMLReader def self.read_data(file_path, property) raise Exceptions::NilReferenceErro...
FactoryBot.define do factory :client_sentiment, class: IGMarkets::ClientSentiment do long_position_percentage 60.0 market_id 'EURUSD' short_position_percentage 40.0 trait :invalid do long_position_percentage 0.0 short_position_percentage 0.0 end end end
require 'optionparser' options = {} printers = Array.new OptionParser.new do |opts| opts.banner = "Usage: dfm [options][path]\nDefaults: dfm -xd ." + File::SEPARATOR opts.on("-f", "--filters FILTERS", Array, "File extension filters") do |filters| options[:filters] = filters end opts.on("-x", "--duplicates...
module Gsa18f class EventFields def initialize(event = nil) @event = event end def relevant default end private attr_reader :event def default [ :duty_station, :supervisor_id, :title_of_event, :event_provider, :type_of_event, :cost_per_unit, :s...
class CreateCartSelections < ActiveRecord::Migration[6.0] def change create_table :cart_selections do |t| t.integer :cart_id t.integer :product_id end end end
class ItunesMusicGrazer extend GrazerBase def self.section_url; 'https://itunes.apple.com/gb/collection/pre-orders/id1?fcId=303241591' end def self.get_platform; 'MP3 Download' end def self.get_product_data(url) page = get_page(url) page.at('li.expected-release-date span.label').remove ...
# frozen_string_literal: true module Api::V1::Admin::Videos class ShowAction < ::Api::V1::BaseAction step :authorize step :validate, with: 'params.validate' try :find, catch: Sequel::NoMatchingRow private def find(input) ::Video.with_pk!(input.fetch(:id)) end end end
require 'gds_api/test_helpers/content_api' module SpecialistSectorHelper include GdsApi::TestHelpers::ContentApi def stub_specialist_sectors oil_and_gas = { slug: 'oil-and-gas', title: 'Oil and Gas' } sector_tags = [ oil_and_gas, { slug: 'oil-and-gas/wells', title: 'Wells', parent: oil_and_gas...
class CrimeWitnessesController < ApplicationController before_action :set_crime_witness, only: [:show, :edit, :update, :destroy] # GET /crime_witnesses # GET /crime_witnesses.json def index @crime_witnesses = CrimeWitness.all end # GET /crime_witnesses/1 # GET /crime_witnesses/1.json def show en...
class User < ActiveRecord::Base include ActiveModel::ForbiddenAttributesProtection has_many :participants has_many :kringles, through: :participants has_many :managed_kringles, class_name: "Kringle", as: :kringlehead rolify # Include default devise modules. Others available are: # :token_authenticatable,...
class WebhookAuthorization pattr_initialize :provided_auth_key def authorize ensure_auth_key_is_defined_in_production return true unless expected_auth_key provided_auth_key == expected_auth_key end private def ensure_auth_key_is_defined_in_production if Rails.env.production? && !expected_a...
class Minimap attr_accessor :position def initialize(map) @map = map @map_data = [] @width = 0 @height = 0 @position = Omega::Vector3.new(0, 0, 10_000) @frame = 0 @block_size = 3 update_map_data([]) end def update(entities) if @f...
Rails.application.routes.draw do namespace 'auth', defaults: { business: 'auth' } do controller :sign do match :sign, via: [:get, :post] get 'sign/token' => :token post 'sign/mock' => :mock post 'sign/code' => :code post :login get :logout end scope :password, control...
# frozen_string_literal: true ActiveAdmin.register CourseCategory do permit_params :name menu parent: 'Corsi' filter :name index do selectable_column id_column column :name actions end show do |_category| attributes_table do row :id row :name end end form do |f...
# # Cookbook Name:: newznab # Recipe:: default # # Copyright 2012, YOUR_COMPANY_NAME # # All rights reserved - Do Not Redistribute # newznab_download_url = "http://www.newznab.com/newznab-#{ node.newznab.version }.zip" if node.os == 'linux' if node.platform == 'ubuntu' package 'unzip' user node.newznab.us...
# encoding: UTF-8 module API module V1 class UsersMe < API::V1::Base helpers API::Helpers::V1::UsersHelpers helpers API::Helpers::V1::SharedParamsHelpers helpers API::Helpers::V1::SharedServiceActionsHelpers before do authenticate_user end namespace :users do ...
class Cocktail < ActiveRecord::Base belongs_to :user has_many :comments validates :title, presence: true validates :ingredients, presence: true validates :recipe, presence: true end
require 'elasticsearch' namespace :elasticsearch do es = Elasticsearch::Client.new Tripgraph::Application.config.elasticsearch desc "Delete all elasticsearch indices" task reset: :environment do es.indices.delete index: '_all' end end
require 'test_helper' class UsersSignupTest < ActionDispatch::IntegrationTest test "invalid signup information" do get signup_path # Not necessary, included for clarity. Also ensures signup form renders properly assert_select 'form[action="/signup"]' # Ensures the url being posted to is correct assert_...
class Api::V1::MealsController < Api::V1::BaseController skip_before_action :verify_authenticity_token def index @user = current_user @meals = current_user.meals.order(created_at: :desc) end def show @meal = Meal.find(params[:id]) end def create @meal = Meal.new(meal_params) @dish = D...
# frozen_string_literal: true module ContactsHelper # @param dob [Date] def format_dob(dob) dob&.strftime '%Y %B %e' end def error_list(contact) content_tag :ol, class: 'list-group list-group-numbered' do contact.error_list.split("\n").map do |error| content_tag(:li, error, class: 'list...
class SpMarketCap < ActiveRecord::Base def self.get_mkt_caps start_date = SpMarketCap.all.map(&:date).max || Date.new(2006,9,29) # start with end months search_dates = (start_date..(Date.today - 1.day)).map { |date| [(Date.today - 1.day), date.end_of_month].min }.uniq search_dates.each do |d| p...
class OrdersController < ApplicationController before_action :move_to_order, except: [:index] before_action :set_item, only: [:index, :new, :create] before_action :authenticate_user!, expect: [:index] before_action :redirect_to_root, only: [:index] def index end def new @Purchase = OrderPurchase...
# Deaf Grandma Program SI Homework # Julia Les 5/03/16 # Prompt: Write a Deaf Grandma program. Whatever you say to grandma # (user input) she should respond with HUH?!, SPEAK UP SONNY!, # unless you shout it (type in all CAPS). If you shout, she can hear # you and yells back NO, NOT SINCE 1938! Grandma should shout...
class NotesController < ApplicationController before_action :set_note, only: [:show, :edit, :update, :destroy] # GET /notes # GET /notes.json def index @notes = Note.all end def new_import @note = Note.new end def import begin Note.sanitize_html(Note.import(params[:note][:import_fil...
require 'openssl' require 'base64' require File.dirname(__FILE__) + '/version' class SignedParams class NoKey < RuntimeError; end class Tampered < RuntimeError; end DEFAULT_DIGEST_PROC = Proc.new do | signer, payload | raise NoKey, "Please define a salt with SignedParams.salt = something" unless signer...
require 'cgi' class UserMailer < ActionMailer::Base def welcome_email recipients "rajakuraemas@gmail.com" from "[qTiest]Welcome Notification<notifications@example.com>" subject "Welcome to My Awesome Site" sent_on Time.now end end
class PostsController < ApplicationController before_action :logged_in_user, only: [:new, :create] def new @post = Post.new end def create @post = Post.new(user_params) @post.name = @current_user.name @post.user_id = @current_user.id if @post.save flash[:success] = "Post created successfully" redi...
class FeedbacksController < ApplicationController def index @feedbacks = Feedback.order('id DESC').paginate page: params[:page], per_page: 30 end end
class Itemtag < ApplicationRecord has_many :template_taggings, dependent: :destroy has_many :templates, through: :template_taggings def associate_with(template_id) TemplateTagging.upsert(template_id: template_id, itemtag_id: self.id) end def self.create_from_tag_string(tag_string) p tag_string I...
module Bootcamp class TimeFormatter attr_reader :seconds def initialize(seconds) @seconds = seconds end def format_time hours = seconds / 3600 minutes = (seconds - (hours * 3600)) / 60 remaining_seconds = seconds - (hours * 3600) - (minutes * 60) hours_part = '' h...
require 'helper_frank' module Rdomino describe 'Session' do it 'raises Exeption when already connected' do assert_raises Error::AlreadyConnected do Rdomino.connect :user => 'Global' end end end end
module BackpackTF # Base class for accessing a BackpackTF API class Interface class << self attr_reader :format, :callback, :appid, :name, :version end @format = 'json' @callback = nil @appid = '440' # @param options [Hash] # @option options [String] :format The format desir...
control "open-development-environment-devbox-script-networking" do title "open-development-environment-devbox-script-networking control" describe file("/etc/network/interfaces") do it { should exist } it { should be_owned_by 'root' } it { should be_grouped_into 'root' } it { should be_readable.by_u...
class IngredientSerializer < ActiveModel::Serializer belongs_to :category has_many :recipes, through: :recipe_ingredients has_many :recipe_ingredients attributes :id, :name, :description, :category_id, :vegan, :image end
# This vagrantfile creates a VM that is capable of running Fabric Workshop sample network Vagrant.require_version ">= 1.7.4" Vagrant.configure('2') do |config| config.vm.box = "bento/ubuntu-20.04" config.vm.hostname = "fabric-workshop" config.vm.synced_folder "..", "/home/vagrant/fabric" config.ssh.forward_ag...
class UsersController < ApplicationController layout 'apps' before_filter :admin_required, :except => :waitlist def index respond_to do |format| format.html # index.html.erb (no data required) format.ext_json { pagination_state = update_pagination_state_with_params!(:app) @u...
# frozen_string_literal: true module Decidim module Opinions # A module with all the gallery common methods for opinions # and collaborative draft commands. # Allows to create several image attachments at once module GalleryMethods include ::Decidim::GalleryMethods private def gal...
class V1::BaseAPI < Grape::API AUTH_HEADER_DESCRIPTION = { 'X-Hoshino-Api-Key' => { description: 'API認証キーを設定', required: true } } rescue_from Grape::Exceptions::ValidationErrors do |e| error_response(message: e.message, status: 400) end end
# from https://gist.github.com/1258681 # # your config.ru # require 'unicorn_killer' # use UnicornKiller::MaxRequests, 1000 # use UnicornKiller::Oom, 400 * 1024 module UnicornKiller module Kill def quit sec = (Time.now - @process_start).to_i warn "#{self.class} send SIGQUIT (pid: #{Process.pid})\tal...
module FacilitiesManagement::Beta::Supplier::SupplierAccountHelper include FacilitiesManagement::Beta::RequirementsHelper def accepted_page ['accepted', 'live', 'not signed', 'withdrawn'] end def warning_title WARNINGS.each { |status, text| return text if @page_data[:procurement_data][:status] == stat...
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) + '/lib/' require 'knife-table/version' Gem::Specification.new do |s| s.name = 'knife-table' s.version = KnifeTable::VERSION.version s.summary = 'Help chef set and serve the table' s.author = 'Chris Roberts' s.email = 'chrisroberts.code@gmail.com' ...
# frozen_string_literal: true require 'savon' client = Savon.client(wsdl: 'http://www.learnwebservices.com/services/hello?WSDL') response = client.call( :say_hello, soap_action: '', message: { 'HelloRequest' => { 'Name' => 'John Doe' } } ) puts response.body[:say_hello_response][:hello_response][:message] # Hel...
name 'elasticsearch' maintainer 'Thomas Cate' maintainer_email 'tcate@chef.io' license 'MIT license' description 'Installs/Configures elasticsearch' long_description 'Installs/Configures elasticsearch' version '0.0.3' depends 'apt', '~> 4.0.2'
class MobileDevice < ActiveRecord::Base belongs_to :user validates_presence_of :gcm_token validates_uniqueness_of :gcm_token, :scope => :user end
require 'jump_in/authentication' module JumpIn module Strategies module Session def self.included(klass) klass.register_jumpin_callbacks( on_login: [:set_user_session], on_logout: [:remove_user_session], get_current_user: [:current_user_from_session] ) ...
module TroleGroups module Storage autoload :BaseMany, 'trole_groups/storage/base_many' # autoload :BitMany, 'trole_groups/storage/bit_many' autoload :EmbedMany, 'trole_groups/storage/embed_many' autoload :RefMany, 'trole_groups/storage/ref_many' # autoload :StringMany, 'trole_groups/stora...
module Ironwood class MapDisplay attr_reader :map, :fov, :map_memory, :width, :height def initialize map, width, height @map = map @map_memory = MapMemory.new(map) @width = width @height = height end def player map.mobs.player end def viewport_tiles ((player.fov.actor_y - (height...
require 'liquid' require 'date' module TackleBox module Email class Template module Tags class Date < Liquid::Tag def render(context) ::Date.today.strftime("%b %e") end end end end end end Liquid::Template.register_tag('date', TackleBox::Email:...
require ('pry') require ('pry-byebug') class KaraokeRoom #Get methods for name attr_reader :name def initialize(name)#Constructor method @name = name @clients = [] #@songs = [] end # Get methods # def get_karaoke_name() # @karaoke_name # end # def get_songs # return @songs.map {|@s...
Sequel.migration do up do run "create index series_register_id_year_idx on series(register_id, date_part('year', time))" end down do alter_table(:series) do drop_index name: 'series_register_id_year_idx' end end end
class StudyScheduleController < ApplicationController def change_page @page = params[:page] @arm = Arm.find params[:arm_id] @protocol = @arm.protocol @tab = params[:tab] @visit_groups = @arm.visit_groups.paginate(page: @page) end def change_tab @protocol = Protocol.find(params[:protocol_i...
class Encounter < ActiveRecord::Base belongs_to :monster has_many :levels has_many :dungeons, through: :levels def display "#{monster.name} x #{num_enemies} (id::#{id})" end # def self.get_encounter_id_from_display_string(option) option.split("::")[1].gsub(")", "") ...
class Trip < ActiveRecord::Base before_create :generate_code before_validation :geocode_everything belongs_to :owner, class_name: 'User' has_many :users, through: :trip_memberships has_many :trip_memberships, dependent: :destroy has_many :categories, through: :trip_categories has_many :trip_categories...
# FIXME HACK extension to ActiveRecord::Errors to allow error attributes to be renamed. This is # because otherwise we'll end up producing very confusing error messages complaining about :secret, # :encrypted_secret, and so forth when all the user really cares about is :password. class ActiveRecord::Errors def rename...
class User < ActiveRecord::Base has_many :dogs belongs_to :park has_many :walks, through: :dogs end
class RenameWrongFieldInAddresses < ActiveRecord::Migration def up rename_column :member_addresses, :langitude, :latitude end def down end end
module Oauth class Weibo < Provider def follow(uid) api_access('friendships/create', {'uid' => uid}, 'post') end def publish(content) api_access('statuses/update', {'status'=>content}, 'post') end def fetch_info api_access('users/show',{'uid' => uid}) end def basic_in...
#!/usr/bin/ruby -w require 'mechanize' require 'fileutils' require 'uri' require 'thwait' class SiteDump def initialize(url=nil, use_threads=true) @agent = Mechanize.new unless url.nil? @sitemap = @agent.get(url) end if use_threads @dump_fn = self.method(:d...
# frozen_string_literal: true require 'mondial_relay/translatable' require 'mondial_relay/formattable' require 'mondial_relay/has_defaults' require 'interactor/initializer' module MondialRelay class Operation include MondialRelay::Translatable include MondialRelay::Formattable include MondialRelay::HasD...
class Adduniqtodictionary < ActiveRecord::Migration def change change_column :dictionaries,:word,:string,:unique =>true end end
## # Load required libraries require 'soap/wsdlDriver' ## # Monkey patch WSDL parser to stop it moaning module WSDL class Parser def warn(msg) end end end ## # Provide interface to Quova geolocation service module Quova ## # Access details for WSDL description WSDL_URL="https://webservices.quova.com...
class Review < ApplicationRecord belongs_to :brewery end
########################################################################### ## ## stream_consumer ## ## Multi-threaded HTTP stream consumer, with asynchronous spooling ## and multi-threaded production. ## ## David Tompkins -- 05/30/2013 ## tompkins@adobe_dot_com ## ######################################################...
class Category < ActiveRecord::Base has_many :catrted_products has_many :products, through: :categorized_products end
module ConsoleUtils class ReplState IVAR = :"@__console_utils__" EMPTY_CONTEXT_ALERT = "Trying to setup with empty context".freeze ALREADY_EXTENDED_ALERT = "Trying to setup again on fully extended context".freeze CONTEXT_DEBUG_MSG = "Console instance: %p".freeze MODULE_EXTENDS_MSG = "e...
class PagesController < ApplicationController before_action :must_login, only: [:dashboard, :pricing, :documents, :vflex, :flexforward, :mycert, :learning, :labs, :upload, :upload_file, :pinpoint] before_action :can_see_pricing, only: [:pricing] before_action :can_print_cert, only: [:mycert] before_action :re...
# -*- encoding: utf-8 -*- class DeliveryMailsController < ApplicationController # GET /delivery_mails # GET /delivery_mails.json def index if params[:bp_pic_group_id] #グループメール @bp_pic_group = BpPicGroup.find(params[:bp_pic_group_id]) cond = ["bp_pic_group_id = ? and deleted = 0", @bp_pic_...
# frozen_string_literal: true require 'test_helper' class UserTest < ActiveSupport::TestCase # test "the truth" do # assert true # end def setup @email = 'hoge@email.com' @user = User.new(name: 'hoge', nickname: 'hogechan', email: @email, ...