reward.rb 715 Bytes
Newer Older
surma Lodur's avatar
surma Lodur committed
1
2
ActiveAdmin.register Reward do

surma Lodur's avatar
surma Lodur committed
3
4
5
6
7
8
9
10
11
12
13
  form :html => { :enctype => "multipart/form-data" } do |f|
    f.inputs "Details" do
      f.input :title
      f.input :points
      f.input :description
      f.input :image, :as => :file, :hint => f.template.image_tag(f.object.image.url(:thumb)), :required => false
    end
    f.actions
  end


surma Lodur's avatar
surma Lodur committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  
  # See permitted parameters documentation:
  # https://github.com/gregbell/active_admin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
  #
  # permit_params :list, :of, :attributes, :on, :model
  #
  # or
  #
  # permit_params do
  #  permitted = [:permitted, :attributes]
  #  permitted << :other if resource.something?
  #  permitted
  # end
  
end