This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module HasBulkActions | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def bulk_update(ids, attributes, params = {}) | |
where("#{table_name}.id" => ids).update_all(attributes) | |
extract_bulk_events(params[:events], attributes).each do |event| | |
notify(event.to_sym) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1 ПЛОХО! | |
def UsersController | |
actions :index, :create | |
def update | |
end | |
def destroy | |
end | |
end |