Re: [Rails-core] RAILS_MASTER_KEY in development

2018-01-12 Thread Jason Fleetwood-Boldt
scr...@googlegroups.com > <mailto:rubyonrails-core+unsubscr...@googlegroups.com>. > To post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > &l

Re: [Rails-core] [Feature proposal] Migrations-like actions

2017-11-29 Thread Jason Fleetwood-Boldt
post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more options, visit https://grou

Re: [Rails-core] Symbol missing it's `.size` method in the Rails console

2017-10-16 Thread Jason Fleetwood-Boldt
ooglegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Jason Fleetwood-Boldt

Fwd: [Rails-core] Rails 4.0 + Rails 4.1 CSRF problems affecting IE 11, Edge, newer versions of Android and mobile Safari

2017-09-06 Thread Jason Fleetwood-Boldt
ribed in > my SO post above? > > If so, this would be a compelling reason for us to upgrade to Rails 5, as we > think we are loosing a significant amount of traffic due to this bug. > > If not, I am wondering if others are seeing this too and what can be done to > addre

Re: [Rails-core] Rails 4.0 + Rails 4.1 CSRF problems affecting IE 11, Edge, newer versions of Android and mobile Safari

2017-08-07 Thread Jason Fleetwood-Boldt
processing email chains, so if anyone has anything to add to the SO post please feel free to post it there. -Jason > On Aug 7, 2017, at 1:35 PM, Jason Fleetwood-Boldt > wrote: > > Rails community, > > I have been investigating and debugging a serious, widespread problems wit

[Rails-core] Rails 4.0 + Rails 4.1 CSRF problems affecting IE 11, Edge, newer versions of Android and mobile Safari

2017-08-07 Thread Jason Fleetwood-Boldt
not, I am wondering if others are seeing this too and what can be done to address this issue. -Jason ---- Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like to reply by encrypted email you can find my public key on jasonfleetwood

Re: [Rails-core] CollectionAssociation shadows Enumerable#count

2017-05-16 Thread Jason Fleetwood-Boldt
l to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout

Re: [Rails-core] Organize models in subfolders

2017-02-27 Thread Jason Fleetwood-Boldt
> -- > > Maurizio De Santis > > 2017-02-24 19:08 GMT+01:00 Jason Fleetwood-Boldt <mailto:t...@datatravels.com>>: > > not a Class within a Class, a Class within a Module, like so: > > module Activity > class Activity1 < ActivityBase > end >

Re: [Rails-core] Organize models in subfolders

2017-02-24 Thread Jason Fleetwood-Boldt
you continue to reference it as simply "Activity" you'll run into namespace problems. -Jason > On Feb 24, 2017, at 12:46 PM, Maurizio De Santis > wrote: > > # app/models/activity/activity_1.rb > class Activity > class Activity1 < Activity > end >

Re: [Rails-core] Organize models in subfolders

2017-02-24 Thread Jason Fleetwood-Boldt
gt; > > -- > 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] Why do i need to specify the column type when removing? (migrations)

2016-11-15 Thread Jason Fleetwood-Boldt
; To post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more opti

Re: [Rails-core] ActiveRecord: Add the like or/and ilike methods

2016-11-14 Thread Jason Fleetwood-Boldt
> possible to write `User.where(active: true).ilike(email: email)`. > > Is there any reason why this has not been done ? And could it be done ? > > Thank you :) Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like to rep

Re: [Rails-core] Warn the developer when using `to:` with an array of emails that he is going to reveal the emails to everyone

2016-10-07 Thread Jason Fleetwood-Boldt
raise an error. > > I'm not sure how good or bad this would be. > Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like to reply by encrypted email you can find my public key on jasonfleetwoodboldt.com <http://jasonfleetwoodbold

Re: [Rails-core] [Proposal|Feature request]Add an option to not render the routes table on Routing Error page

2016-09-09 Thread Jason Fleetwood-Boldt
. > To post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more options, visit https://g

Re: [Rails-core] how i get Checked check box value in rails 4

2016-08-08 Thread Jason Fleetwood-Boldt
tps://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like t

Re: [Rails-core] Feature Request: Delete associated records when model is saved

2016-07-07 Thread Jason Fleetwood-Boldt
o an in memory > change). That inconsistency cost our small company (3 developers) nearly a > hundred hours of head scratching to get around (which is very expensive for a > company of our size). > > I propose that as part of Rails 6, we change the way association > modificatio

Re: [Rails-core] Feature Request: Delete associated records when model is saved

2016-07-07 Thread Jason Fleetwood-Boldt
t >> <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 t

Re: [Rails-core] Option not to line up column attributes in schema.rb

2016-07-05 Thread Jason Fleetwood-Boldt
to:rubyonrails-core+unsubscr...@googlegroups.com>. > To post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/

Re: [Rails-core] [Feature Request] Allow matching HTTP_ORIGIN with HTTP_HOST in ActionCable

2016-06-30 Thread Jason Fleetwood-Boldt
ould > be nice to have an alternative solution for matching the ORIGIN with a > PROTO://HOST regexp. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like to reply by encrypted email you can find my public key on jasonfleetwoodbold

Re: [Rails-core] [Feature Request] Allow matching HTTP_ORIGIN with HTTP_HOST in ActionCable

2016-06-30 Thread Jason Fleetwood-Boldt
ooglegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout > <htt

Re: [Rails-core] [Feature request] Raise an error for invalid options on migrations

2016-06-09 Thread Jason Fleetwood-Boldt
+1 on guardrails for Rails (pun intended) Silent unseen errors are always the worst kind. -jason > On Jun 8, 2016, at 11:02 PM, Ian Ker-Seymer wrote: > > Currently, when creating a migration and the user specifies an invalid > option, the migration silently succeeds and does not notifiy the

Re: [Rails-core] [Feature Request] Add after_connect hook to Active Record

2016-06-06 Thread Jason Fleetwood-Boldt
top 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, visit https://groups.google.com/d/optou

Re: [Rails-core] [Feature Request] Add after_connect hook to Active Record

2016-06-06 Thread Jason Fleetwood-Boldt
; Visit this group at https://groups.google.com/group/rubyonrails-core. > For more options, visit https://groups.google.com/d/optout. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing If you'd like to reply by encrypted email you can find my public key

Re: [Rails-core] Skip CoffeeScript option

2016-06-02 Thread Jason Fleetwood-Boldt
at https://groups.google.com/group/rubyonrails-core > <https://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwood

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

2015-06-25 Thread Jason Fleetwood-Boldt
You were right, I apologize. > On Jun 25, 2015, at 10:41 AM, Matias Korhonen wrote: > > You do not need to pass all the arguments inside of an array, the correct > syntax is: > Post.find_by_sql("SELECT * FROM posts WHERE id = ?", 1) > > I wonder if you actually tried that in console? Becaus

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

2015-06-25 Thread Jason Fleetwood-Boldt
the * isn't shown, which would lead to confusion even if that's what > being used under the hood. > > On Thu, Jun 25, 2015 at 10:18 AM, Jason Fleetwood-Boldt <mailto:t...@datatravels.com>> wrote: > > You are incorrect the documentation is accurate. > > You n

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

2015-06-25 Thread Jason Fleetwood-Boldt
You are incorrect the documentation is accurate. You need to have a deeper understanding of ruby, and specifically the magic of the splat (*) operator. You do not need to pass all the arguments inside of an array, the correct syntax is: Post.find_by_sql("SELECT * FROM posts WHERE id = ?", 1)

Re: [Rails-core] proposal: deprecate save() in favor of save!()

2015-06-23 Thread Jason Fleetwood-Boldt
Generally nearly all of the Jr. devs I work with know this, this is very basic to the early learning process of working with Rails. Most code I see uses the if @foo.save … else … end style in almost all cases and does flow control based on the return value of save. -Jason > On Jun 22, 2015,

Re: [Rails-core] Flash bug or feature?

2015-05-26 Thread Jason Fleetwood-Boldt
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 > <mailto:rubyonrails-core+unsubscr...@googlegroups

Re: [Rails-core] In the need for separating data migration from schema migration

2015-04-15 Thread Jason Fleetwood-Boldt
iting the migration in raw SQL So yes the problems you describe don't go away, I just use different strategies to deal with them. > On Tue, Apr 14, 2015 at 7:06 PM, Jason Fleetwood-Boldt <mailto:t...@datatravels.com>> wrote: > > Augustin- > > I already solved th

Re: [Rails-core] In the need for separating data migration from schema migration

2015-04-14 Thread Jason Fleetwood-Boldt
Augustin- I already solved this problem with a Gem I wrote. Instructions here: https://github.com/jasonfb/nondestructive_migrations As for whether or not it should be in Rails core, I cannot speak to that. Generally speaking on large Rai

Re: [Rails-core] Fallback image for Rail's video_tag

2015-03-30 Thread Jason Fleetwood-Boldt
I think people using video_tag or picture_tag will probably be using polyfils or fallbacks. While we’re on the subject, it would be great to think long-term about supporting picture_tag too, generally it needs a polyfil and a CarrierWave/Paperclip integration, so it may or may not be someth

Re: [Rails-core] Fallback image for Rail's video_tag

2015-03-30 Thread Jason Fleetwood-Boldt
rubyonrails-core > <http://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing -- You re

Re: [Rails-core] Deprecate/Remove ActionController::ParamsWrapper

2015-02-26 Thread Jason Fleetwood-Boldt
Unless I’m misreading it the JSON API (http://jsonapi.org/format/ ), currently being worked on by Katz and others, specifies that submitted resources should look like this: POST /photos Content-Type: application/vnd.api+json Accept: application/vnd.api+json { "da

Re: [Rails-core] .html_safe is ambiguous and should be renamed

2015-02-06 Thread Jason Fleetwood-Boldt
from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscr...@googlegroups.com > <mailto:rubyonrails-core+unsubscr...@googlegroups.com>. > To post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:r

Re: [Rails-core] Graceful handling of missing STI constants

2015-01-26 Thread Jason Fleetwood-Boldt
If I were you I’d stub out all the different objects with ‘shell’ implementations in your master branch, and then AR won’t blow up when it tries to instantiate the objects. Then you can leave implementation details to the branches where you want to implement/test them. Also it seems odd to me

Re: [Rails-core] Schema.rb table and column order

2015-01-17 Thread Jason Fleetwood-Boldt
t;. > To post to this group, send email to rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > Visit this group at http://groups.google.com/group/rubyonrails-core > <http://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups

Re: [Rails-core] Proposal for a new ActiveModel::Errors structure

2015-01-02 Thread Jason Fleetwood-Boldt
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 > <mailto:rubyonrails-core+unsubscr...@googlegroups.com>. > To post to th

Re: [Rails-core] Rails 5 roadmap?

2014-11-25 Thread Jason Fleetwood-Boldt
ps.com>. > Visit this group at http://groups.google.com/group/rubyonrails-core > <http://groups.google.com/group/rubyonrails-core>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. Jason Fleetwood-Boldt t...@dat

[Rails-core] Rails 5 roadmap?

2014-11-25 Thread Jason Fleetwood-Boldt
easier (and more encouraged) to implement in the future? I tried to do a little googling for Rails 5 docs but I was unable to find solid stuff. -Jason Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing -- You received this message because you are

Re: [Rails-core] Make assets precompilation unnecessary

2014-11-24 Thread Jason Fleetwood-Boldt
le.com/d/optout > <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 rubyonr

Re: [Rails-core] Removing 'require_tree .' from application.js

2014-10-31 Thread Jason Fleetwood-Boldt
of salt. This is just my opinion having worked in this space for several years and had this specific conversation about Javascript with a lot of different devs (who themselves had different opinions and viewpoints). I think this is actually the heart of one of the challenges for the community

Re: [Rails-core] Feature idea: nicer scaffolded views

2014-10-17 Thread Jason Fleetwood-Boldt
t should be kept there and, eventually, improved? Jason Fleetwood-Boldt t...@datatravels.com http://www.jasonfleetwoodboldt.com/writing All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous).

Re: [Rails-core] Feature idea: nicer scaffolded views

2014-10-16 Thread Jason Fleetwood-Boldt
, at 8:02 PM, Jason Fleetwood-Boldt wrote: > > > FWIW, I think the idea could be useful to some but doesn't belong in the > Rails core. For me, Rails is an advanced server-side technology that is very > good at a few things that every website needs. > > Rails doesn

Re: [Rails-core] Feature idea: nicer scaffolded views

2014-10-16 Thread Jason Fleetwood-Boldt
, Nicolas, > Robert, would this work for you? > > -- > 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-cor

Re: [Rails-core] css/javascript/etc not rendering

2014-10-02 Thread Jason Fleetwood-Boldt
Are you rendering the layout in your controller? what you are describing would happen if you have layout: false in your controller definition or as a parameter in your render call. On Oct 2, 2014, at 2:15 PM, Colin Stodd wrote: > I have noticed that every page other than my root path is no

Re: [Rails-core] Rails 4.1.2 Eager Load Doesn't Kill N+1 Query

2014-09-22 Thread Jason Fleetwood-Boldt
I think maybe you're problem has to do with the polymorphism (although the syntax looks right to me and it is possible to eager load with a polymorphic association). Did you try bullet? https://github.com/flyerhzm/bullet Really, try bullet, it will automatically tell you exactly the code to

Re: [Rails-core] assign_attributes method not found

2014-09-04 Thread Jason Fleetwood-Boldt
indeed... sorry I just get in the habit of helping newbies who do would do well to learn more advanced introspection/debegging techniques. My bad. Maybe your method is defined as delegate :x, :to => :y ? I hate that those don't work with Go-To-Declaration -- really drives me nuts If you s

Re: [Rails-core] assign_attributes method not found

2014-09-03 Thread Jason Fleetwood-Boldt
You need to download a proper IDE my friend, like RubyMine (which I love, but there are others) Specifically, you need to learn how to use the "Go to Declaration" feature of your IDE, which can give you that answer and take you directly to the part of ActiveRecord where that might be defined.

Re: [Rails-core] assign_attributes method not found

2014-09-03 Thread Jason Fleetwood-Boldt
Ryan- since I see this a lot on the lists, it would be great if there were some easy place to see which versions of rails have security alerts against them. I know there's this list here on rubygems https://rubygems.org/gems/rails/versions but it doesn't show which ones are insecure. is that i

Re: [Rails-core] config_for: add json support for config files.

2014-09-02 Thread Jason Fleetwood-Boldt
There's an interesting idea, but since yaml is fairly standard I would suggest you'd to better to package this up as a Gem. On Aug 29, 2014, at 1:32 PM, Laurent Arnoud wrote: > It's more easy to use json file with other languages like javascript for > example. > I join the patch I've done

Re: [Rails-core] Idea: call callbacks on self.type's model for existing instance, instead of current class when STI

2014-08-29 Thread Jason Fleetwood-Boldt
Single table inheritance is generally a bad pattern, and leads to all kinds of nasty rabbit holes like the ones you are describing. I generally avoid STI in almost all cases because of the overhead (it is generally not efficient from data base perspective) and all the callback woes you are des

Re: [Rails-core] Abridged summary of rubyonrails-core@googlegroups.com - 1 update in 1 topic

2014-08-27 Thread Jason Fleetwood-Boldt
Elad- This gem looks great to me. I think it could very well reduce code duplication (and make those strong parameter definitions look a little cleaner). One thing I think about a lot is how a Rails 4 app could be built with many, many controllers that share the definition of the strong parame

Re: [Rails-core] Simplifying `rails new`

2014-06-12 Thread Jason Fleetwood-Boldt
Is there any compelling argument for why the current structure is broken? Is this just a aesthetic and/or stylistic proposal? Most of the larger apps I work on have 10-15 files in initializers. Squashing them into on 1 file not a good option to me. Inside the app/ folder of larger Rails apps

Re: [Rails-core] bug in 3.2.14 related to multipart mail sending using a format block

2014-01-31 Thread Jason Fleetwood-Boldt
switch to any other version (except Raw source) On Jan 31, 2014, at 4:47 PM, Jason Fleetwood-Boldt wrote: > When passing a format block to mailer, this makes Gmail (web-based) and my > OS X Mail client display the Plain-text alternative when it should be > displaying the HTML versi

[Rails-core] bug in 3.2.14 related to multipart mail sending using a format block

2014-01-31 Thread Jason Fleetwood-Boldt
Dear Rails Core, I believe I have identified a bug related to passing a format block to a mail() method call (I identified this on Rails 3.2.14, have not tried other versions of Rails). Contrary to what is documented here http://guides.rubyonrails.org/action_mailer_basics.html, I was not able

Re: [Rails-core] Only-Except, not_nil?

2012-08-15 Thread Jason Fleetwood-Boldt
"How many ruby developers does it does to ask if something is not false?" Although non-standard, I would argue that the most logical way to write that is: unless object.nil? I know it's a double-negative, but in fact if you think about it it makes perfect sense -- you're saying you want to do

Re: [Rails-core] Re: request.format = :mobile causes error "undefined method `ref' for nil:NilClass"

2012-04-12 Thread Jason Fleetwood-Boldt
Ahh, yes, confirmed -- this works! Thanks so much. I didn't realize this was a necessary step. -Jason On May 22, 2011, at 2:37 PM, Michael Koziarski wrote: > The error message you're receiving is pretty confusing, so there's > definitely something nicer we should do there. However I'm gues

Re: [Rails-core] Re: request.format = :mobile causes error "undefined method `ref' for nil:NilClass"

2011-05-23 Thread Jason Fleetwood-Boldt
Yes, confirmed--- that was the problem, I didn't (/realize I had to) set the MIME type for mobile in config/initializers/mime_types.rb if the error message could say something like "You need to register the mime type to use for format for :mobile in config/initializers/mime_types.rb" that would

Re: [Rails-core] request.format = :mobile causes error "undefined method `ref' for nil:NilClass"

2011-05-21 Thread Jason Fleetwood-Boldt
onrails-talk) since this > one is for core issues. > > Regards, > Ben Langfeld > > > On Sat, May 21, 2011 at 2:38 AM, Jason Fleetwood-Boldt > wrote: > I'm just trying to set the request format by detecting a mobile user agent. > > This used to work in Rail

[Rails-core] request.format = :mobile causes error "undefined method `ref' for nil:NilClass"

2011-05-20 Thread Jason Fleetwood-Boldt
I'm just trying to set the request format by detecting a mobile user agent. This used to work in Rails 2: request.format = :mobile Just trying to make it render with a "mobile" format home.mobile.html.haml For some reason this causes "undefined method `ref' for nil:NilClass" somewhere deep i