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

Update to Rails 4 #1318

Closed
8 tasks done
lalithr95 opened this issue Mar 5, 2017 · 8 comments
Closed
8 tasks done

Update to Rails 4 #1318

lalithr95 opened this issue Mar 5, 2017 · 8 comments
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute

Comments

@lalithr95
Copy link
Member

lalithr95 commented Mar 5, 2017

We need to update to rails 4, as current version we use is rails 3 and doesn't have any official support from rails.

Current rails version is rails 5 and has support for 5 and 4. This can be one of the medium size projects in migration all the gems and conventions to rails 4.2 .

cc: @jywarren


See http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-3-2-to-rails-4-0

Checklist we can do already in Rails 3

  • change all instances of ActiveRecord Model.find_all_by_name() and similar to Model.where()
  • change assert_false to assert_not in tests (we think!)

Checklist for breaking changes

Looking through here: https://github.com/publiclab/plots2/pull/1160/files (not comprehensive):

  • update gems
  • switch all form_for @____ to form_for :____
  • change link_to confirm: ___ to data: { confirm: ____ }
  • change .includes(:model_name) to .references(:table_name) in ActiveRecord queries (see here: http://brettu.com/rails-daily-ruby-tips-117-activerecord-references-in-rails-4/)
  • maybe add , multiline: true to some validations (see above)
  • maybe change hash accessors from assigns['output'] to assigns[:output]
@lalithr95 lalithr95 added enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute labels Mar 5, 2017
@ryzokuken
Copy link
Member

@lalithr95 This one has been in the talks for quite some time. If you are willing to work on this, please coordinate with @jywarren. We decided that the exam period (just before GSoC) would be an appropriate time to do this.

@jywarren
Copy link
Member

jywarren commented Mar 6, 2017 via email

@lalithr95
Copy link
Member Author

Reference: #1160

@ryzokuken
Copy link
Member

@jywarren found this. Let's flesh this issue out a little by make a checklist of stuff we need? Also, let's make a rails-4 branch and ask people to make the PRs taking that branch as base and not master.

@ryzokuken ryzokuken added break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration and removed in-progress labels Oct 24, 2017
@jywarren
Copy link
Member

Again, here, we should perhaps make a checklist of things we can do before the upgrade, that are compatible with Rails 3 AND Rails 4. And then a checklist of what has to happen all at once. Make sense?

@jywarren
Copy link
Member

OK, i made a checklist. Some of these may be possible in Rails 3... not sure which. We could get them out of the way on the master branch to keep a rails-4 branch smaller.

@jywarren
Copy link
Member

This is almost complete in #1799

@jywarren
Copy link
Member

jywarren commented Dec 7, 2017

Solved!

@jywarren jywarren closed this as completed Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration enhancement explains that the issue is to improve upon one of our existing features help wanted requires help by anyone willing to contribute
Projects
None yet
Development

No branches or pull requests

3 participants