ruby on rails 3 - Active Admin calling original and overriden create action -


i seeing odd behaviour when trying override create action on active admin resource. reason overriding action want alter request params first.

activeadmin.register user    controller      def create       format_params        create!     end      def update       format_params        update!     end      def format_params       params[:user] = ...     end    end  end 

what seeing a create action being invoked twice - on second time overridden version. point, new record created, albeit incorrectly, , second invoking (which is overridden version) looks duplicate resource.

if empty custom #create action , leave logging statement, can see record still being created prior being invoked, if there sort of before_ callback, although can't find such thing in code.

even more odd - works fine on overridden #update method - params altered , original #update! method delegated correctly.

i using active admin 0.5.1 on rails 3.2.13

cheers


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -