Git Product home page Git Product logo

Comments (11)

dblock avatar dblock commented on June 28, 2024

We were just discussing this on another mailing list. Maybe hashie-forbidden-attributes even? Suggest more.

from hashie_rails.

Maxim-Filimonov avatar Maxim-Filimonov commented on June 28, 2024

How about hashie-strong-parameters? We probably should change dependency to be on strong_parameters gem not on active_support then.

from hashie_rails.

Maxim-Filimonov avatar Maxim-Filimonov commented on June 28, 2024

Just tried what @dm1try suggested. Looks like it can work without dependency on activesupport. @dblock do you see any reason to keep activesupport dependency?

from hashie_rails.

dm1try avatar dm1try commented on June 28, 2024

@Maxim-Filimonov change dependency to be on strong_parameters is not so good idea, it will be an extra dependency for new projects because "strong parameters" is part of ActiveModel already

so you need some conditional dependency(bundler does not allow those things, I think)

if ActiveModel.VERSION < VersionWithoutStrongParams
  add_runtime_dependency 'strong_params'
...

You can lock on a specific AM version in the future if permitted? interface will be changed to another one(I don't think so :))

BTW, I don't like the way in which Hashie::Mash expand the public interface using any_unexisting_method with suffix ?. In common case your gem solve this problem => hashie-free-permitted?-method 😄 , it will be work not only for strong_params) .

If Mash expand its interface in this way it should allow except option or smth similar..

UPD
Forgot, for me hashie-strong-parameters and hashie-forbidden-attributes are both acceptable.

from hashie_rails.

dblock avatar dblock commented on June 28, 2024

I merged that PR. @Maxim-Filimonov You should pick a name and go at renaming this!

from hashie_rails.

Maxim-Filimonov avatar Maxim-Filimonov commented on June 28, 2024

I've been reading Rubygems guides about naming gems
Looks like as it's extension to Hashie it should be called something like hashie-forbidden_attributes. I'll go with that rename then unless anyone has better idea

from hashie_rails.

dblock avatar dblock commented on June 28, 2024

👍

from hashie_rails.

dm1try avatar dm1try commented on June 28, 2024

:shipit:

from hashie_rails.

Maxim-Filimonov avatar Maxim-Filimonov commented on June 28, 2024

Ok renamed.
Haven't pushed to Rubygems yet. If all good with the other one I'll close this issue with deprecation PR

from hashie_rails.

dblock avatar dblock commented on June 28, 2024

Looks fine to me, made a minor README pr.

from hashie_rails.

Maxim-Filimonov avatar Maxim-Filimonov commented on June 28, 2024

https://rubygems.org/gems/hashie-forbidden_attributes 🚀

from hashie_rails.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.