This works on windows but not linux

I have this app where if I am logged in as admin, I set the Group
model so that when it saves a record it will automatically set
the approved field to true. That field has a default value of false
in mysql. This works fine in windows, but when I setup the app
to run on hostingrails.com which is linux, it doesn’t work. Any
ideas ?

=================================

class Admin::BaseController < ApplicationController
layout ‘admin’
before_filter :set_admin, :authorize, :except =>
[“login”,“admin_login”, ‘logout’]

def set_admin
Group.set_admin()
end

======================================

class Group < ActiveRecord::Base

before_create :set_fields

def Group.set_admin
@@admin = true
end

def set_fields
if defined? @@admin
self.approved = true
end
end

end

end

never mind, user error on this, I had a bug in one of my models and I
figured it out

[email protected] wrote:

never mind, user error on this, I had a bug in one of my models and I
figured it out

I hope that you discovered that setting @@admin will never work in
production when you have more than one user on your system… :slight_smile:

ilan