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
$ hoge |
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
-- |
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
task :goodbye, [:name, :alias] do |t, args| | |
puts "Goodbye, #{args.name} the #{args.alias}!" | |
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
class Budgets < Array | |
def select | |
self.class.new(super) | |
end | |
def +(other) | |
self.class.new(super(other)) | |
end | |
end | |
b2 = Budgets.new |
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
source 'https://rubygems.org' | |
gem 'rails', '4.0.3' | |
gem 'sqlite3' | |
gem 'sass-rails', '~> 4.0.0' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
gem 'jquery-rails' | |
gem 'turbolinks' | |
gem 'jbuilder', '~> 1.2' | |
group :doc do |
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
$ cd Rwitter | |
$ bundle install --path .bundle/ | |
Fetching gem metadata from https://rubygems.org/.......... | |
Fetching additional metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Installing rake (10.1.1) | |
... | |
Installing uglifier (2.5.0) | |
Your bundle is complete! | |
It was installed into ./.bundle |
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
<%= form_for(@post) do |f| %> | |
<% if @post.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> | |
<ul> | |
<% @post.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
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 AddNameAndIconToUsers < ActiveRecord::Migration | |
def change | |
add_column :users, :name, :string | |
add_column :users, :icon, :string | |
end | |
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
Enumerator::Lazy.ancestors | |
# => [Enumerator::Lazy, Enumerator, Enumerable, Object, Kernel, BasicObject] |
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
<a alt="AllAbout" href="http://allabout.co.jp">リンクはこちら</a> |
OlderNewer