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
= link_to [:edit, :admin, :hoge, @user, @item] | |
# /admin/hoge/users/@user.id/items/@item.id/edit | |
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
scope :search_with_japanese_favorite_movie, -> (user_id) { | |
eager_load(:user_favorite_movies) | |
.merge( UserFavoriteMovie.where(user_id: user_id) ) | |
.or( Movie.eager_load(:user_favorite_movies).where(made_in: "Japan") ) | |
} |
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
bin/rails erd attributes=foreign_keys,primary_keys,content filename=erd filetype=png |
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
find ./ -type f | wc -l |
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
class ApplicationController < ActionController::Base | |
before_action :set_request_from | |
# どこのページからリクエストが来たか保存しておく | |
def set_request_from | |
if session[:request_from] | |
@request_from = session[:request_from] | |
end | |
# 現在のURLを保存しておく | |
session[:request_from] = request.original_url |
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://trix-editor.org/ | |
シンプルで使いやすい | |
アップデートが多い | |
https://jhollingworth.github.io/bootstrap-wysihtml5/ | |
bootstrap製 | |
http://neilj.github.io/Squire/ |
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
######################### | |
## Sample Sass Lint File | |
######################### | |
# Linter Options | |
options: | |
# Don't merge default rules | |
merge-default-rules: false | |
# Set the formatter to 'html' | |
formatter: html | |
# Output file instead of logging results |
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のチェックを有効にする | |
Rails: | |
Enabled: true | |
# 日本語でのコメントを許可 | |
AsciiComments: | |
Enabled: false | |
# モジュール名::クラス名の定義を許可 | |
ClassAndModuleChildren: |
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
machine: | |
timezone: | |
Asia/Tokyo | |
ruby: | |
version: | |
2.3.1 | |
hosts: | |
hogehoge.local: 127.0.0.1 | |
fugafuga.local: 127.0.0.1 | |
dependencies: |
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
(function(window, $) { | |
//'use strict'; | |
var Device = function() { | |
var u = window.navigator.userAgent.toLowerCase(); | |
return { | |
isTablet: (u.indexOf("windows") != -1 && u.indexOf("touch") != -1) || u.indexOf("ipad") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") == -1) || (u.indexOf("firefox") != -1 && u.indexOf("tablet") != -1) || u.indexOf("kindle") != -1 || u.indexOf("silk") != -1 || u.indexOf("playbook") != -1, | |
isMobile: (u.indexOf("windows") != -1 && u.indexOf("phone") != -1) || u.indexOf("iphone") != -1 || u.indexOf("ipod") != -1 || (u.indexOf("android") != -1 && u.indexOf("mobile") != -1) || (u.indexOf("firefox") != -1 && u.indexOf("mobile") != -1) || u.indexOf("blackberry") != -1 | |
}; | |
}; |
OlderNewer