class Foo < ActiveRecord::Base scope :public, -> { … } # this overrides Module#public end class FoosController < ApplicationController def create @foo = Foo.new(params[:foo]) respond_to do |format| if @foo.save format.html { redirect_to @foo, notice: 'foo was successfully created.' } format.json { render json: @foo, status: :created, location: @foo } else format.html { render action: "new" } forma