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

removed dynamic form (holding) #4575

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

jywarren
Copy link
Member

@jywarren jywarren commented Jan 8, 2019

See original code here:

4f13238

We may still use this plugin but shouldn't -- error_messages unfortunately occurs in many places! See:

https://github.com/publiclab/plots2/search?q=error_messages&unscoped_q=error_messages

Errors should instead be in format:

  <% if @model.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@model.errors.count, "error") %> prohibited this model from being saved:</h2>

      <ul>
      <% @model.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

Update

We'll refactor out all the old dynamic_form usages one by one as FTOs in #8545, then circle back here once that's all completed!

@ghost ghost assigned jywarren Jan 8, 2019
@ghost ghost added the in progress label Jan 8, 2019
@jywarren
Copy link
Member Author

jywarren commented Jan 8, 2019

Unfortunately, we're going to have to refactor them in each of these places, OR make a partial to manage these, so we can call:

error_messages(@node) and it outputs them with the above template.

@plotsbot
Copy link
Collaborator

plotsbot commented Jan 8, 2019

7 Errors
🚫 There was a test error at: Failure: test_admin_user_should_be_able_to_see_spam_comments_page(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' app/controllers/admin_controller.rb:109:in 'spam_comments' test/functional/admin_controller_test.rb:621:in 'block in '
🚫 There was a test error at: Failure: test_admin_user_should_be_able_to_see_spam_page(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' test/functional/admin_controller_test.rb:127:in 'block in '
🚫 There was a test error at: Failure: test_admin_user_should_be_able_to_see_spam_revisions_page(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' app/controllers/admin_controller.rb:97:in 'spam_revisions' test/functional/admin_controller_test.rb:324:in 'block in '
🚫 There was a test error at: Failure: test_moderator_user_should_be_able_to_see_spam_comments_page(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' app/controllers/admin_controller.rb:109:in 'spam_comments' test/functional/admin_controller_test.rb:612:in 'block in '
🚫 There was a test error at: Failure: test_moderator_user_should_be_able_to_see_spam_page(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' test/functional/admin_controller_test.rb:118:in 'block in '
🚫 There was a test error at: Failure: test_moderator_user_should_be_able_to_see_spam_revisions_page(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' app/controllers/admin_controller.rb:97:in 'spam_revisions' test/functional/admin_controller_test.rb:315:in 'block in '
🚫 There was a test error at: Failure: test_should_get_/admin/queue_if_moderator(Minitest::Result) [/app/app/views/users/_create_form.html.erb:3]: ActionView::Template::Error: undefined method ‘error_messages’ for # app/views/users/_create_form.html.erb:3:in 'block in _app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/users/_create_form.html.erb:2:in '_app_views_users__create_form_html_erb__4179780491629631652_47341298454780' app/views/layouts/_header.html.erb:187:in '_app_views_layouts__header_html_erb__156547079195570836_47341298583940' app/views/layouts/application.html.erb:96:in '_app_views_layouts_application_html_erb___3316444296801602506_47341291677620' app/controllers/admin_controller.rb:359:in 'queue' test/functional/admin_controller_test.rb:391:in 'block in '
2 Messages
📖 @jywarren Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 This pull request doesn’t link to a issue number. Please refer to the issue it fixes (if any) in the body of your PR, in the format: Fixes #123.

Generated by 🚫 Danger

@jywarren
Copy link
Member Author

jywarren commented Jan 8, 2019

@gauravano - do you think we could craft an issue around this? Perhaps someone new would like to take it up?

@grvsachdeva
Copy link
Member

@jywarren please update the status of PR. Thanks!

@jywarren jywarren changed the base branch from master to main June 30, 2020 17:47
@stale
Copy link

stale bot commented Oct 7, 2020

Hi 😄, this issue has been automatically marked as stale because it has not had recent activity. Don't worry you can continue to work on this and ask @publiclab/reviewers to add "work in progress" label 🎉 . Otherwise, it will be closed if no further activity occurs in 5 days -- but you can always re-open it if you like! 💯 Thank you for your contributions 🙌 🎈.

@stale stale bot added the stale label Oct 7, 2020
@jywarren jywarren changed the title removed dynamic form removed dynamic form (holding) Oct 12, 2020
@stale stale bot removed the stale label Oct 12, 2020
@Manasa2850 Manasa2850 mentioned this pull request Feb 26, 2021
5 tasks
@Manasa2850 Manasa2850 closed this Feb 26, 2021
@Manasa2850 Manasa2850 reopened this Feb 26, 2021
@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@9b874a9). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4575   +/-   ##
=======================================
  Coverage        ?   49.97%           
=======================================
  Files           ?       98           
  Lines           ?     6033           
  Branches        ?        0           
=======================================
  Hits            ?     3015           
  Misses          ?     3018           
  Partials        ?        0           

@Manasa2850 Manasa2850 closed this Feb 26, 2021
@Manasa2850 Manasa2850 reopened this Feb 26, 2021
@Manasa2850 Manasa2850 closed this Feb 26, 2021
@Manasa2850 Manasa2850 reopened this Feb 26, 2021
@Manasa2850
Copy link
Member

@jywarren @cesswairimu I think we can merge this now since #9237 is merged and all the GitHub Action tests are passing!
Thanks!

@cesswairimu
Copy link
Collaborator

I will pull this and try to rebase,

@gitpod-io
Copy link

gitpod-io bot commented Feb 26, 2021

@codeclimate
Copy link

codeclimate bot commented Feb 26, 2021

Code Climate has analyzed commit 343e970 and detected 0 issues on this pull request.

View more on Code Climate.

@Manasa2850 Manasa2850 closed this Feb 26, 2021
@Manasa2850 Manasa2850 reopened this Feb 26, 2021
@gitpod-io
Copy link

gitpod-io bot commented Feb 26, 2021

Copy link
Collaborator

@cesswairimu cesswairimu left a comment

Choose a reason for hiding this comment

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

All green now 🎉
Thanks @jywarren and @Manasa2850

@cesswairimu cesswairimu merged commit d0167ac into publiclab:main Feb 26, 2021
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* removed dynamic form

* Delete dynamic_form.rb
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* removed dynamic form

* Delete dynamic_form.rb
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* removed dynamic form

* Delete dynamic_form.rb
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.

5 participants