app/models/theme.rb in disguise-0.1.3 vs app/models/theme.rb in disguise-0.2.0
- old
+ new
@@ -1,9 +1,9 @@
class Theme < ActiveRecord::Base
def locales
- Dir[ File.join(RAILS_ROOT, 'themes', self.current, 'locales', '*.{rb,yml}') ]
+ Dir[ File.join(RAILS_ROOT, 'themes', self.name, 'locales', '*.{rb,yml}') ]
end
# This method will iterate through all available themes in the theme directory
# and then return an array of all themes as well as the currently selected theme
# as a hash in the format:
@@ -31,10 +31,10 @@
end
theme = {:name => theme_name, :preview_image => image, :description => description}
themes << theme
- current_theme = theme if selected_theme.current == theme_name
+ current_theme = theme if selected_theme.name == theme_name
end
end
[current_theme, themes]
end