gluttonberg/app/models/page.rb
# Load the matching localization as specified in the options
Load the matching localization as specified in the options
Load the matching localization as specified in the options
def load_localization(conditions = {})
      conditions[:page_id] = id 
      @current_localization = localizations.first(conditions) unless conditions.empty?
    end
def load_localization ( conditions = { } ) conditions [ :page_id ] = id @current_localization = localizations . first ( conditions ) unless conditions . empty? end
Load the matching localization as specified in the options
Load the matching localization as specified in the options
# OMGWTFBBQ: I shouldn't have explicitly set the id in the conditions # like this, since I’m going through an association.
conditions