I have a helper module with a bunch of method calls in the format
def link_to_details_for_facebook(param1, param2)
def link_to_details_for_twitter(param1, param2)
def link_to_content_for_facebook(param1, param2)
def link_to_content_for_twitter(param1, param2)
is there a way to call one method such as, so I can dynamically call correct the helper method?
def link_to_type_for_social_network(param1, param2, type="details", social_network="facebook")
method("#{type}_url_to_#{social_network}(param1, param2)".to_sym).callend
This just gives me the error
undefined method
details_to_facebook(param1, param2)' for class
ActionView::Base'