AgileVentures / osra

Sponsor orphans in Syria & ensure basic life & education requirements for Syrian children
MIT License
20 stars 39 forks source link

Remove aa #425

Closed NikitaAvvakumov closed 7 years ago

NikitaAvvakumov commented 8 years ago

☢️ 💣 💥 => 🎉

razorcd commented 8 years ago

:+1:

razorcd commented 8 years ago

should we keep a redirect route from /hq to / ? Just so some old links keep working.

NikitaAvvakumov commented 8 years ago

@razorcd Good idea - added a globbed redirect for any GET requests to the 'hq' namespace (commit). Should work well enough until muscle memory and bookmarks get updated.

Another thought I had was to create a Rack middleware to strip /hq from all request paths - should be possible, but I don't think it's really necessary.

b264 commented 8 years ago

:astonished:

NikitaAvvakumov commented 8 years ago

Discovered a problem after deploying this to Heroku: the filter scope defined on Orphan in the OrphanAttrFilter concern now raises NoMethodError (undefined methodfilter' for #Orphan::ActiveRecord_Relation:0x007f5a70800698)inOrphansController#index. Same situation withSponsor.filter. Locally, I didn't see this in the browser, butspec/models/concerns/orphan_attr_filter_spec.rbwas failing with the same exception until I converted it to anRSpec.describe Orphan, type: :model. Strangely, there were no such problems withSponsor.filter`.

In the OrphanAttrFilter concern I could define an instance method that would be available on Orphan objects, and it was the filter scope specifically that wasn't getting picked up.

Will keep investigating, but any pointers appreciated

NikitaAvvakumov commented 8 years ago

This commit fixes the problem mentioned above, though I'm not entirely certain as to why. The issue reproducibly showed up with RAILS_ENV=production and did not with RAILS_ENV=development.

This branch is deployed to https://osra-nga.herokuapp.com, you can use the same credentials as for osra-new-staging. Ping me in Slack if needed

b264 commented 8 years ago

Missing functionality: Partners index is missing the Download CSV link (is this used/needed?) Users index is missing the Download CSV link (is this used/needed?) Admin Users index is missing the Download CSV link (is this used/needed?)

Reduced functionality: No route matches [GET] "/admin/sponsors" for example on previously bookmarked pages, I think we should also redirect these Orphans index missing colour highlighting on boolean values Sponsors index missing colour highlighting on boolean values

Nice touches: The OSRA button in the nav bar is no longer needed

b264 commented 8 years ago

The NoMethodError on production only was probably caused by preloading, I have seen similar things before. Sometimes you can add require statements in the non-Rails Ruby style to fix that

b264 commented 8 years ago

pending_orphan_lists/upload.html.erb seems to not be reachable

NikitaAvvakumov commented 8 years ago
b264 commented 8 years ago

I think we should get confirmation from the client then that they aren't using the export functions on those pages? Or alternatively we could dig into the server log and see if they've been accessed...

b264 commented 7 years ago

:shipit: