in the application_helper !!! I found it ! sorry
Le vendredi 8 janvier 2016 10:19:02 UTC+1, Sergio Cambra a écrit :
>
> Probably you can override active_scaffold_column_dragonfly and rescue
> exception:
>
> def active_scaffold_column_dragonfly(record, column)
> super
> rescue
> return something for error (or nothing)
> end
>
>
> El jueves, 7 de enero de 2016 8:21:16 (CET) Gloufy escribió:
> > last question !
> > when in the action "list"
> > one picture doesn't be on the hard disk for X reason, in production mode
> > i'v a error, because dragonfly doesn't find the file, i just want to
> show
> > nothing if there are not a picture instead a big error which crash the
> > "application"
> > how to do that ?
> >
> > Le lundi 4 janvier 2016 09:56:07 UTC+1, Gloufy a écrit :
> > > you rocks ! thank you and happy new year !
> > >
> > > Le mardi 29 décembre 2015 15:55:35 UTC+1, Sergio Cambra a écrit :
> > >> I have fixed on 3.4.32
> > >>
> > >> El jueves, 24 de diciembre de 2015 9:23:03 (CET) Gloufy escribió:
> > >> > sorry i forget to copy that :
> > >> > validates_presence_of :portrait,
> > >> >
> > >> > :pied
> > >> >
> > >> > Le jeudi 24 décembre 2015 13:42:06 UTC+1, Sergio Cambra a écrit :
> > >> > > I don't see why it's adding required to file input fields, there
> is
> > >>
> > >> no
> > >>
> > >> > > validates_presence_of for them
> > >> > >
> > >> > > El Jueves, 24 de diciembre de 2015 04:26:46 Gloufy escribió:
> > >> > > > validates_property :format, of: :portrait, in: ['jpeg','jpg',
> > >>
> > >> 'png',
> > >>
> > >> > > > 'gif'],message: "Le format de la photo portrait doit être :
> .jpeg,
> > >>
> > >> .jpg,
> > >>
> > >> > > > .png, .gif",:on =>
> > >> > > >
> > >> > > > :create
> > >> > > > :
> > >> > > > validates_property :format, of: :pied, in: ['jpeg','jpg',
> 'png',
> > >> > > >
> > >> > > > 'gif'],message: "Le format de la photo pied doit être : .jpeg,
> > >>
> > >> .jpg,
> > >>
> > >> > > .png,
> > >> > >
> > >> > > > .gif",:on =>
> > >> > > >
> > >> > > > :create
> > >> > > >
> > >> > > > validate do
> > >> > > >
> > >> > > > errors.add(:portrait, "Il faut une photo portrait") if self
> > >> > > >
> > >> > > > .portrait.blank?
> > >> > > >
> > >> > > > errors.add(:pied, "Il faut une photo en pied") if
> > >>
> > >> self.pied.blank?
> > >>
> > >> > > > end
> > >> > > >
> > >> > > > Le jeudi 24 décembre 2015 13:03:16 UTC+1, Sergio Cambra a écrit
> :
> > >> > > > > What are validations on your model?
> > >> > > > >
> > >> > > > > El Jueves, 24 de diciembre de 2015 03:40:07 Gloufy escribió:
> > >> > > > > > exactly ! no errors on loading form just when i'm clicking
> on
> > >>
> > >> update
> > >>
> > >> > > > > button,
> > >> > > > >
> > >> > > > > > in tab inspector i didn't find a request for a submit,
> without
> > >>
> > >> click
> > >>
> > >> > > > > update
> > >> > > > >
> > >> > > > > > button and click update button.
> > >> > > > > > but if i put this on the helper it's work :
> > >> > > > > >
> > >> > > > > > def active_scaffold_input_options(column, scope = nil,
> options
> > >>
> > >> = {})
> > >>
> > >> > > > > > opts = super
> > >> > > > > >
> > >> > > > > > if (column.name.to_s=="portrait" and
> > >>
> > >> [email protected]?)
> > >>
> > >> > > or
> > >> > >
> > >> > > > > > (column.name.to_s=="pied" and [email protected]?)
> > >> > > > > >
> > >> > > > > > opts.delete(:required)
> > >> > > > > >
> > >> > > > > > end
> > >> > > > > >
> > >> > > > > > opts
> > >> > > > > >
> > >> > > > > > end
> > >> > > > > >
> > >> > > > > > Le jeudi 24 décembre 2015 12:25:06 UTC+1, Sergio Cambra a
> écrit
> > >> > > > > >
> > >> > > > > > > Re-read and I think not focusable errors are logged when
> form
> > >>
> > >> is
> > >>
> > >> > > > > loaded,
> > >> > > > >
> > >> > > > > > > trying to focus first field, not related to submit. Check
> > >>
> > >> network
> > >>
> > >> > > tab
> > >> > >
> > >> > > > > in
> > >> > > > >
> > >> > > > > > > inspector, is there a request for submit? If not, check
> > >>
> > >> fields
> > >>
> > >> > > with
> > >> > >
> > >> > > > > > > required
> > >> > > > > > > attribute.
> > >> > > > > > >
> > >> > > > > > > El Jueves, 24 de diciembre de 2015 03:15:05 Gloufy
> escribió:
> > >> > > > > > > > Yes ! :
> > >> > > > > > > > <input value="false" type="hidden"
> > >> > >
> > >> > > name="record[remove_portrait]"
> > >> > >
> > >> > > > > > > > id="record_remove_portrait"> but no required
> attribute..
> > >> > > > > > > >
> > >> > > > > > > > Le mardi 28 juillet 2015 09:21:28 UTC+2, Sergio Cambra
> a
> > >>
> > >> écrit :
> > >> > > > > > > > > Probably it's a hidden field, which have wrongly
> required
> > >> > > > >
> > >> > > > > attribute.
> > >> > > > >
> > >> > > > > > > Can
> > >> > > > > > >
> > >> > > > > > > > > you check that with inspector?
> > >> > > > > > > > >
> > >> > > > > > > > > El Viernes, 24 de julio de 2015 04:25:35 Gloufy
> escribió:
> > >> > > > > > > > > > Hi
> > >> > > > > > > > > >
> > >> > > > > > > > > > On update, my form is doesn't send when i don't
> change
> > >>
> > >> the
> > >>
> > >> > > > > dragonfly
> > >> > > > >
> > >> > > > > > > > > file.
> > >> > > > > > > > >
> > >> > > > > > > > > > In console i have :
> > >> > > > > > > > > >
> > >> > > > > > > > > > An invalid form control with
> name='record[portrait]' is
> > >>
> > >> not
> > >>
> > >> > > > > > > focusable.
> > >> > > > > > >
> > >> > > > > > > > > > edit:1 An invalid form control with
> name='record[pied]'
> > >>
> > >> is
> > >>
> > >> > > not
> > >> > >
> > >> > > > > > > > > > focusable.
> > >> > > > > > > > > >
> > >> > > > > > > > > >
> > >> > > > > > > > > >
> > >> > > > > > > > > > What does that mean ?
> > >> > > > > > > > > >
> > >> > > > > > > > > >
> > >> > > > > > > > > >
> > >> > > > > > > > > > Gloufy
>
>
>
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.