lib/telegram/bot/updates_controller/callback_query_context.rb
# Uses #context_from_callback_query as context name.
# If context is present checks if `%context%_callback_query` is valid
# action method and returns it if so. Context is stripped from data
# in this case. Otherwise returns `super`.
#
# It wont raise ActionNotFound as MessageContext does,
# because `data` param is controlled by client.
Uses #context_from_callback_query as context name.
If context is present checks if `%context%_callback_query` is valid
action method and returns it if so. Context is stripped from data
in this case. Otherwise returns `super`.

It wont raise ActionNotFound as MessageContext does,
because `data` param is controlled by client.
Uses #context_from_callback_query as context name . If context is present checks if ` %context%_callback_query ` is valid action method and returns it if so . Context is stripped from data in this case . Otherwise returns ` super ` . It wont raise ActionNotFound as MessageContext does because ` data ` param is controlled by client .
def action_for_callback_query
          context, new_data = context_from_callback_query
          if context
            action_name = "#{context}_callback_query"
            if action_method?(action_name)
              action_options = {type: :callback_query_context, context: context}
              return [[action_name, action_options], [new_data]]
            end
          end
          super
        end
def action_for_callback_query context , new_data = context_from_callback_query if context action_name = "#{context}_callback_query" if action_method? ( action_name ) action_options = { type : :callback_query_context , context : context } return [ [ action_name , action_options ] , [ new_data ] ] end end super end
Uses #context_from_callback_query as context name.
Uses #context_from_callback_query as context name .