Rails code

Ruby code posted by Mugen
created at 03 Feb 01:30, updated at 22 Feb 14:03

Edit | Back
1
2
3
4
5
6
7
8
9
changes = compute_changes(data_model)
new_data_model = apply_changes(changes)
changes(new_data_model) == []

def(access)
  if access.present?
    current_user.admin ? Article.new : Artecle.all
  end
end
212 Bytes in 2 ms with coderay