func (v LinksResource) New(c buffalo.Context) error {
	return c.Render(200, r.Auto(c, &models.Link{}))
}
New renders the form for creating a new Link.
This function is mapped to the path GET /links/new
package actions
import (
	"github.com/devrelcollective/xela/models"
	"github.com/gobuffalo/buffalo"
	"github.com/gobuffalo/pop"
	"github.com/pkg/errors"
)
type LinksResource struct {
	buffalo.Resource
}
func (v LinksResource) List(c buffalo.Context) error {
	tx, ok := c.Value("tx").(*pop.Connection)
	if !ok {
		return errors.WithStack(errors.New("no transaction found"))
	}
	links := &models.Links{}
	q := tx.PaginateFromParams(c.Params())
	if err := q.All(links); err != nil {
		return errors.WithStack(err)
	}
	c.Set("pagination", q.Paginator)
	return c.Render(200, r.Auto(c, links))
}
func (v LinksResource) Show(c buffalo.Context) error {
	tx, ok := c.Value("tx").(*pop.Connection)
	if !ok {
		return errors.WithStack(errors.New("no transaction found"))
	}
	link := &models.Link{}
	if err := tx.Find(link, c.Param("link_id")); err != nil {
		return c.Error(404, err)
	}
	return c.Render(200, r.Auto(c, link))
}