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
3
votes
1 answer

How to pass multiple locals to a nested partial

This should be extremely straightforward and well documented, and I've done it several times, although there's something that's still killing me. I have a structure of partials calling nested partials. At some point one render call needs to pass an…
Don Giulio
  • 2,946
  • 3
  • 43
  • 82
3
votes
2 answers

How to render images in rails3 select

I want to render dropdown list in form with images as options. How to achieve this in rails3?
Achaius
  • 5,904
  • 21
  • 65
  • 122
3
votes
3 answers

Undefined method `remember_token=' 'find_by_remember_token' - Chapter 8 Ruby on Rails Tutorial

I am trying to complete the Ruby on Rails Tutorial by Michael Hartl and I am stuck on Chapter 8. I am getting the same two errors when I run my tests: NoMethodError: undefined method remember_token=' ActionView::Template::Error: undefined…
user2121492
  • 31
  • 1
  • 3
3
votes
1 answer

Permission Issue on Ubuntu with Rails App

I have a permission issue with Rails on my Ubuntu / Apache / Passenger server. When I look in my Apache error_log file, I see: ActionView::Template::Error (Permission denied - /opt/bitnami/apps/tradelogs/tmp/cache/790): 78: 79: <% end %> 80: …
yellowreign
  • 3,528
  • 8
  • 43
  • 80
3
votes
2 answers

Ruby on Rails View inserting js.erb file via render

For including a piece of javascript that I only need on some pages, I put = javascript_tag do = render "inserts_js_enhanced_element.js.erb" in my haml file. Now I get the warning in my tests: DEPRECATION WARNING: Passing a template handler in…
Yo Ludke
  • 2,149
  • 2
  • 23
  • 38
3
votes
2 answers

Rails 3.2 ActionView::Template::Error javascript_include_tag

I have a perfectly working dev environment on a windows 7 laptop. Today, I got a new windows 8 laptop and trying to set up the dev environment on it. Installed rails etc and created new sample app and it worked fine. Then I cloned my app and tried.…
korada
  • 576
  • 4
  • 10
3
votes
4 answers

Being html_safe in Rails while retaining html entities?

Let's say I'm outputting a post title and in our database, it's Hello Y’all -- can I output it without using .html_safe, but in such a way that it doesn't get output in html as Hello Y&#8217;all? That is, if a user copies a post title from…
Aaron Gibralter
  • 4,773
  • 3
  • 35
  • 50
3
votes
2 answers

Rails XML builder with no pretty-printing (i.e. minified XML)

I am using Builder::XmlMarkup to produce data structures in XML format for a RESTful API server. Recently, I discovered a bug where the pretty-printing from Builder::XmlMarkup produced an element full of whitespace text instead of an empty element…
JasonSmith
  • 72,674
  • 22
  • 123
  • 149
3
votes
0 answers

Android SearchView.getQuery() returns null

I have a search widget as a collapsible action view. I want to save the user entered query on device rotation. I have tried to use searchView.getQuery().toString(); on different places in my code. The problem I am facing is that it is always…
TutenStain
  • 237
  • 2
  • 6
  • 18
3
votes
1 answer

Rails: Why are white-spaces defined in templates shown?

Getting a little bit confused as to why these whitespaces are being taken literally. If you take a look at the image below you'll see a bunch of rectangles. The top rectangle on the left should actualy align with the bar on the right but it doesn't…
digitalWestie
  • 2,647
  • 6
  • 28
  • 45
3
votes
0 answers

RailsAdmin multiple lines in list view cell

I'd like to get RailsAdmin to show two fields in one cell. config.model Model do list do field :id do label '#' end field :email do label 'Customer' formatted_value do view = bindings[:view] …
hammads
  • 71
  • 6
3
votes
0 answers

How do I include module into ActionView from the lib directory?

I am attempting to add a new module of custom helpers to the ActionView::Base library. I was able to get the module to load from the config/initializers directory but when I load it into the lib, the module is no longer found. I have: #…
Jeremy B.
  • 9,168
  • 3
  • 45
  • 57
2
votes
1 answer

Trouble using config.assets.precompile in Rails 3

I am trying to use the config.assets.precompile variable in config/environments/production.rb but am having troubles. I've configured it like so: config.assets.precompile += %w( pds.css ) This file is located at app/assets/stylesheets/pds.css.scss.…
YWCA Hello
  • 2,997
  • 4
  • 29
  • 40
2
votes
2 answers

Trying to call for a specific method - routing error

I have user and product models. User's table has a "discount" field. I trying to call method "apply_discount" from users/index view, which multiplies all prices and given discount. users/index.html.haml: - @users.each do |user| # user data =…
2
votes
1 answer

ActionView::Template::Error, multiple unknown regexp options problems

1 to make an application, and everything's been working fine so far. However, out of nowhere, ActionView is suddenly failing horribly. It seems it can't recognize any closed html tags. Every time it sees a closed parentheses, it claims that these…
varatis
  • 14,494
  • 23
  • 71
  • 114