Skip to content

Instantly share code, notes, and snippets.

View didicodethat's full-sized avatar

Mauricio didicodethat

View GitHub Profile
def authorize_mass_actions local_action
policy_name = if ['read_all', 'move_to_inbox', 'restore_messages'].include?(local_action)
:update?
else
:destroy?
end
Message.with_deleted.where(id: params[:messages_ids]).each do |message|
authorize(message, policy_name)
end
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
ENV BUNDLE_PATH /box
RUN echo "Execute the bundle install on the web container with docker-compose run web bundle install"
ADD . /myapp
<!-- Assincrono -->
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- truepixel_sidebar-right-1_AdSense1_250x250_as -->
<ins class="adsbygoogle"
style="display:inline-block;width:250px;height:250px"
data-ad-client="ca-pub-0645216011874310"
data-ad-slot="2615731312"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>