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

micropost create controller, views, infinite-scroll, add stimulus.js #62

Merged
merged 5 commits into from Jun 18, 2021

Conversation

everlastroman
Copy link
Collaborator

@everlastroman everlastroman commented Jun 18, 2021

Admin create microposts, micropost views, infinitescroll

Changes description

add microposts controller
add micropost views
admin can create, delete micropost (with ajax)
infinite-scroll for microposts feed
update seeds
update factory

Screnshots of the added pages

admin view:
image
image
view mobile:
image
user view:
image

Check list:

  • Integration Tests
  • Functional
  • Unit
  • Factories
  • Updated seed file


body {
background-color: $background-color;
Copy link
Collaborator

Choose a reason for hiding this comment

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

тут що

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

фон для контента, в colors.scss

Copy link
Collaborator

Choose a reason for hiding this comment

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

що з форматуванням

= micropost.title
hr/
= image_tag micropost.image.url, class: "img-fluid" if micropost.image?
/img.img-fluid src="https://i.imgur.com/xhzhaGA.jpg" /
Copy link
Collaborator

Choose a reason for hiding this comment

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

нащо цей комент тут

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

видалю, тестив просто

= link_to 'New', new_account_micropost_path, class: 'btn btn-outline-success'
div data-controller="infinite-scroll" data-action="scroll@window->infinite-scroll#scroll"
div data-infinite-scroll-target="entries"
= render 'account/microposts/microposts'
Copy link
Collaborator

Choose a reason for hiding this comment

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

паршали немають мати інстанс змінних, туди передаватись має

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

поміняю

format.html
format.json {
render json: { entries: render_to_string(partial: "microposts.html.slim", formats: [:html]),
pagination: render_to_string(partial: "paginate.html.slim") }
Copy link
Collaborator

Choose a reason for hiding this comment

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

а тут не треба вказувати формат як вище?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

вкажу

@everlastroman everlastroman merged commit f9e7885 into main Jun 18, 2021
@everlastroman everlastroman deleted the post_create_controller branch June 18, 2021 15:23
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.

None yet

3 participants