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

feat(api): update available_position_templates #190

Merged
merged 4 commits into from
Jul 30, 2019

Conversation

michellemtchai
Copy link
Contributor

See issue #189 for more details

create DEPARTMENT environmental variable
create blank position_templates html files
choose template subfolder based on DEPARTMENT
show only relative path for templates
@siefkenj
Copy link
Contributor

Let's change this so we only have oto.html standard.html and invigilate.html. Put them in a defaultdepartment directory and set the environment variable to DEPARTMENT=defaultdepartment

dir = "#{Rails.root}/app/views/position_templates/"
files = Dir.glob("#{dir}/#{ENV['DEPARTMENT']}/*").map do |entry|
{
offer_template: entry.gsub(dir, '')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sub not gsub

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@siefkenj siefkenj merged commit 7b579d8 into uoft-tapp:master Jul 30, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants