module EmailHelper
def active_scaffold_config
Fiche::MainController.active_scaffold_config_for(Fiche)
end
end
Le mercredi 25 janvier 2017 19:44:59 UTC+1, Gloufy a écrit :
>
> since I configure my controller inerit from a another I've got this when I
> try to put the show action in email body :
>
> undefined method `grouped_search?' for
> #<#<Class:0x007fef766acd28>:0x007fef6e21fa60>
>
> Extracted source (around line *#12*):
>
> 10
> 11
> 12
> 13
> 14
> 15
>
>
> <% css_class = "#{column.name}-view"
> css_class.concat(" #{column.css_class}") unless column.css_class.nil? %>
> <dd class="<%= css_class.strip %>">
> <%= show_column_value(record, column) -%>
> <% end -%>
> </dd>
>
> the log : NoMethodError: undefined method `grouped_search?' for
> #<#<Class:0x007fef766acd28>:0x007fef6e21fa60> -- on the ActiveScaffold column
> = :A_CIV_Sexe in PersonneMailer, record: #<Fiche id:...
>
> Le jeudi 17 décembre 2015 20:13:29 UTC+1, Gloufy a écrit :
>>
>> it's ok ! that's work ! thank you so much !
>>
>> Le jeudi 17 décembre 2015 18:49:05 UTC+1, Sergio Cambra a écrit :
>>>
>>> Create a helper module for your mailer, if you don't have one, and
>>> define this method:
>>>
>>>
>>>
>>> def active_scaffold_config
>>>
>>> ControllerClass.active_scaffold_config
>>>
>>> end
>>>
>>>
>>>
>>> El Thursday 17 December 2015 08:41:04 Gloufy escribió:
>>>
>>> thank you but i don't know how to do that.
>>>
>>> ...add a helper method active_scaffold_config...
>>>
>>> Le jeudi 17 décembre 2015 12:55:21 UTC+1, Sergio Cambra a écrit :
>>>
>>> Probably you need to add a helper method active_scaffold_config, which
>>> returns
>>> active_scaffold_config_for(Model) or Controller.active_scaffold_config,
>>> and
>>> maybe some other helper methods needs to be added. Some helpers may be
>>> added
>>> to mailer, but active_scaffold_config needs to be added as a new helper
>>> method, because you need to get config from a controller
>>>
>>> El Jueves, 17 de diciembre de 2015 01:48:03 Gloufy escribió:
>>> > i try it but i've got : undefined method `active_scaffold_config' for
>>> > FicheMailer:Class
>>> > how i can "include" activescaffold" in mailer ?
>>> >
>>> > Le jeudi 17 décembre 2015 09:01:23 UTC+1, Sergio Cambra a écrit :
>>> > > You could try to use render :partial =>
>>> 'active_scaffold_overrides/show',
>>> > > maybe :partial => 'show' works, but I never used activescaffold
>>> views in
>>> > > mailers.
>>> > >
>>> > > El Miércoles, 16 de diciembre de 2015 10:08:32 Gloufy escribió:
>>> > > > Hi,
>>> > > >
>>> > > > I try to put result of a show action in a body of a email with a
>>> mailer.
>>> > > > How to do that ?
>>> > > >
>>> > > > Thanks a lot
>>> > > >
>>> > > > 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.
>>>
>>>
>>>
>>>
--
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.