Re: [Rails-core] Rails generator model with optional validations and required?

2019-08-29 Thread Emile Bosch
an > passing it along to Rails. > > On Thu, Aug 29, 2019 at 11:13 AM Emile Bosch wrote: >> >> Thanks for your participation! >> Hmm, maybe. However I am afraid this might get a bit cumbersome when writing >> more then 4 fields. The word required in this sample is &

Re: [Rails-core] Rails generator model with optional validations and required?

2019-08-29 Thread Emile Bosch
Thanks for your participation! Hmm, maybe. However I am afraid this might get a bit cumbersome when writing more then 4 fields. The word required in this sample is the longest word of this command. Maybe req? Are there any other generators out there that tackle this problem? Also an *

[Rails-core] Rails generator model with optional validations and required?

2019-08-29 Thread Emile Bosch
Hi there, Like numerous times I am generating models, I go in to make fields required and validates_presence_of them. Would it be easy if we could just say: ~~ rails g model contact *name *email:string *age:int ~~ Simple but super easy to add and makes it all a bit more dry. Let me know what

Re: [Rails-core] Security, encryption and privacy (PII) related additions to ActiveRecord

2019-02-10 Thread emile
of additional things such as erasing a persons data, auto expiration or requesting a dump of the data. But this is probably out of scope. Let me know what you think! On Saturday, February 9, 2019 at 5:32:41 PM UTC+1, Jeremy Daer wrote: > > That would be wonderful, Emile! Guidance like this would b

[Rails-core] Security, encryption and privacy (PII) related additions to ActiveRecord

2019-02-09 Thread emile
feedback, Emile -- 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 this group, send email to r

[Rails-core] PROPSAL: Composability for apps / omakase, ‘rails add [gem]/remove —bare`

2017-05-22 Thread Emile Bosch
I’ve been building apps/apis /w graphql and webpack for some time now. I usually start with a `rails new` then start removing all the files/frameworks i don’t need for decreasing the cognitive load. Over time when i need it i start adding things like mailer/sprockets/maybe active job (if that

Re: [Rails-core] Link_to conditional classes with 'class:' feature request (and all the other helpers that take CSS classes)

2016-11-08 Thread emile
t; >> link_to("Hello", root_path, class: {class: {btn:true, selected: >> selected?}} >> >> I think this would be awesome, anything reasons why we shouldn't >> implement this? >> >> Cheers, >> >> - Emile >> >> -- >> You

Re: [Rails-core] Link_to conditional classes with 'class:' feature request (and all the other helpers that take CSS classes)

2016-11-08 Thread emile
he value >> is true) >> >> link_to("Homepage", root_path, class: {selected: selected?}) >> >> -> a href class="selected" and other >> >> You can do the same thing to add multiple classes too >> >> link_to("Hello", r

[Rails-core] Link_to conditional classes with 'class:' feature request (and all the other helpers that take CSS classes)

2016-10-24 Thread emile
ath, class: {selected: selected?}) -> a href class="selected" and other You can do the same thing to add multiple classes too link_to("Hello", root_path, class: {class: {btn:true, selected: selected?}} I think this would be awesome, anything reasons why we shouldn't i

[Rails-core] Re: Allow hash for conditional class attribute in tag helper

2016-10-24 Thread emile
Well this is old, but still relevant :) I've seen the replies, but i've we do it the way we wanted and just because all the other attributes are doing it that way, i think you're doing it wrong. Rails is meant to please the developer, making painful constructs just to make a link selected or

Re: [Rails-core] ActiveRecord per user/tenant connection pool

2015-12-12 Thread emile
The problem lies in that if you aren't connected as a specified user, you can't use the databases built in features to secure the tenants data like Row Level Security. Or even secure the schema per customer. Simply because the database, postgres in this case, doesn't know who you are and

Re: [Rails-core] ActiveRecord per user/tenant connection pool

2015-12-12 Thread emile
i did. the issue at hand is that its hard to mitigate a sql jnjection attack without setting users at connection level. this wouldnt mitigate it. Sent from my iPhone > On 12 Dec 2015, at 22:01, James Coleman wrote: > > I don't currently have easy access to a PG 9.5 box, but

[Rails-core] ActiveRecord per user/tenant connection pool

2015-12-10 Thread emile
this desired behavior. I hope i made myself clear a bit, - Emile -- 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

[Rails-core] Polymorphic with foreign key support.

2015-07-21 Thread emile
Since FK's are now accepted and in rails 4 how about we fix polymorphic which something like this? https://github.com/wegowise/polymorpheus Anyone from core ideas on this? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Core group. To unsubscribe

Re: [Rails-core] Scopes with OR and AND optional chainity discussion

2012-06-21 Thread Emile Cantin
from me. Emile Le 2012-06-21 à 09:48, daniel2d2art a écrit : Hi guys, I'want to introduce this discussion (I'm looking for similar here, but don't found it) Actually the scopes chainity is glued with AND operator. Some times we need to chain the same scope implemented method using both