Questions tagged [actionview]

For questions about Action Views, HTML and Ruby templates used in Ruby on Rails

HTML and Ruby templates used in .

Action View is the View part of for , and is a part of the Ruby-On-Rails Action Pack.

490 questions
2
votes
2 answers

ruby could not come after coffeescript in .js.coffee for ajax response

I am using Rails 3.1, it seems that I could not use Ruby script after a CoffeeScript statement in my create_error.js.coffee view file for the AJAX response. If I do it like this it will work: <% if @attached_image.errors.any? %> alert 'something…
larryzhao
  • 3,173
  • 2
  • 40
  • 62
2
votes
3 answers

How do i override the Live TV player being the default handler of an Intent set to the action ACTION_VIEW?

I am trying to follow along here. I have just starting learning to work with channels on GoogleTV. https://developers.google.com/tv/android/docs/gtv_channelchanging This doc says... *Any Google TV Android application can change the TV channel…
ZippyFerguson
  • 889
  • 1
  • 7
  • 8
2
votes
3 answers

Action Items with dropdown menu view

I want to create something similar to this picture where you select the action view and it brings up a dropdown list of items, is that just a submenu of the menu item or something else?
tyczj
  • 71,600
  • 54
  • 194
  • 296
2
votes
1 answer

ActionView::MissingTemplate - but the template exists already?

I'm having some issues with routing in Rails. I already have a model in place for a Project model, so I generated some default controllers and views using rails generate scaffold_controller, e.g. rails generate scaffold_controller Project. As…
R B
  • 31
  • 1
  • 8
2
votes
1 answer

How to show the name of a partial in the generated HTML itself

I searched but couldn't find a straightforward answer. I would like to be able to see which partial generated a certain piece of HTML. So when in a view I would say: <%= render :partial => 'stackoverflow', locals: { answers: "johny be good" }…
Sjors Branderhorst
  • 2,138
  • 17
  • 25
2
votes
1 answer

Creating a Blank Rails 3.1 Templating Handler

What I want to do is make it just output the view itself, and ignore what Rails would normally think is embedded Ruby within the HTML. For example:

<%= homework.name %>
Jarred Sumner
  • 1,793
  • 6
  • 33
  • 45

2
votes
1 answer

Rails' render is generating bizarre, subtly wrong content

I've got an app that hosts simple html pages for people. Some of whom use tables for design layout. (Not me, I swear!) For some mysterious reason, render breaks these layouts in Internet Explorer. Here is the simplest way I've been able to reproduce…
jpadvo
  • 6,031
  • 3
  • 26
  • 30
2
votes
1 answer

Rails - view a picture which represents data in the database

I'm searching for some idea how to let the stars view like on this example: Right now, I have a table with a column for the black stars and a column for the grey stars.(in "Hüllenkontrolle" for example a "2" for 2 black stars and "4" for 4 grey…
Kirinriki
  • 855
  • 4
  • 12
  • 18
2
votes
1 answer

undefined method `javascript_packs_with_chunks_tag` in Webpacker latest version

I just upgraded to Webpacker 6.0.0.beta.5 and this error came up. ActionView::Template::Error (undefined method `javascript_packs_with_chunks_tag' for #
Orlando
  • 9,374
  • 3
  • 56
  • 53
2
votes
1 answer

Why isn't my Create Form working, or even responding?

So I'm using form_with, and my code is placed in views/users/new.html.erb <% content_for :title, "Sign Up" %> <% if @user.errors.any? %>

<%= pluralize(@user.errors.count, "error") %> prohibited…

user11703419
2
votes
2 answers

Rails 6, @unbound_templates is nil in actionview/lib/action_view/template/resolver.rb

Upgrading from Rails 5.2.3 to 6.0.0 or 6.0.1, with Ruby 2.6.3, after bundling succeeds, the rails app:update command has been carefully run, and webpacker updated, a request to any page that requires no authentication gives: Puma caught this error:…
snowangel
  • 3,452
  • 3
  • 29
  • 72
2
votes
1 answer

form_with not displaying remote true since rails 5.2

Since upgrading Rails from 5.1 to 5.2, form_with is not defaulting to remote: true, although it was in rails 5.1 How to default to remote true?
Nicolas Maloeuvre
  • 3,069
  • 24
  • 42
2
votes
1 answer

ActionView::MissingTemplate on HAML Mailer in Rails

Rails version: 5.0.2 haml-rails: 1.0.0 This was working prior to the Rails 4.2 => 5.0.2 upgrade. I have a mailer class: app/mailers/password_mailer.rb class PasswordMailer < ActionMailer::Base default :from => ENV['ORG_FROM_EMAIL'] ||=…
Brit200313
  • 728
  • 5
  • 20
2
votes
1 answer

ActionView::MissingTemplate when trying out Devise Login Items

Now, I have to admit, I'm totally new to Ruby on Rails and don't quite understand every concept. I have installed Devise for authentication and followed this guide to include sign up and log in links in my views. Here's what I did in my…
slhck
  • 36,575
  • 28
  • 148
  • 201
2
votes
1 answer

Rails: variable access: from ApplicationController to ActionView

How do I access in an ActionView a variable, that has been defined in the ApplicationController? In my case, I'd like to make my layout respond to a variable that's been set-up in the ApplicationController. If it were a view, associated with a…
Albus Dumbledore
  • 12,368
  • 23
  • 64
  • 105