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

Allow resetting defaults #25

Open
mustmodify opened this issue Jan 12, 2016 · 1 comment
Open

Allow resetting defaults #25

mustmodify opened this issue Jan 12, 2016 · 1 comment

Comments

@mustmodify
Copy link
Owner

class TravelEstimationService < Valuable
  has_collection :resources
end

if CONFIG[:live]    
  TravelEstimationService.set_default(:resources => [ MappingProvider::RouteInfo ]
end
@mustmodify
Copy link
Owner Author

mustmodify commented May 11, 2018

Another example:

class GenericInterface < Valuable
  has_value :encoding, default: 'UTF-8'
end

class ActualInterface < GenericInterface
  set_default encoding: 'ISO-8859-1'
end

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

1 participant