Sha256: e6a3b96c43529d18b93a54959ffd46982be1425792be3ba476309c0ede9a0e66

Contents?: true

Size: 465 Bytes

Versions: 3

Compression:

Stored size: 465 Bytes

Contents

<% module_namespacing do -%>
module Mokio
  class <%= class_name %> < Mokio::Content

    def columns_for_table
      %w(title active type updated_at lang_id)
    end

    def editable
      true
    end

    def deletable
      true
    end

    # Generate url to edit content
    def title_view
      (ActionController::Base.helpers.link_to self[:title], ApplicationController.helpers.edit_url(self.class.base_class, self)).html_safe
    end

  end
end
<% end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mokio-2.0.8 lib/generators/mokio/templates/contents/model.rb
mokio-0.0.15 lib/generators/mokio/templates/contents/model.rb
mokio-0.0.14 lib/generators/mokio/templates/contents/model.rb