Simon N. Wood has arXived a paper on Just Another Gibbs Additive Modeller: Interfacing JAGS and mgcv. Simon is the author of the mgcv package for R, which provides functions for generalized additive (mixed) modelling and is distributed with base R as a recommended package.
Since R version 3.2.0, the mgcv package has included the jagam() function, which generates BUGS code and data for generalized additive models. The jagam() function uses the same interface as the other functions in the mgcv package. The output of jagam can be analyzed directly by JAGS, or modified and incorporated into a larger Bayesian model. We are using jagam in a couple of projects and I highly recommend it if you want to include some smoothing in a hierarchical model.