Skip to content
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

feature: apis for tag, video #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sushil-truemark
Copy link

TASKS:

  1. added fetch api for video
  2. added api to add tag
  3. remove tag api
  4. added upload for video

added fetch api for video
added api to add tag
remove tag api
added upload for video
ATTRIBUTES += %i[video_attributes]
mattr_reader *ATTRIBUTES

@@video_attributes = [:product_id, :url, :file, :tag_name, tag_names: []]

Choose a reason for hiding this comment

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

why is tags not nested attribute and tag_names instead?

and why should we have both tag_name and tag_names?

end

def add_tag
tag_names = params[:video][:tag_names] || []

Choose a reason for hiding this comment

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

should not tags be auto handled via nested params?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants