[Rails-core] Provide all ActiveRecord exceptions with a `record` attribute

2016-12-01 Thread Wael Khobalatte
Hey, It would be useful to inspect the record in question every time an ActiveRecord exception is raised. This is currently possible with some (ActiveRecord::RecordNotSaved for instance), but not others. Any idea what the rationale for this selection is? I initially thought that you can query

Re: [Rails-core] Rails doesn't reload an application on every request. What can it be?

2013-04-26 Thread Mohamed Wael Khobalatte
en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from

Re: [Rails-core] false.present? is false. Is it desired behaviour?

2013-05-30 Thread Mohamed Wael Khobalatte
are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit

Re: [Rails-core] A change that may not hurt anybody - move the js include tag to the bottom

2013-06-27 Thread Mohamed Wael Khobalatte
e.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and

Re: [Rails-core] Why last doesn't return an ActiveRecord::Relation

2013-07-19 Thread Mohamed Wael Khobalatte
nrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "

Re: [Rails-core] Why last doesn't return an ActiveRecord::Relation

2013-07-19 Thread Mohamed Wael Khobalatte
Gotcha. In this case, since calls to Model.last(n) is inherently inefficient (loading everything and placing a limit), it's good to keep it till the end of the chain. On Fri, Jul 19, 2013 at 11:55 AM, Tejas Dinkar wrote: > On Jul-19-2013, at 8:08 PM, Mohamed Wael Khobalatte < >

Re: [Rails-core] Suggestion for #store_accessor to also define query and _was methods

2013-08-19 Thread Mohamed Wael Khobalatte
unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more opti

Re: [Rails-core] beginners with Ruby and agile

2013-09-21 Thread Mohamed Wael Khobalatte
this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/groups/opt_out. > -- Mohamed Wael Khobalatte -- You received this message because you are subscri

[Rails-core] Partials should pick up I18n action scope

2013-12-30 Thread Mohamed Wael Khobalatte
Hey, Is there any reason why Rails partials don't lazily pick up the I18n scope like the views they appear in? The t(".some_key") is convenient and I would like to use it inside partials as well. I currently resort to forcing a scope on all my partials like so: t("some_key", scope: "controller

Re: [Rails-core] "X-CSRF-Token" HTTP header, added by jquery-rails

2014-02-20 Thread Mohamed Wael Khobalatte
unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more opt

Re: [Rails-core] update_attribute violates POLA

2014-03-12 Thread Mohamed Wael Khobalatte
ed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this

Re: [Rails-core] update_attribute violates POLA

2014-03-12 Thread Mohamed Wael Khobalatte
ls-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobalatte -- You re

Re: [Rails-core] Proposal: Dynamic secret_tokens

2014-03-28 Thread Mohamed Wael Khobalatte
tp://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this g

Re: [Rails-core] delete_all with limit

2014-04-03 Thread Mohamed Wael Khobalatte
> > * Postgres: not supported > * Oracle: not supported (but maybe hackable with ROWNUM tricks) > * SQLite3: supported if enabled at compile time > * MySQL: supported > * SQL Server: not supported (but maybe with a TOP subquery?) > > --Matt Jones > -- Mohamed Wael Kh

Re: [Rails-core] File name conventions for fixtures with ERB

2014-04-29 Thread Mohamed Wael Khobalatte
.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobalatte -- You received this message because you ar

[Rails-core] Optional Rails initializer loading depending on Ruby plaform

2014-05-14 Thread Mohamed Wael Khobalatte
Hey, I found myself having to use jRuby in my app for a very very small but essential piece of code. The code in question is bundled in a gem which I require in Bundler under the jRuby platform, with all the rest of my gems put under MRI. This was unfortunately necessary otherwise if I don't p

Re: [Rails-core] Re: Optional Rails initializer loading depending on Ruby plaform

2014-05-15 Thread Mohamed Wael Khobalatte
in a initialiser, you may check the platform > using bundler stuff: > > if Bundler.current_ruby.jruby? > # jruby patch code > end > > if Bundler.current_ruby.ruby? > # ruby patch code > end > > It's working great here ;) > > PS: I'm not sure if it

Re: [Rails-core] Feature request: AR namespace for schemas in queries

2014-06-01 Thread Mohamed Wael Khobalatte
ail to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobal

[Rails-core] Any updates on Google Summer of Code projects?

2014-09-05 Thread Mohamed Wael Khobalatte
Hey, Are there any updates or news to report with regards to the Rails projects adapted at the Summer of Code program? I am specifically interested in any refactorings that might affect functional tests, as I rely on those regularly, in both old and new (i.e. Rails > 4.0) projects. Best, --

Re: [Rails-core] Re: Rails.application.config_for and Rails.config.x

2014-09-17 Thread Mohamed Wael Khobalatte
cribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, vi

Re: [Rails-core] [Feature request] ActiveModel::Validations::NumericalityValidator multiple_of? integration

2014-09-17 Thread Mohamed Wael Khobalatte
group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups

Re: [Rails-core] ActionMailer deliver_later and i18n in 4.2

2014-10-22 Thread Mohamed Wael Khobalatte
nrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: [Rails-core] ActionMailer deliver_later and i18n in 4.2

2014-10-22 Thread Mohamed Wael Khobalatte
to > your mailers, and set the locale there before actually creating the mail > object/rendering the view. > > On Wed, Oct 22, 2014 at 1:07 PM, Mohamed Wael Khobalatte < > wael.khobala...@gmail.com> wrote: > >> There shouldn't be any problem since deliver_later wi

Re: [Rails-core] Re: Rails 5 roadmap?

2014-11-25 Thread Mohamed Wael Khobalatte
ting >> >> -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to th

Re: [Rails-core] Re: Adding defaults from command line for generated migrations

2014-12-02 Thread Mohamed Wael Khobalatte
Thanks everyone. >> > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com

Re: [Rails-core] Support Different Column Names in has_secure_password

2015-02-06 Thread Mohamed Wael Khobalatte
>> For more options, visit https://groups.google.com/d/optout. >>> >>-- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyon

Re: [Rails-core] Re: Forking and CoW are killing my machine when running GC

2015-04-30 Thread Mohamed Wael Khobalatte
byonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Mohamed Wael Khobalatt

Re: [Rails-core] Bug in HashWithIndifferentAccess?

2015-09-01 Thread Mohamed Wael Khobalatte
/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send a

[Rails-core] Use refinements for ActiveSupport in Rails 6?

2016-01-01 Thread Mohamed Wael Khobalatte
/groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Wael Khobalatte -- Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe fro

Re: [Rails-core] Re: Possible Enhancement method - User.where(updated_at: within(6.months))

2016-02-13 Thread Mohamed Wael Khobalatte
ail to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Wael Khobalatt

Re: [Rails-core] ActiveSupport could add a boolean conversion method to String and Fixnum

2016-04-04 Thread Mohamed Wael Khobalatte
to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Wael Khobalatte --

Re: [Rails-core] ActiveSupport could add a boolean conversion method to String and Fixnum

2016-04-04 Thread Mohamed Wael Khobalatte
pendencies. > > On Monday, April 4, 2016 at 4:23:51 AM UTC-5, Mohamed Wael Khobalatte > wrote: >> >> Conversion between types is fairly common in Ruby. With that said I'd >> recommend you look into `ActiveModel::Type::Boolean.new.cast(my_value)`, >> which handles th

Re: [Rails-core] ActiveSupport could add a boolean conversion method to String and Fixnum

2016-04-04 Thread Mohamed Wael Khobalatte
"Yes" and we need to submit `false` to the API. We've been proactive about > testing value equality, but I thought this would be an easier > implementation and might be useful to the community. > > On Monday, April 4, 2016 at 8:45:52 AM UTC-5, Mohamed Wael Khobalatte > wrot

Re: [Rails-core] [Proposal] [Feature Request] Make new rails apps rubocop compliant

2016-07-11 Thread Mohamed Wael Khobalatte
ls-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Wael Khobalatte -- You receive

Re: [Rails-core] Is there any reason #before_commit isn't documented?

2016-09-07 Thread Mohamed Wael Khobalatte
ribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options

Re: [Rails-core] Provide all ActiveRecord exceptions with a `record` attribute

2016-12-02 Thread Mohamed Wael Khobalatte
ource. A bit contrived but very helpful in the situation I described at the outset. On Fri, Dec 2, 2016 at 9:47 AM, Matt Jones wrote: > > > On Dec 1, 2016, at 6:07 PM, Wael Khobalatte > wrote: > > > > Hey, > > > > It would be useful to inspect the record

Re: [Rails-core] [Possible Feature Request] Should app fail to boot if secrets for current environment can not be loaded?

2017-03-17 Thread Mohamed Wael Khobalatte
to rubyonrails-core@googlegroups.com. > Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. > -- Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby

Re: [Rails-core] [Possible Feature Request] Should app fail to boot if secrets for current environment can not be loaded?

2017-03-17 Thread Mohamed Wael Khobalatte
> I agree it’s probably scope-creep to deal with malformed keys anywhere in > the file, but it doesn’t seem outrageous to check if there’s a top level > key which matches the current RAILS_ENV, and bail if not? > > Chris. > > > On Fri, Mar 17, 2017 at 2:52 PM, Mohamed Wael

Re: [Rails-core] [Feature][ActiveSypport::Cache::FileStore] Add method to delete temporary files and empty directories

2019-07-18 Thread Mohamed Wael Khobalatte
ussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-core/9467a1d7-940a-4231-88b8-353264ef72a9%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-core/9467a1d7-940a-4231-88b8-353264ef72a9%40googlegroups.com?utm_medium=email&utm_source=footer> >