Menu
  • HOME
  • TAGS

ActionView::MissingTemplate --— Missing template messages/show

ruby-on-rails,ruby,actionview,missing-template

You can do: def render_error(code, status_type = nil) @error = ErrorMessage.new(code, status_type) respond_to do |format| format.any(:html, :json) { render @error.partial, status: @error.status } format.any { head 404, "content_type" => 'text/plain' } end end ...

Rails 4 - Template is missing

ruby-on-rails,ajax,missing-template

Try with this def create @response = Response.new(response_params) respond_to do |format| if @result = @response.save format.html format.js { render 'create.js.erb' } else format.html { render :action => "new" } format.js end end end Source...

Ruby on Rails - template missing error

ruby-on-rails,missing-template

It seems like your project path for your rails app has has a folder with square brackets in the name (the folder titled Rails [Ruby]) : /Users/Constantin/Development/Rails [Ruby]/new-app/app/views Remove the square brackets from the folder name and restart your server. For more information, check out this issue: Rails projects do...

The dreaded missing template error

ruby-on-rails,ruby,missing-template

David and user4703663 are right. Your problem is that you named the template to be a partial but are rendering it as a template. You could either remove the underscore from the file name and leave your code as it is, or leave the filename as it is and "render...

Missing template when rendering a collection using local variables

ruby-on-rails-4,local-variables,missing-template

If you're trying to render the same partial at app/views/categories/_category.html.erb you need to change your render call for your organization's show template. render partial: "categories/category", collection: @categories, ... The app/views/organizations/show.html.erb template will otherwise look for a file at app/views/organizations/_category.html.erb....