Skip to content

Instantly share code, notes, and snippets.

View YumaInaura's full-sized avatar

いなうらゆうま ( 稲浦悠馬 ) YumaInaura

View GitHub Profile
@YumaInaura
YumaInaura / Gemfile
Last active October 27, 2015 03:15
Rails4 で ActiveAdmin が bundle install 出来ない時の対処法 ref: http://qiita.com/Yinaura/items/8f5213a80a7914facf8b
gem 'activeadmin', github: 'activeadmin'
@YumaInaura
YumaInaura / Gemfile
Created October 27, 2015 03:42
$ bundle exec gem list の短縮形 ref: http://qiita.com/Yinaura/items/83d33c403bbd37959516
gem 'gem_name', github: 'github_repository', branch: 'branch_name'
@YumaInaura
YumaInaura / file0.txt
Last active October 27, 2015 04:20
ActiveAdmin: Railsのプロジェクト名を「active_admin」にすると動かない。 ref: http://qiita.com/Yinaura/items/3db9dfa3b60d268ddbf7
TypeError: superclass mismatch for class Application
@YumaInaura
YumaInaura / Gemfile
Created October 27, 2015 07:20
クオートとバッククオートを間違って bundle install できなかった話 ref: http://qiita.com/Yinaura/items/553d98d8c7a3948a5211
- gem `devise`
+ gem 'devise'
@YumaInaura
YumaInaura / Gemfile
Last active October 27, 2015 07:26
Rails4 に ActiveAdmin を導入するための最小手順 ref: http://qiita.com/Yinaura/items/c77fcf48c3a2bb183f7e
+ gem 'devise'
+ gem 'activeadmin', github: 'activeadmin'
@YumaInaura
YumaInaura / file0.sql
Last active December 22, 2015 03:45
SQL で FROM を使わず、架空のレコードを SELECT する方法 ref: http://qiita.com/Yinaura/items/b3e3c88cb9e44dfb6595
SELECT 'john', 'programmer', 30;
@YumaInaura
YumaInaura / file0.txt
Last active November 17, 2015 07:56
RSpec - change の基本動作。 ( by / from / to の使い方 ) ref: http://qiita.com/Yinaura/items/62dc0d87f968f43e335b
x = 1
expect { x += 1 }.to change { x }
# => true
@YumaInaura
YumaInaura / book.rb
Created October 29, 2015 03:44
ActiveAdmin でのモデルの追加方法 (基本) ref: http://qiita.com/Yinaura/items/bb822b42d50234b1a31b
ActiveAdmin.register Book do
permit_params :title, :author
end
@YumaInaura
YumaInaura / file0.txt
Last active June 7, 2016 06:34
Rspec | should_receive は何をしている? ref: http://qiita.com/Yinaura/items/d18658a2aff39bfb0243
it do
SomeModel.should_receive(:create)
SomeModel.create
end
@YumaInaura
YumaInaura / book.rb
Created November 10, 2015 08:11
ActiveAdmin でデータベースと関連しないフォームを作成する方法 ref: http://qiita.com/Yinaura/items/658b1d7b6009261da8f8
class Book < ActiveRecord::Base
attr_accessor :message
end