javan / javan/whenever

Brief question about basic implementation

Open
#800 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
8.9k
Forks
715
PR merge metrics
No merged PRs in 30d

Description

Hi @javan

We are a not for profit (and not so advanced) volunteer coding team at BreakDiving.io. We have a worldwide social media community designed to inspire our members to achieve their goals in life.

We have a message board on the homepage. We want to have the system automatically do a few things every Monday morning on that homepage:

  • Post a new post on the message board that says, "Time for your weekly update!", posted from a specific user
  • Share a random quotation from quotations we have added to the database
  • Put a random 'tag of the week' above all of the posts that pulls from the Tag model

I have read through the readme, but am still a bit unclear how this would work. As an example, here is our Tag model:

class Tag < ApplicationRecord
  include PgSearch
    multisearchable :against => [:name]

  validates :name, uniqueness: true
  has_many :taggings, :dependent => :destroy
  has_many :posts, through: :taggings
  
  COLORS = ['#F7464A', '#46BFBD', '#FDB45C', '#949FB1', '#4D5360',
  '#FF5733', '#F4D03F', '#a569bd', '#22b256', '#68a1b9',
  '#d7b1e1', '#d15269', '#37b9bb', '#7ebb85', '#bc328c']
end

How could we randomly post a tag from this model each week?

Would it be similar for posting the weekly 'share your update' reminder?

Thank you so much for your help!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README, which the reporter says they have already read, and determine whether it documents recurring weekly jobs and the requested usage. No implementation file, test, or entry point is named; done would require clarifying how this Ruby application can schedule the message, quotation, and random Tag posts.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.