Skip to content

Instantly share code, notes, and snippets.

View lksv's full-sized avatar

Lukas Svoboda lksv

  • Brno, Czech Republic
View GitHub Profile
image: python:3.4
stages:
- build
- test
- e2e-test
- deploy
before_script:
class LocalAdministrationUnit < ActiveRecord::Base
# it should be :vusc, :okres :obec :cast_obce :momc
belongs_to :ruian_locable, polymorphic: true
validates :ruian_locable_id, uniqueness: { scope: [:ruian_locable_type] }
validates :ruian_locable_id, presence: true
def title
return nil if ruian_locable.nil?
def update_tree(options = {}, &block)
authorize!(action_name.to_sym, resource_class)
parent_id = params[:parent_id]
# check that parent shoud by node which is visible for the user.
authorize!(:list, params[:parent_id])
err_exit = proc { |r|
render json: {