I hereby claim:
- I am cswalina on github.
- I am chets (https://keybase.io/chets) on keybase.
- I have a public key ASC2UEXdsoUnobHu4pQ85lHbQu9Hmi3bOm5f1rsAw8rKtgo
To claim this, I am signing this object:
We usually store tokens in the app in config/mixpanle.yml: | |
development: | |
token: 1234xyz | |
test: | |
token: abc123 | |
And put the top-level Mixpanel code snippet in a shared partial, "app/views/shared/_mixpanel.html.erb": | |
<% if mixpanel_enabled? %> |
RailsAdmin.config do |config| | |
config.authorize_with do | |
redirect_to main_app.root_path, error: "You are not authorized." unless current_user.is_admin? | |
end | |
. | |
. | |
. | |
end | |
-------- |
gem 'active_model_serializers' | |
rails g serializer publication | |
app/serializers/api/v1/publication_serializer.rb | |
module API::V1 | |
class PublicationSerializer < ActiveModel::Serializer | |
attributes :title | |
end |
I hereby claim:
To claim this, I am signing this object:
class Rotation | |
has_many :shift_cycles | |
def template | |
# given some shift_cycles: | |
#-------------------------------+ | |
# days_on | days_off | shift_id | | |
#-------------------------------+ | |
# 3 | 1 | 5 | |
# 2 | 1 | 6 |