[Rails-core] has_and_belongs_to_many and nested attributes

2015-05-07 Thread Roque Pinel
I'm not sure if I missed something. In the following case, when the join table is not a model, should it be possible to build the relation with nested attributes? unless File.exist?('Gemfile') File.write('Gemfile', -GEMFILE) source 'https://rubygems.org' gem 'rails', github:

Re: [Rails-core] ActiveRecord::Querying#find_by_sql has a confusing interface?

2015-06-26 Thread Roque Pinel
I believe the binds are used to improve the statement caching and not suggested to be used directly. Here is an example of an internal use when `Post.find(1)` executed: id_query_attribute = ActiveRecord::Relation::QueryAttribute.new(:id, 1, Post.type_for_attribute(:id)) Post.find_by_sql('select

Re: [Rails-core] remove Rails dependency on jQuery

2016-03-19 Thread Roque Pinel
Hi Aaron, That is one of the goals of this year's GSoC: https://github.com/railsgsoc/ideas/wiki/2016-Ideas#implement-ujs-using-native-javascript -- Roque Pinel On Thu, Mar 17, 2016 at 1:38 AM, Aaron Lasseigne <aaron.lassei...@gmail.com> wrote: > A small set of Rails features are

Re: [Rails-core] ActiveRecord::Base#becomes with initialize value

2016-05-09 Thread Roque Pinel
If the callback belonged to `Book`, would you re-run it with `becomes`? Sounds confusing. On Mon, May 9, 2016 at 11:13 PM, 신재현 wrote: > I propose that initialize values in `becomes` method > > for example, > > class Book < ApplicationRecord > end > > > class PaperBook <

[Rails-core] Re: Enhance Rails' delegate to allow customizing of the value returned when the delegation target is absent

2017-08-10 Thread Roque Pinel
Please see https://github.com/rails/rails/pull/11908 On Thursday, August 10, 2017 at 5:21:34 AM UTC-4, Bruno Sofiato wrote: > > Hi guys. > > How do you feel about an enhancement to Rails' *delegate *method that > enables us to define an arbitrary value which is bound to be returned > whenever