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
image: python:3.4 | |
stages: | |
- build | |
- test | |
- e2e-test | |
- deploy | |
before_script: |
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
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? |
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
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: { |