I have almost 200 scaffolds that I render inline a few at a time on various
pages (actions/views). This has always been a problem for me after surfing
to more than a few of the pages I have rendering the inline scaffolds. So
in the controller of the pages/actions that have the inline scaffolds I
have this method used as a before_filter. It saves the active_scaffold
specific session data until accessing another page where different inline
scaffolds are rendered.
def purge_as_session_variables
self.session.to_hash.each do |k, v|
if k.to_s =~ /\Aas:/
logger.debug("deleting rails session key: #{k}")
session.delete(k)
end
end
end
On Tue, Oct 23, 2012 at 11:47 AM, Hernan Astudillo <[email protected]> wrote:
> AS is storing a lot of useless data in session causing CookieOverflow.
> Is there a way to get rid of all list.label generated by each association?
>
> session dump:
>
>
> --- !ruby/hash:Rack::Session::Abstract::SessionHash
> session_id: 5420679b5a715e2a5ecd3c0896113129
> as:mensajes:
> :list: {}
> input_device_type: MOUSE
> hover_supported: true
> _csrf_token: ER7Hie2NqmQ8bYGeq6Z0UoIlOpAn0FHMXvb+PcMjrtI=
> warden.user.user.key:
> - User
> - - 1
> - $2a$10$FRy9trwaMi4qERjT/wkoSu
> as:oirs:
> :list:
> sort:
> - id
> - DESC
> page: '1'
> :marked_records: !ruby/object:Set
> hash: {}
> as:subsanaciones_31:
> :list:
> :label: Subsanaciones de 31
> as:dialogos_31:
> :list:
> :label: Dialogos de 31
> as:revisiones_55:
> :list:
> :label: Revisiones de 55
> as:revisiones_54:
> :list:
> :label: Revisiones de 54
> as:prorrogas_55:
> :list:
> :label: Prorrogas de 55
> as:admisibilidades_55:
> :list:
> :label: Admisibilidades de 55
> as:admisibilidades_54:
> :list:
> :label: Admisibilidades de 54
> as:prorrogas_54:
> :list:
> :label: Prorrogas de 54
> as:casos:
> :list: {}
> :marked_records: !ruby/object:Set
> hash: {}
> as:usuarios:
> :list: {}
> as:roles_1:
> :list:
> :label: roles de HernĂ¡n Astudillo
> as:entrevistas_53:
> :list:
> :label: Entrevistas de 53
> as:dialogos_55:
> :list:
> :label: Dialogos de 55
> as:reportes:
> :list:
> page:
> :search: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
> rut: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
> opt: =
> from: ''
> to: ''
> comuna: ''
> perfiles: '2'
> subsistema: ''
> calidad: ''
> urgencia: ''
> id: ''
> materia: ''
> tipo: ''
> punto: ''
> forma_respuesta: ''
> forma_subsana: ''
> organismo: ''
> ingresor: ''
> estado: ''
> compromiso: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
> opt: BETWEEN
> number: '1'
> unit: DAYS
> from: ''
> to: ''
> range: TODAY
> created_at: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
> opt: BETWEEN
> number: '1'
> unit: DAYS
> from: ''
> to: ''
> range: TODAY
> updated_at: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
> opt: BETWEEN
> number: '1'
> unit: DAYS
> from: ''
> to: ''
> range: TODAY
> responsable: ''
> tags: ''
> afectaciones_count: ''
> derivaciones_count: ''
> dialogos_count: ''
> prorrogas_count: ''
> respuestas_count: ''
> subsanaciones_count: ''
> token: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
> opt: ! '%?%'
> from: ''
> to: ''
> base_tags: ''
> as:dialogos_54:
> :list:
> :label: Dialogos de 54
> as:subsanaciones_36:
> :list:
> :label: Subsanaciones de 36
> as:documentos_55:
> :list: {}
> as:respuestas_55:
> :list: {}
> as:respuestas_54:
> :list:
> :label: Respuestas de 54
> as:salidas_48:
> :list:
> :label: Salidas de 48
> as:subsanaciones_37:
> :list:
> :label: Subsanaciones de 37
> as:documentos_37:
> :list:
> :label: Documentos de 37
> as:usuarios_36:
> :list:
> :label: usuario de qaa
> as:revisiones_56:
> :list:
> :label: Revisiones de 56
> as:entrevistas_56:
> :list:
> :label: Entrevistas de 56
> as:salidas_56:
> :list:
> :label: Salidas de 56
> as:prorrogas_53:
> :list:
> :label: Prorrogas de 53
> as:admisibilidades_53:
> :list:
> :label: Admisibilidades de 53
>
>
> --
> 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.
>
--
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.