Permalink
Browse files

Merge pull request #26 from juozasg/0.9.9.13

Added Refinery namespace
  • Loading branch information...
2 parents 008322b + ef10e9a commit f5006ae5719a6c1c70b1e05b73d54ce59aee2693 @rbriank committed Oct 11, 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
@@ -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
@@ -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 f5006ae

Please sign in to comment.