Where dos "Web::Action" module come from?

Hey guys. I am trying to figure out how Lotus works and I was not able to figure out where the action modules come from.

Example:

# Extracted from 
# https://discuss.lotusrb.org/t/problem-with-rendering-a-page-from-a-controller/144

module Web::Controllers::Registrations
  class Create
    # where does this module come from?
    include Web::Action
    # ...
  end
end

I searched for that module inside my project and all I found was:

  #  file: apps/web/application.rb

  # Configure the code that will yield each time Web::Action is included
  # This is useful for sharing common functionality
  #
  # See: http://www.rubydoc.info/gems/lotus-controller#Configuration
  controller.prepare do
    # include MyAuthentication # included in all the actions
    # before :authenticate!    # run an authentication before callback
  end

I suppose this is created via meta programming.

TIA!

@mjacobus It’s generated at the runtime, bye Lotus loader. See http://lotusrb.org/guides/actions/overview/

1 Like