This commit is contained in:
Godwin
2014-07-05 10:27:49 -06:00
parent 930aa130d6
commit f66f456cc4
36 changed files with 901 additions and 242 deletions
+13
View File
@@ -17,5 +17,18 @@ class Conference < ActiveRecord::Base
def to_param
slug
end
#
#def self.find_by_param(slug)
# find_by_slug_and_conference_type(slug, ConferenceType.find_by_slug('regional').id)
#end
def url(action = :show)
path(action)
end
def path(action = :show)
action = action.to_sym
'/conferences/' + conference_type.slug + '/' + slug + (action == :show ? '' : '/' + action.to_s)
end
end
+4
View File
@@ -1,3 +1,7 @@
class ConferenceType < ActiveRecord::Base
#belongs_to :conference
def to_param
slug
end
end