Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include touch option on save #88

Open
rubenrails opened this issue Aug 25, 2015 · 4 comments
Open

Include touch option on save #88

rubenrails opened this issue Aug 25, 2015 · 4 comments

Comments

@rubenrails
Copy link

@netlogics recommended adding a touch option when saving a record. Example offered was:

if timestamps
  set_created_at
  set_updated_at unless options[:touch] == false
@javierg
Copy link
Member

javierg commented Aug 25, 2015

I don't like too many options on save... We want to have a skinny api

@netlogics
Copy link

Validate and touch are the only two I'm aware of.
I would propose a definition for skinny API to mean
Exclusive feature set with comprehensive implementation
By carefully adhering to a proposed standard we can maintain a skinny API with consistent and expected functionality. Skinny API doesn't mean less lines of code. It means defining and sticking to a core feature set. Conversely comprehensive implementation doesn't mean more lines of code. It means implementing the core feature set so it is complete and functions in a manner that is consistent with ruby's and rails' conventions.

@javierg
Copy link
Member

javierg commented Aug 25, 2015

Exactly... The implenenyation of timestamps IMO should be left to the App... So, leaving the handling of timestamps should be ob the timestamps method not con save

@netlogics
Copy link

I don't think it's necessary to strictly parallel rails implementation. Validate was essential for consistency imo but touch probably isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants