str = <<EOS
問い合わせの内容です。
改行もされています。
HTMLとしては改行コードを<br>要素などに置き換えて表現しないと期待する表示になりません。
EOS
This file contains 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
require 'csv' | |
require 'nokogiri' | |
filename = "1day_checkup" | |
file_names = Dir.open('.',&:to_a).reject{|f| !f.include?(".xml")} | |
CSV.open("#{filename}.csv", "wb") do |csv| | |
csv << %w(保険者番号 被保険者証等記号 被保険者証等番号 カナ氏名) | |
file_names.each do |filename| |
This file contains 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
## リモート対応 | |
### リーダー、営業、経理などPCでの業務必要な方 | |
- PC、ポケットwifi付与 | |
### コールセンター | |
- スマホだけで予約システムを確認・対応更新でき、病院へ電話ができる状態にする※他共有はslackで行う | |
- USIMのみ配布しスマホから予約システム見て、病院手配(電話折衝)する | |
- [前提条件] | |
a. SIMロック解除可能なスマホを保有していること |
This file contains 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
provider "aws" { | |
region = "ap-northeast-1" | |
} | |
data "aws_ami" "recent_amazon_linux_2" { | |
most_recent = true | |
owners = ["amazon"] | |
filter { | |
name = "name" |
This file contains 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
Rails.application.routes.draw do | |
scope '(:locale)', locale: /#{I18n.available_locales.map(&:to_s).join('|')}/ do | |
# ==================================== | |
# For API | |
# ==================================== | |
namespace :api do | |
namespace :v1 do | |
resources :companies, path: 'cm/', only: [] do | |
resources :provinces, only: :index, defaults: { format: 'json' } | |
end |
This file contains 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 mysql_socket | |
@mysql_socket ||= [ | |
"/tmp/mysql.sock", # default | |
"/var/run/mysqld/mysqld.sock", # debian/gentoo | |
"/var/tmp/mysql.sock", # freebsd | |
"/var/lib/mysql/mysql.sock", # fedora | |
"/opt/local/lib/mysql/mysql.sock", # fedora | |
"/opt/local/var/run/mysqld/mysqld.sock", # mac + darwinports + mysql | |
"/opt/local/var/run/mysql4/mysqld.sock", # mac + darwinports + mysql4 | |
"/opt/local/var/run/mysql5/mysqld.sock", # mac + darwinports + mysql5 |
This file contains 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
## https://techracho.bpsinc.jp/hachi8833/2017_02_16/32827 | |
gem 'slim-rails' | |
gem 'seed-fu' | |
gem "aws-sdk-s3", require: false | |
gem 'image_processing' | |
gem 'ransack' | |
# gem 'bcrypt', '~> 3.1.7' | |
gem_group :development, :test do | |
gem 'rspec-rails', '~> 3.6.0' |
This file contains 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
diff --git app/controllers/goods_controller.rb app/controllers/goods_controller.rb | |
index 119862d..e4826ad 100644 | |
--- app/controllers/goods_controller.rb | |
+++ app/controllers/goods_controller.rb | |
@@ -1,15 +1,12 @@ | |
class GoodsController < ApplicationController | |
def create | |
- micropost = current_user.microposts.find_by(params[:content]) | |
- good = current_user.goods.find_or_create_by(micropost_id: micropost.id) | |
- good.save |
NewerOlder