Module: Adminpanel::RouterHelper

Defined in:
app/helpers/adminpanel/router_helper.rb

Instance Method Summary collapse

Instance Method Details

#collection_routes(resource) ⇒ Object



23
24
25
# File 'app/helpers/adminpanel/router_helper.rb', line 23

def collection_routes(resource)
  resource_class(resource).collection_routes
end


3
4
5
# File 'app/helpers/adminpanel/router_helper.rb', line 3

def get_gallery_children(resource)
  resource_class(resource).gallery_children
end

#has_fb_share?(resource) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/helpers/adminpanel/router_helper.rb', line 11

def has_fb_share?(resource)
  resource_class(resource).fb_share?
end

#has_twitter_share?(resource) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/helpers/adminpanel/router_helper.rb', line 15

def has_twitter_share?(resource)
  resource_class(resource).twitter_share?
end

#member_routes(resource) ⇒ Object



19
20
21
# File 'app/helpers/adminpanel/router_helper.rb', line 19

def member_routes(resource)
  resource_class(resource).member_routes
end

#resources_parameters(resource) ⇒ Object



7
8
9
# File 'app/helpers/adminpanel/router_helper.rb', line 7

def resources_parameters(resource)
  resource_class(resource).routes_options
end

#rest_path_namesObject



27
28
29
30
31
32
33
34
35
# File 'app/helpers/adminpanel/router_helper.rb', line 27

def rest_path_names
  {
    path_names: {
      new: I18n.t('routes.new'),
      edit: I18n.t('routes.edit'),
      show: I18n.t('routes.show')
    }
  }
end