GithubHelp home page GithubHelp logo

todo-app's People

Contributors

marumero4241 avatar

Watchers

 avatar

todo-app's Issues

Change to webpack

Task list

  • webpacker をwebpack変更し、動作確認を行う

  • front側のテストを行う、テストkarma, mocha, chai, vue-test-util

  • [ ]テストができたらnightwatchで実働を確認する。

Setup Tasks

Task list

  • userからtasksを取得できるようにするための関連づけを行う。

    class Document < ApplicationRecord
    has_many :sections
    has_many :paragraphs, through: :sections
    end

    class Section < ApplicationRecord
    belongs_to :document
    has_many :paragraphs
    end

    class Paragraph < ApplicationRecord
    belongs_to :section
    end

  • tasksのvalidates, modelの作成

  • userからtaskの作成をした際に、category_idが入力されていないので、Fix

  • userからcategoryを作成する際関連づけを行っているにもかかわらずuser_idが渡されていない。

  • ロード後Taskが読み込まれていなloadTaskなど挙動がおかしいのでテスト必要

参考本

  url: https://railstutorial.jp/chapters/user_microposts?version=5.1#sec-user_micropost_associations

Create Category table

Task list

  • category tableを新たに作る、valueとして、user_id, categoryを持つようにする。

  • categoryテーブルをuserと1対多のassociationを行ってuserから自身のuser_idをカテゴリを取得
       できようにする。

  • storeからuser経由で、categoryを取得できるようにする

Login as User

要件定義

  1. 登録したuserでログインをできるようにする。

必要な情報

  1. テーブル作成などはRails チュートリアルを参考に作成。

  2. 今回はデータをクライアント側である程度管理して非同期処理にしたいので、
    vuexでデータの管理を行う。

    方法

    • データはログイン時に取得するようにする。
    • 新たにデータを追加するたびにvuexにもデータを送れるようにする。

誤った点

  1. Railsでは正規表現を使う際に^,$などを使うとエラーが出るで代わりに¥A,¥Zを使用すること。

  2. routesでformat:jsonを指定した際getであっても、jsonbuiilderを作らないとエラーを吐かれる。

  3. routesで新たにusers を api namespaceに入れたい際にapiにコントローラを移さないとエラーを
     吐くことを忘れていた。
     基本的にnamespaceなどを使ってuriを変更する際はcontrollerなどもそれに付随して、
     変更を加えないとエラーを吐くので注意、あとはroutesをよく読むこと。

理解できていない点

  1. user_idだけが、before_saveで小文字にならない。
  • 発生エラー: Couldn't find User without an ID
  • commit: fc54e65

参考URL

  1. https://gist.github.com/nashirox/38323d5b51063ede1d41

PR: #2

Fix User

Task list

  • herokuにデプロイしたさいにv-appエラーが出ていたので調査修正
    - Headerにv-appがないことに対してのエラーだと思われる。
    - router-viewの表示が隅に寄っているので直す必要あり。
    ## 解決策
    - コンポーネント周りを改めて書き直す。

  • gem, npm周りで何が必要か必要でないかを確認する。

  • コンポーネントで共通して使う、関数や、変数をコンポーネントに移動させる。

  • 更新するたびにデータベースからデータを取得できるようにする。
       加えて地震から同期出るように同期ボタンも作る

  • taskとcategoryのカードを別々にスクロールできるようにする。

  • setRootはrouterでredirectを指定した方が簡潔になるので、変更するべし。
    url: https://router.vuejs.org/ja/essentials/redirect-and-alias.html

  • storeの内容を状態によって変更したい

URL

PR: #9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.