What does the colon denote when used at the beginning and at the end of something? I think that a colon at the begging of something (e.g. :set_cart
) denotes a method. Is this correct? Here are a few examples:
<%= button_to "Checkout", new_order_path, method: :get %>
<%= button_to "Empty Cart", @cart, method: :delete,
data: {confirm: 'Are you sure?' } %>
Edit: Another Example
before_action :set_cart, only: [:new, :create]
before_action :set_order, only: [:show, :edit, :update, :destroy]