Git Product home page Git Product logo

shumi_meter's Issues

postコントローラでpostにひもづくtextデータの保存

  1. どのように保存するかの方法を検討(次の中から検討)
  • accepts_nested_attributes_for でデータを送り、associationを使用して、自動で保存される設計にする
  • transaction をコントローラ内で記述し、全部が保存されなければロールバックするようにする
  1. 上の設計次第でパラメータの受け取り方が異なるので、どちらも試して見て、良さそうな方を選択する

turbolinks load を設定する

現状turbolinksがうまく動作していないため、リロードしないと追加ボタンのクリック時の挙動がおかしい
修正します。

form_tag から form_for への変更

理由

form_tag で nestしたフォームの作成が困難だったため

懸念される点

f.text_field のキーに対して、テーブルには存在しないキーを割り当てる可能性が高い点
=> これはoption でカバーしていきたい

初期データがないところの諸々の挙動

前提

$ rails db:reset

した状態での挙動の確認をしたい

確認項目

  1. ユーザーがログインしていなかったらスタートはログインページに遷移させる
  2. タグがなくてもトップページでエラーが出ない
  3. contents がなくてもトップページでエラーが出ない

edit image_content model

  • define associations between post and image_content models
  • add accepts_nested_attributes_for to post model

投稿の表示の改善

  • 中身がない場合はあまりタイトルも出さないようにしたい
  • タイトルとコンテンツの区別がつきやすくなると良いかもしれない

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.