Skip to content

Instantly share code, notes, and snippets.

@saturnflyer
Created April 8, 2014 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save saturnflyer/10140954 to your computer and use it in GitHub Desktop.
Save saturnflyer/10140954 to your computer and use it in GitHub Desktop.
overriding presenter with
def with_conditions(method_name, computed_value)
if method_name.to_s == 'address' && !computed_value.nil?
address.renderable?
else
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment