Hi, input please!

I'm trying to dynamically serve js/css based on the active 
controller+action, e.g.:

    <link href="/stylesheets/*people/update*.css" /> 
    <script src="/javascripts/*people/update*.js"></script> 

In application_helper.rb, I'm using the following method to create the 
dynamic bits of the asset URLs:

    def asset_path_fragment
      "*#{controller.controller_name}/#{controller.action_name}*"
    end

Then I realized a flaw in my logic:

  def *update*
    if @something_goes_wrong
      render *:edit* # render the #edit's view but erroneously serve the 
#update's css/js
    end
  end
  
So ... what should I do?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/0bMHqe-I96QJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to