-
Notifications
You must be signed in to change notification settings - Fork 0
Feature report #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature_webAPI
Are you sure you want to change the base?
Feature report #10
Changes from 2 commits
8111b5f
cde3ee4
a3b4583
ade65d5
f6d15a4
6e18206
95f7c17
b452f0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,9 +38,21 @@ def destroy | |
| redirect_to(ad_index_path) | ||
| end | ||
|
|
||
| def report | ||
| @report = Report.all | ||
| @ad = Ad.find(1) | ||
| p "afleihfjoiwahfoiawhgfoiahfoiaho" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. デバッグコード残ってる |
||
| p @ad.class | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. デバッグコード残ってる |
||
| end | ||
|
|
||
| def report_period | ||
| @ads = Ad.all | ||
| @Report = Report.where(date: ( params[:date_min])..( params[:date_max])) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 変数の先頭は小文字にして There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. paramsの前に不要なスペース |
||
| end | ||
|
|
||
| private | ||
|
|
||
| def ad_params # Adオブジェクト作成時にフォームから入力したパラメーターを渡す。 | ||
| params.require(:ad).permit(:price, :text, :advertiser_id, :image) | ||
| params.require(:ad).permit(:price, :text, :image) | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |
| ActiveRecord::Schema.define(version: 2019_06_14_041856) do | ||
|
|
||
| create_table "ads", force: :cascade do |t| | ||
| t.integer "advertiser_id", null: false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. テーブル定義は消して大丈夫? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. すり合わせが必要とかだったら明日やろう |
||
| t.string "image", default: "", null: false | ||
| t.integer "price", null: false | ||
| t.string "text", default: "", null: false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,11 @@ | ||
| # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
|
|
||
| one: | ||
| advertiser_id: 1 | ||
| image: MyString | ||
| price: MyString | ||
| text: MyString | ||
|
|
||
| two: | ||
| advertiser_id: 1 | ||
| image: MyString | ||
| price: MyString | ||
| text: MyString |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
質問:これってなんのためのアクションだっけ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
report.htmlの表示を司るアクションです。只今試行錯誤中です...