20 search resultsShowing 1~20 results

Stocked
hayulu

@hayulu

【Ruby】merge, merge!

mergeメソッドについて 2つのハッシュを統合するレシーバhashと引数other_hashのキーと値を集め、新しいハッシュに入れて返す。重複するキーが有るときは、ohter_hashの値が使...

1
0
Comment0
hayulu

@hayulu

【Ruby】条件分岐

then thenは任意でつける事が可能。つけた場合に処理を1行で書ける。 if n.zero? then puts '0です' else puts '0ではない' end 後置if else説...

0
0
Comment0
hayulu

@hayulu

【Rails Tutorial】8章まとめ

$ rails g controller Sessions new rails g でnewアクションを生成すると、それに対応ビューも生成されてる createやdestroyには対応するビュー...

0
0
Comment0
hayulu

@hayulu

【Rails】add_indexについて

indexってなんだ 特定のカラムからデータを取得する際に、テーブルの中の特定のカラムのデータを複製し検索が行いやすいようにしたもの。 Usersテーブルのnameカラムにindexを貼ることで...

8
6
Comment0
hayulu

@hayulu

memo

controller 複数形 model 単数形

0
0
Comment0
hayulu

@hayulu

【Rails】テストについて

テストの種類 単体テスト モデルやビューヘルパー単体の動作をチェック 機能テスト コントローラ/ビューの呼び出し結果をチェック 統合テスト ユーザーの実際の操作を想定し、複数のコントローラ...

0
0
Comment0

20 search resultsShowing 1~20 results

Qiita is a knowledge sharing service for engineers.

  1. You can follow users and tags
  2. You can stock useful information
  3. You can make edit suggestions for articles
Functions that can be used after logging in