ブックマーク / api.rubyonrails.org (4)

  • ActionController::Parameters

    Action Controller Parameters Allows you to choose which attributes should be whitelisted for mass updating and thus prevent accidentally exposing that which shouldn't be exposed. Provides two methods for this purpose: require and permit. The former is used to mark parameters as required. The latter is used to set the parameter as permitted and limit which attributes should be allowed for mass upda

    kent-where-the-light-is
    kent-where-the-light-is 2017/02/15
    “Methods # ==, [], []= C converted_arrays D deep_dup, delete, delete_if, dig E each, each_pair, except, extract! F fetch, fields_for_style? I inspect K keep_if M merge, merge!, method_missing N new P permit, permit!, permitted=, permitted? R reject, reject!, require, required S select, select!, sl
  • ActiveJob::Enqueuing

    Enqueues the job to be performed by the queue adapter. Options :wait - Enqueues the job with the specified delay :wait_until - Enqueues the job at the time specified :queue - Enqueues the job on the specified queue :priority - Enqueues the job with the specified priority Examples my_job_instance.enqueue my_job_instance.enqueue wait: 5.minutes my_job_instance.enqueue queue: :important my_job_instan

    kent-where-the-light-is
    kent-where-the-light-is 2016/12/26
    “retry_job(options={}) Link Reschedules the job to be re-executed. This is useful in combination with the rescue_from option. When you rescue an exception from your job you can ask Active Job to retry performing your job. Options :wait - Enqueues the job with the specified delay :wait_until - Enqu
  • ActionController::ConditionalGet

    Sets the Cache-Control header, overwriting existing directives. This method will also ensure an HTTP Date header for client compatibility. Defaults to issuing the private directive, so that intermediate caches must not cache the response. Options :public If true, replaces the default private directive with the public directive. :must_revalidate If true, adds the must-revalidate directive. :stale_w

    kent-where-the-light-is
    kent-where-the-light-is 2016/08/11
    “If the request doesn't match the options provided, the request is considered stale and should be generated from scratch”
  • ActiveRecord::Transactions::ClassMethods

    Ruby on Rails 7.1.3.4 Module ActiveRecord::Transactions::ClassMethods activerecord/lib/active_record/transactions.rb Active Record Transactions Transactions are protective blocks where SQL statements are only permanent if they can all succeed as one atomic action. The classic example is a transfer between two accounts where you can only have a deposit if the withdrawal succeeded and vice versa. Tr

  • 1