Skip to content
Browse files

Added Refinery namespace

  • Loading branch information...
1 parent 008322b commit ef10e9a7f3711f8546340149af7c9f92f9df1262 @juozasg juozasg committed Oct 10, 2011
Showing with 27 additions and 27 deletions.
  1. +26 −26 db/migrate/add_profile_fields_to_users.rb
  2. +1 −1 lib/refinerycms-memberships.rb
View
52 db/migrate/add_profile_fields_to_users.rb
@@ -1,35 +1,35 @@
class AddProfileFieldsToUsers < ActiveRecord::Migration
def self.up
- add_column ::User.table_name, :first_name, :string
- add_column ::User.table_name, :last_name, :string
- add_column ::User.table_name, :title, :string
- add_column ::User.table_name, :phone, :string
- add_column ::User.table_name, :fax, :string
- add_column ::User.table_name, :website, :string
- add_column ::User.table_name, :organization, :string
- add_column ::User.table_name, :street_address, :string
- add_column ::User.table_name, :city, :string
- add_column ::User.table_name, :province, :integer
- add_column ::User.table_name, :postal_code, :string
- add_column ::User.table_name, :member_until, :datetime
- add_column ::User.table_name, :membership_level, :string
+ add_column Refinery::User.table_name, :first_name, :string
+ add_column Refinery::User.table_name, :last_name, :string
+ add_column Refinery::User.table_name, :title, :string
+ add_column Refinery::User.table_name, :phone, :string
+ add_column Refinery::User.table_name, :fax, :string
+ add_column Refinery::User.table_name, :website, :string
+ add_column Refinery::User.table_name, :organization, :string
+ add_column Refinery::User.table_name, :street_address, :string
+ add_column Refinery::User.table_name, :city, :string
+ add_column Refinery::User.table_name, :province, :integer
+ add_column Refinery::User.table_name, :postal_code, :string
+ add_column Refinery::User.table_name, :member_until, :datetime
+ add_column Refinery::User.table_name, :membership_level, :string
end
def self.down
- remove_column ::User.table_name, :first_name
- remove_column ::User.table_name, :last_name
- remove_column ::User.table_name, :title
- remove_column ::User.table_name, :phone
- remove_column ::User.table_name, :fax
- remove_column ::User.table_name, :website
- remove_column ::User.table_name, :organization
- remove_column ::User.table_name, :street_address
- remove_column ::User.table_name, :city
- remove_column ::User.table_name, :province
- remove_column ::User.table_name, :postal_code
- remove_column ::User.table_name, :member_until
- remove_column ::User.table_name, :membership_level
+ remove_column Refinery::User.table_name, :first_name
+ remove_column Refinery::User.table_name, :last_name
+ remove_column Refinery::User.table_name, :title
+ remove_column Refinery::User.table_name, :phone
+ remove_column Refinery::User.table_name, :fax
+ remove_column Refinery::User.table_name, :website
+ remove_column Refinery::User.table_name, :organization
+ remove_column Refinery::User.table_name, :street_address
+ remove_column Refinery::User.table_name, :city
+ remove_column Refinery::User.table_name, :province
+ remove_column Refinery::User.table_name, :postal_code
+ remove_column Refinery::User.table_name, :member_until
+ remove_column Refinery::User.table_name, :membership_level
end
end
View
2 lib/refinerycms-memberships.rb
@@ -16,7 +16,7 @@ class Engine < Rails::Engine
# this broke as part of config.to_prepare
# Do this or lost password non-admins still goes to the dashboard
- ::Admin::DashboardController.class_eval do
+ Refinery::Admin::DashboardController.class_eval do
old_index = instance_method(:index)
define_method(:index){|*args|
if current_user.has_role?(:super_user) || current_user.has_role?(:refinery)

0 comments on commit ef10e9a

Please sign in to comment.
Something went wrong with that request. Please try again.