Commit 3cfba17e authored by jz143's avatar jz143

ability to use team names

parent fdf32211
......@@ -14,4 +14,8 @@ class App < ActiveRecord::Base
'edu.duke.colab.' + self.id.to_s + '_' + self.bundle_identifier_suffix
end
def author_display_name
team_name || try(:user).try(:display_name)
end
end
......@@ -17,8 +17,8 @@
<h4>
<%= app.name %>
<small>
<% unless app.try(:user).try(:display_name).nil? %>
by <%= app.try(:user).try(:display_name) %>
<% if app.author_display_name %>
by <%= app.author_display_name %>
<% end %>
</small>
</h4>
......
class AddTeamNameToApps < ActiveRecord::Migration
def change
add_column :apps, :team_name, :string
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment