Browse files

Stick to naming conventions and fix menu match

  • Loading branch information...
1 parent 153d9a0 commit 91b7ed52b469e6558c69d63083cf90dbeb088957 @unixcharles committed May 26, 2011
View
2 db/migrate/1_create_translations.rb
@@ -19,7 +19,7 @@ def self.up
end
def self.down
- UserPlugin.destroy_all({:name => "Translations"})
+ UserPlugin.destroy_all({:name => "refinerycms_translations"})
drop_table :translations
end
View
2 db/seeds/refinerycms_translations.rb
@@ -1,4 +1,4 @@
User.find(:all).each do |user|
- user.plugins.create(:name => "translations",
+ user.plugins.create(:name => "refinerycms_translations",
:position => (user.plugins.maximum(:position) || -1) +1)
end
View
2 lib/generators/refinerycms_translations_generator.rb
@@ -3,6 +3,6 @@
class RefinerycmsTranslationsGenerator < ::Refinery::Generators::EngineInstaller
source_root File.expand_path('../../../', __FILE__)
- engine_name 'refinerycms-translations'
+ engine_name 'refinerycms_translations'
end
View
4 lib/translations.rb → lib/refinerycms-translations.rb
@@ -9,7 +9,9 @@ class Engine < Rails::Engine
config.after_initialize do
Refinery::Plugin.register do |plugin|
- plugin.name = "translations"
+ plugin.name = "refinerycms_translations"
+ plugin.url = {:controller => '/admin/translations', :action => 'index'}
+ plugin.menu_match = /^\/?(admin|refinery)\/translations/
plugin.activity = {:class => Translations,
:title => 'name'
}

0 comments on commit 91b7ed5

Please sign in to comment.