|
|
@@ -123,7 +123,7 @@ class Product < ActiveRecord::Base
|
|
|
end
|
|
|
#return ((rate*100).round.to_f/100).to_s + "%"
|
|
|
# user= session_path(user_id)
|
|
|
- return session_path()
|
|
|
+ return @user
|
|
|
end
|
|
|
|
|
|
rails_admin do
|
|
|
@@ -131,6 +131,7 @@ class Product < ActiveRecord::Base
|
|
|
weight -240
|
|
|
|
|
|
list do
|
|
|
+ #authorize! :index, @user, :message=> 'Not authorized as an administrator.'
|
|
|
|
|
|
scopes [:inactive]
|
|
|
|