[Rails-core] [Feature request] has_many option to generate additionnal has_many for each given scope.

2017-03-21 Thread Julien Grillot
Hi there! I am writing a new option for `has_many` associations. It generates additionnal has_many for each given association scope. # Before has_many :posts has_many :published_posts, -> { published }, class_name: "Post" # After has_many :posts, new_option: [:published]

[Rails-core] Re: Question about rc1 in RAILS_VERSION file?

2017-03-21 Thread Al
Oh - OK, Thanks On Monday, March 20, 2017 at 9:23:03 PM UTC-4, Al wrote: > > Just saw rc1 for Rails. Have a question. > > Does https://github.com/rails/rails/blob/master/RAILS_VERSION in master > (edge rails) need to be "5.1.0.rc1"? > > Thanks > -- You received this message because you are

Re: [Rails-core] Collection caching: render to strings

2017-03-21 Thread Gleb Mazovetskiy
If you mean whether cache_collection_render is usable, I think it would be but it is currently private! The implementation I've linked to above does use PartialRenderer, and effectively reimplements cache_collection_render using only public APIs. On Tue, Mar 21, 2017 at 6:45 PM Kasper Timm

Re: [Rails-core] Collection caching: render to strings

2017-03-21 Thread Kasper Timm Hansen
Right, it’s joined with the spacer template. Maybe that’s usable? https://github.com/rails/rails/blob/9c0a82d5766c2c01f1e75eb5c70c65f28ec6a665/actionview/lib/action_view/renderer/partial_renderer.rb#L326

Re: [Rails-core] Question about rc1 in RAILS_VERSION file?

2017-03-21 Thread Rafael Mendonça França
It needs to be 5.2.0.alpha. We are working on this change. On Mon, Mar 20, 2017 at 9:23 PM Al wrote: > Just saw rc1 for Rails. Have a question. > > Does https://github.com/rails/rails/blob/master/RAILS_VERSION in master > (edge rails) need to be "5.1.0.rc1"? > > Thanks > > --