|
|
@@ -130,17 +130,18 @@ class Product < ActiveRecord::Base
|
|
|
|
|
|
list do
|
|
|
admin=""
|
|
|
- mer=field :gross_interest_rate do
|
|
|
+ field :gross_interest_rate do
|
|
|
+ visible false
|
|
|
formatted_value{bindings[:view].current_admin_user.email}
|
|
|
if admin.length==0
|
|
|
admin=formatted_value{bindings[:view].current_admin_user.email}
|
|
|
end
|
|
|
end
|
|
|
- puts admin
|
|
|
- # puts mer
|
|
|
- # authorize! :index, @user, :message=> 'Not authorized as an administrator.'
|
|
|
|
|
|
- scopes [:inactive]
|
|
|
+ puts admin
|
|
|
+ if admin.length==0
|
|
|
+ scopes [:inactive]
|
|
|
+ end
|
|
|
|
|
|
filters [:id,:detail,:status,:name]
|
|
|
|