Sha256: 236a889b24254e3a92743cb86e150f4561fd36f0e18201abf95fc0ea4a9bbe59

Contents?: true

Size: 270 Bytes

Versions: 45

Compression:

Stored size: 270 Bytes

Contents

def update_use_restriction
  YAML.load(open('db/fixtures/enju_circulation/use_restrictions.yml').read).each do |line|
    l = line[1].select!{|k, v| %w(name display_name).include?(k)}
    UseRestriction.where(name: l["name"]).first.try(:update_attributes!, l)
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
enju_circulation-0.3.11 lib/tasks/use_restriction.rb
enju_circulation-0.3.10 lib/tasks/use_restriction.rb
enju_circulation-0.3.9 lib/tasks/use_restriction.rb
enju_circulation-0.4.0.rc.1 lib/tasks/use_restriction.rb
enju_circulation-0.3.8 lib/tasks/use_restriction.rb
enju_circulation-0.3.7 lib/tasks/use_restriction.rb
enju_circulation-0.4.0.beta.4 lib/tasks/use_restriction.rb
enju_circulation-0.4.0.beta.3 lib/tasks/use_restriction.rb
enju_circulation-0.3.6 lib/tasks/use_restriction.rb
enju_circulation-0.4.0.beta.2 lib/tasks/use_restriction.rb
enju_circulation-0.4.0.beta.1 lib/tasks/use_restriction.rb
enju_circulation-0.3.5 lib/tasks/use_restriction.rb
enju_circulation-0.3.4 lib/tasks/use_restriction.rb
enju_circulation-0.3.3 lib/tasks/use_restriction.rb
enju_circulation-0.3.2 lib/tasks/use_restriction.rb
enju_circulation-0.3.1 lib/tasks/use_restriction.rb
enju_circulation-0.3.0 lib/tasks/use_restriction.rb
enju_circulation-0.3.0.rc.1 lib/tasks/use_restriction.rb
enju_circulation-0.3.0.beta.1 lib/tasks/use_restriction.rb
enju_circulation-0.2.5 lib/tasks/use_restriction.rb