Skip to content

Instantly share code, notes, and snippets.

@EminenceHC
Created July 20, 2015 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EminenceHC/6fba81952bf4a830ac85 to your computer and use it in GitHub Desktop.
Save EminenceHC/6fba81952bf4a830ac85 to your computer and use it in GitHub Desktop.
Dynamically
def self.get_group_times(school_id, group_number)
school = School.find(school_id)
var = group_number.to_i
return school."g#{var}start" # I need this to not be a string value it should be: school.g1start
end
Start Time: <%= School.get_group_times(9, 1) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment