On Martes, 23 de Marzo de 2010 12:48:40 andrea escribió:
> Thanks Sergio, both 1) and 2) solutions working with file_column and
> validation_reflection bridges/plugins.

Thanks, I will fix file_column bridge

>
>
> On Mar 23, 9:30 am, "Sergio Cambra .:: entreCables S.L. ::."
>
> <[email protected]> wrote:
> > On Lunes, 22 de Marzo de 2010 18:14:08 andrea escribió:
> > > Yes probably a ruby bug, but all working without file_column plugin.
> > >
> > > Thanks for your feedback.
> >
> > Can you try with these changes?
> >
> > 1. In lib/bridges/file_column/lib/as_file_column_bridge.rb, remove
> > require and change opening class Column with class_eval:
> >
> > class ActiveScaffold::DataStructures::Column.class_eval do
> >   attr_accessor :file_column_display
> > end
> >
> > 2. Without changes from above, in
> > lib/bridges/validation_reflection/lib/validation_reflection_bridge.rb,
> > add a require and change class_eval with opening the class:
> >
> > require 'active_scaffold/data_structures/column'
> > module ActiveScaffold::DataStructures
> >   class Column
> >     include ActiveScaffold::ValidationReflectionBridge
> >   end
> > end
> >
> > > On 22 Mar, 09:53, "Sergio Cambra .:: entreCables S.L. ::."
> > >
> > > <[email protected]> wrote:
> > > > On Viernes, 19 de Marzo de 2010 22:27:42 andrea escribió:
> > > > > Any feedback ?
> > > >
> > > > It's working here too. Does it work if you removed file_column? I
> > > > don't think file_column is breaking validation_reflection bridge
> > > > because it doesn't override Column#initialize. Maybe it's a ruby bug
> > > >
> > > > > On 18 Mar, 12:43, andrea <[email protected]> wrote:
> > > > > > I did some testing and the problem seems to be generated by the
> > > > > > file_column plugins and so by the AS file_column bridge.
> > > > > > The combination of plugins AS + validation_reflection +
> > > > > > file_column not working with:
> > > > > >   ruby1.8.6(2008-08-11 patchlevel 287)
> > > > > >   ruby1.8.7(2009-12-24 patchlevel 248), MBARI 0x8770, Ruby
> > > > > > Enterprise Edition 2010.01
> > > > > > Have not problem with ruby1.8.6(2009-06-08 patchlevel 369)
> > > > > >
> > > > > > Thanks for support.
> > > > > >
> > > > > > On Mar 18, 9:52 am, "Sergio Cambra .:: entreCables S.L. ::."
> > > > > >
> > > > > > <[email protected]> wrote:
> > > > > > > On Jueves, 18 de Marzo de 2010 09:30:48 andrea escribió:
> > > > > > > > The initialize_with_validation_reflection (alias method for
> > > > > > > > initialize) is not called (not aliased?) when the default
> > > > > > > > initializer for Column class is called.
> > > > > > > > I have rails 2.3.5 and the latest AS with the latest
> > > > > > > > validation_reflection plugin.
> > > > > > >
> > > > > > > I'm using rails 2.3.5, latest master branch of AS, lastest
> > > > > > > validation_reflection (from redinger repository in github), and
> > > > > > > bridge is working. Using ruby-enterprise1.8.6-20080810
> > > > > > >
> > > > > > > > Thanks for support.
> > > > > > > >
> > > > > > > > On 17 Mar, 19:04, andrea <[email protected]> wrote:
> > > > > > > > > Someone have tested ReflectValidation as Bridge ?
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > On Mar 17, 4:04 pm, andrea <[email protected]> wrote:
> > > > > > > > > > Yes i have an up to date AS, my
> > > > > > > > > > ib/bridges/validation_reflection/lib/
> > > > > > > > > > validation_reflection_bridge.rb is:
> > > > > > > > > >
> > > > > > > > > > module ActiveScaffold
> > > > > > > > > >   module ValidationReflectionBridge
> > > > > > > > > >     def self.included(base)
> > > > > > > > > >       base.class_eval
> > > > > > > > > > { alias_method_chain :initialize, :validation_reflection
> > > > > > > > > > } end
> > > > > > > > > >
> > > > > > > > > >     def initialize_with_validation_reflection(name,
> > > > > > > > > > active_record_class)
> > > > > > > > > >       initialize_without_validation_reflection(name,
> > > > > > > > > > active_record_class)
> > > > > > > > > >       column_names = [name]
> > > > > > > > > >       column_names << @association.primary_key_name if
> > > > > > > > > > @association self.required = column_names.any? do
> > > > > > > > > >
> > > > > > > > > > |column_name|
> > > > > > > > > >
> > > > > > > > > > active_record_class.reflect_on_validations_for(column_nam
> > > > > > > > > >e.to _sym ).any? do |val|
> > > > > > > > > >           val.macro == :validates_presence_of or
> > > > > > > > > > (val.macro == :validates_inclusion_of and not
> > > > > > > > > > val.options[:allow_nil] and not
> > > > > > > > > > val.options[:allow_blank])
> > > > > > > > > >         end
> > > > > > > > > >       end
> > > > > > > > > >     end
> > > > > > > > > >   end
> > > > > > > > > > end
> > > > > > > > > > ActiveScaffold::DataStructures::Column.class_eval do
> > > > > > > > > >   include ActiveScaffold::ValidationReflectionBridge
> > > > > > > > > > end
> > > > > > > > > >
> > > > > > > > > > but not work.
> > > > > > > > > >
> > > > > > > > > > Thanks for support.
> > > > > > > > > >
> > > > > > > > > > On Mar 17, 2:00 pm, "Sergio Cambra .:: entreCables S.L.
> > > > > > > > > > ::."
> > > > > > > > > >
> > > > > > > > > > <[email protected]> wrote:
> > > > > > > > > > > On Miércoles, 17 de Marzo de 2010 09:39:36 andrea 
escribió:
> > > > > > > > > > > > The alias method chain wich alias the initialize for
> > > > > > > > > > > > active scaffold column with new initializer with
> > > > > > > > > > > > validation reflection seems not work.
> > > > > > > > > > >
> > > > > > > > > > > Do you have an up to date AS? Do you have this line in
> > > > > > > > > > > lib/bridges/validation_reflection/lib/validation_reflec
> > > > > > > > > > >tion _bri dge.rb ? base.class_eval { alias_method_chain
> > > > > > > > > > >
> > > > > > > > > > > :initialize,
> > > > > > > > > > > :
> > > > > > > > > > > :validation_reflection }
> > > > > > > > > > >
> > > > > > > > > > > It's working here.
> > > > > > > > > > >
> > > > > > > > > > > > On 16 Mar, 19:01, andrea <[email protected]> 
wrote:
> > > > > > > > > > > > > With the latest AS
> > > > > > > > > > > > > (git://github.com/activescaffold/
> > > > > > > > > > > > > active_scaffold.git) and the latest validation
> > > > > > > > > > > > > reflection plugin
> > > > > > > > > > > > > (git://github.com/redinger/validation_reflection.gi
> > > > > > > > > > > > >t), the required column property is not
> > > > > > > > > > > > > automatically set to true, when i have validations
> > > > > > > > > > > > > on model
> > > > > > > > > > > > > (validates_presence_of). This seems associated to
> > > > > > > > > > > > > the git commit where validation reflection is moved
> > > > > > > > > > > > > to bridge.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks for support.
> > > > > > > > > > >
> > > > > > > > > > > --
> > > > > > > > > > > Sergio Cambra .:: entreCables S.L. ::.
> > > > > > > > > > > Mariana Pineda 23, 50.018 Zaragoza
> > > > > > > > > > > T)902 021 404F)976 52 98 07E) [email protected]
> > > > > > >
> > > > > > > --
> > > > > > > Sergio Cambra .:: entreCables S.L. ::.
> > > > > > > Mariana Pineda 23, 50.018 Zaragoza
> > > > > > > T)902 021 404F)976 52 98 07E) [email protected]
> > > >
> > > > --
> > > > Sergio Cambra .:: entreCables S.L. ::.
> > > > Mariana Pineda 23, 50.018 Zaragoza
> > > > T)902 021 404F)976 52 98 07E) [email protected]
> >
> > --
> > Sergio Cambra .:: entreCables S.L. ::.
> > Mariana Pineda 23, 50.018 Zaragoza
> > T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 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.

Reply via email to