CANCAN and fieldSearch

6 views
Skip to first unread message

Gloufy

unread,
Sep 16, 2024, 2:05:38 PM9/16/24
to ActiveScaffold : Ruby on Rails Gem
Hi Sergio I've got this error since a update activecaffold.

wrong number of arguments (given 1, expected 0)

Sergio Cambra

unread,
Sep 17, 2024, 10:52:20 AM9/17/24
to ActiveScaffold : Ruby on Rails Gem, Gloufy

I have fixed it, undoing the new parameter added to new_model, and using a new method, so it doesn't break code overriding new_model


https://github.com/activescaffold/active_scaffold/issues/727




El lunes, 16 de septiembre de 2024 20:05:38 (CEST), Gloufy escribió:

> Hi Sergio I've got this error since a update activecaffold.

>

> wrong number of arguments (given 1, expected 0)

> def show_search

> @record = new_model(false)

> super

> end

>

>

>

> active_scaffold (9404878966b3)

> lib/active_scaffold/bridges/cancan/cancan_bridge.rb:51:in `new_model'

> active_scaffold (9404878966b3)

> lib/active_scaffold/actions/field_search.rb:15:in `show_search'

Gloufy

unread,
Sep 21, 2024, 10:28:55 AM9/21/24
to ActiveScaffold : Ruby on Rails Gem
thank you so much
Reply all
Reply to author
Forward
0 new messages