In my local development environment I define a class variabel
@@has:flock? in a modele that is included in controllers so I can
reset this variable in each controller that has to change it
The code in the module is
module CrudActions
  @@page_records=15
  @@has_flock = true

   def index
     if @@has_flock : paginate_conditions=['flock_id=?
',current_user.flock.id]
     else  paginate_conditions='' end

......and in the controller
class DiswebUsersController < ApplicationController
  include CrudActions
  @@page_records=15
.....

That works fine locally but when I deploy the application and use an
apache server it does not work anymore (@@has_flock? is false) in the
method index
Then the variable is not set in the module
Any idees of what is happening ?
I can fix it by defining a method, but I wauld like to know if that is
necessery
Any help is appreciate?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to