El Tuesday 04 November 2008 15:04:00 [EMAIL PROTECTED] escribió:
> I've been trying to figure this out for a long time.
>
> I have absolutely identical apps - one local and one at
> hostingrails.com. I'm running the same version of everything.
>
> But, options_for_association_conditions does not fire on the
> production server no matter what. Even if I run in development mode.
>
> What are the possible reasons for this.
>
> I have an organizations table and an orgcoalitions table
>
> The orgcoalitions table has an organization_id and a coalition_id
> field.
>
> In my models for organization I have
> has_many :orgcoalitions
>
> for orgcoalition I have
> belongs_to :organization, :foreign_key => 'coalition_id'
>
>
> because an organization can be a coalition and other organizations can
> belong to it...
>
> Again, This works perfectly on my local machine, and I see in the log
> that it runs
>
> In my orcoalitions_helper.rb I have
> def options_for_association_conditions(association)
> logger.debug "association - #{association.name}"
> if association.name == :organization
> ['coalition =?',1]
> else
> super
> end
> end
>
> In my orgcoalitions_controller.rb I have
>
> class OrgcoalitionsController < ApplicationController
> layout "generic"
> active_scaffold :orgcoalition do |config|
> config.columns[:organization].form_ui = :select
> config.columns[:organization].label = "Coalition"
> config.columns[:organization].clear_link
>
> end
> end
>
> It runs perfectly, showing my debug code on my local machine and
> limiting the organizations in the pulldown to the ones that have
> coalition set to 1, but not on the production machine in either
> production or development.
>
> Something is preventing it from running all together...
You can change logger.debug with logger.info to try in production mode and
look for that line in log file
--
Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---