RJS file not rendering

Hi Aaron,

I think you need to tell Rails what view template to use.

def cities

    respond_to do |format|
      format.js { @cities = Store.find_by ... }
    end

end

Pretty sure this will pick up the .rjs template.

HTH,
Bill

Try renaming cities.rjs to cities.js.rjs. Rails is smart enough to know that it’s getting a JS request, so there’s no need to tell Rails to what template to use as long as the controller method and view template follow the standard naming convention.

Tim

Hi again,
Bah, turns out I had the right files in the wrong folder. I have an
admin/stores folder and a plain old stores folder, and my partials and
RJS were in the admin version Stupid!

Thanks,
Aaron.