- findしたものをARにどうやって詰めるのか
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 prefix(depth=1) | |
s = ' | ' | |
s * depth | |
end | |
def included_modules(klass, hash) | |
modules = Object.const_get(klass).included_modules | |
modules.delete(Kernel) | |
if modules | |
modules.map do |c| |
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
$ r s | |
dyld: lazy symbol binding failed: Symbol not found: _rb_data_object_alloc | |
Referenced from: /Users/takuyan/dev/github/scrum/vendor/bundle/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle | |
Expected in: flat namespace | |
dyld: Symbol not found: _rb_data_object_alloc | |
Referenced from: /Users/takuyan/dev/github/scrum/vendor/bundle/gems/nokogiri-1.6.6.2/lib/nokogiri/nokogiri.bundle | |
Expected in: flat namespace | |
[1] 30819 trace trap rails s |
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
$ gem install therubyracer rbenv:2.2.4 | |
Fetching: libv8-3.16.14.13.gem (100%) | |
Building native extensions. This could take a while... | |
ERROR: Error installing therubyracer: | |
ERROR: Failed to build gem native extension. | |
/Users/takuyan/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20160324-16905-11t0grf.rb extconf.rb | |
creating Makefile | |
Compiling v8 for x64 | |
Using python 2.7.8 |
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
{ | |
"app/serializers/*_serializer.rb": { | |
"command": "serializer", | |
"related": "app/model/*.rb", | |
"alternate": "spec/serializers/%s_spec.rb" | |
}, | |
"app/assets/javascripts/models/*.js.coffee": { | |
"command": "jmodel", | |
"alternate": "spec/javascripts/models/%s_spec.js.coffee", | |
"template": "class @AppName.Models.%S extends Backbone.Model" |
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
group :development do | |
# ... | |
gem 'capistrano' | |
gem 'capistrano-rails' | |
gem 'capistrano-rbenv' | |
gem 'capistrano-bundler' | |
# ... | |
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
#= require jquery | |
#= require jquery.turbolinks | |
#= require turbolinks | |
#= require_self | |
returnAlert = -> | |
$(document).on 'page:before-change', -> | |
url = document.location.href | |
if url.match('(new|edit)$') | |
confirm 'Are you sure?' |
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
# # if Zero | |
# = switch_if(0) do | |
# h1 | |
# ... | |
# # => <div class='zero' id='zero'><h1>...</h1></div> | |
# | |
# # if One | |
# = switch_if(1) do | |
# h1 | |
# ... |
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
module ApplicationHelper | |
def icon_name_for(name) | |
sym_name = name.to_sym | |
case sym_name | |
when :home | |
'icon-dashboard' | |
when :team | |
'icon-group' | |
when :content | |
'icon-pencil' |
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
~ ‹1.9.3-p392› $ gem i capybara | |
Fetching: capybara-2.1.0.gem (100%) | |
IMPORTANT! Some of the defaults have changed in Capybara 2.1. If you're experiencing failures, | |
please revert to the old behaviour by setting: | |
Capybara.configure do |config| | |
config.match = :one | |
config.exact_options = true | |
config.ignore_hidden_elements = true | |
config.visible_text_only = true |
NewerOlder