Skip to content

Conversation

@CloCkWeRX
Copy link
Collaborator

@CloCkWeRX CloCkWeRX commented Feb 18, 2024

Fix #1165
Fix #3451 (generally)

Add a very basic "Activities" model, which can work on a Garden and/or Planting or just be a general todo.

image
image
image
image

Probably missing a few places in the UI where there should be links or counts, but aren't

  • No RSS feed yet
  • No iCal feed yet
  • No tests yet

@@ -0,0 +1,32 @@
# frozen_string_literal: true

class Activity < ApplicationRecord

Check failure

Code scanning / Brakeman

Mass assignment is not restricted using `attr_accessible`.

Mass assignment is not restricted using `attr_accessible`.
@CloCkWeRX CloCkWeRX requested a review from Br3nda February 18, 2024 07:44
@CloCkWeRX
Copy link
Collaborator Author

rspec ./spec/views/gardens/show.html.haml_spec.rb:35 # gardens/show shows plantings on the garden page
rspec ./spec/views/gardens/show.html.haml_spec.rb:31 # gardens/show renders markdown in the description
rspec ./spec/views/gardens/show.html.haml_spec.rb:19 # gardens/show shows the location
rspec ./spec/views/gardens/show.html.haml_spec.rb:23 # gardens/show shows the area
rspec ./spec/views/gardens/show.html.haml_spec.rb:27 # gardens/show shows the description
rspec ./spec/requests/plantings_spec.rb:30 # Plantings with a member GET /members/x/plantings.ics works!
rspec ./spec/views/plantings/show.html.haml_spec.rb:53 # plantings/show shows photos
rspec ./spec/views/plantings/show.html.haml_spec.rb:84 # plantings/show no location set doesn't contain a () if no location is set
rspec ./spec/views/plantings/show.html.haml_spec.rb:80 # plantings/show no location set renders markdown in the description
rspec ./spec/views/plantings/show.html.haml_spec.rb:72 # plantings/show no location set renders the quantity planted
rspec ./spec/views/plantings/show.html.haml_spec.rb:76 # plantings/show no location set renders the description
rspec ./spec/views/plantings/show.html.haml_spec.rb:95 # plantings/show location set shows the member's location in parentheses
rspec ./spec/views/plantings/show.html.haml_spec.rb:66 # plantings/show shows a link to add photos 
rspec ./spec/views/plantings/show.html.haml_spec.rb:29 # plantings/show sunniness shows the sunniness 
rspec ./spec/views/plantings/show.html.haml_spec.rb:28 # plantings/show sunniness shows the sunniness 
rspec ./spec/views/plantings/show.html.haml_spec.rb:39 # plantings/show planted from shows planted_from 
rspec ./spec/views/plantings/show.html.haml_spec.rb:40 # plantings/show planted from shows planted_from 
rspec ./spec/views/plantings/show.html.haml_spec.rb:49 # plantings/show planted from shows planted_from if blank 
rspec ./spec/features/gardens/adding_gardens_spec.rb:7 # Gardens signed in is accessible

@CloCkWeRX
Copy link
Collaborator Author

  7) plantings/show shows photos
     Failure/Error: - if @current_activities.size.positive?

However, that should be an activerecord collection rather than nil all of the time.

Copy link
Member

@cesy cesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this seems like a good idea and on a brief skim read it looks sensible.

@CloCkWeRX
Copy link
Collaborator Author

(have a bit of a play on staging)

@CloCkWeRX CloCkWeRX mentioned this pull request Mar 3, 2024
@CloCkWeRX CloCkWeRX merged commit 5be0153 into dev Mar 10, 2024
@CloCkWeRX CloCkWeRX deleted the activities branch March 10, 2024 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record soil conditioning per garden event model

3 participants