Skip to content

Instantly share code, notes, and snippets.

@knowuh
Created June 4, 2010 18:52
Show Gist options
  • Save knowuh/425795 to your computer and use it in GitHub Desktop.
Save knowuh/425795 to your computer and use it in GitHub Desktop.
def contains_active_model(model_object)
m = []
if collectdata_model_active && model == model_object then m << model end
if collectdata2_model_active && second_model == model_object then m << second_model end
if (collectdata3_model_active && third_model) then m << third_model.model_type.name end
if (further_model_active && fourth_model) then m << fourth_model.model_type.name end
m.length > 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment