return concatenated javascript in rails action

I am working on a rails/angular application where all of the front end
is angular and the angular controllers call rails controller actions.
The idea is to be able to include this application on third party web
sites, not necessarily ours. So, what I'm trying to do is have a script
tag pointing to a rails controller action which returns all of the
scripts concatenated that are in the application.js file. I have the
following file in my public directory...

<%= stylesheet_link_tag "api", media: "all" %>
<div id="content" ng-app="board"><ng-view></ng-view></div>
<script src="<%= url_for :controller => 'api', :action => 'board'

And then in my controller, I have this action.

def board
    api_key = params[:api_key]
    board = nil
    unless api_key.nil?
       board = Board.where('api_key=? and active=?', api_key, true)
    respond_to do |format|
       if !board.any?
          format.js { render inline: 'invalid call', status: 403 }
          cookies[:board_id] = board.first().id

So, I have successfully returned the board.js.erb file associated with
this action, but instead I want to return the concatenated and minified
scripts from application.js. My understanding of the asset pipeline is
that when pushed to production, rails will already concat and minify the
application.js files into one js file. But how can I do something like
that directly from the controller action? Thanks.