Top "Actionview" questions

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

How can I add a view path to Rails's partial rendering lookup?

I'd like to have the following directory structure: views/ app1/ users/_user.html.erb users/index.html.erb app2/ users/…

ruby-on-rails ruby-on-rails-3 partial-views actionview actionviewhelper
Changing view on Menu Item in Action Bar

I'm attempting to implement a refresh button in my app to allow a user to manually re-sync to a web …

android android-actionbar actionview
Dynamic error pages in Rails 3

In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(…

ruby-on-rails ruby-on-rails-3 exception-handling error-handling actionview
Rails passing form_for object to partial

I would like to pass the form_for object to a partial: <%= form_for @price do |f| %> ... <%= …

ruby-on-rails object partials actionview
What is the correct button_to syntax for adding a class to the generated form?

I'm trying to apply a class to the form generated by button_to in Rails 3. The :class option sets the …

ruby-on-rails css ruby-on-rails-3 helpers actionview
Rails: link_to with block and GET params?

How can I achieve query string and URL parameters in a link_to block declaration? Right now, I have this, …

ruby-on-rails activerecord actionview
Rails form_tag form writing - with non-active record model

I'm somewhat of a Rails newbie. I'm writing a couchrest-rails app, so am not using activerecord for this model. I …

ruby-on-rails actionview form-for actionviewhelper
How do I expire a view cached fragment from console?

Something like Rails.cache.delete('site_search_form') doesn't seem to work. Is this possible? Thanks.

ruby-on-rails ruby caching actionview
How to access a Rails controller view context from outside of a controller?

I am working on cleaning up some code that relies on some custom controller helper methods, by creating a "plain …

ruby-on-rails actionview actioncontroller actionviewhelper
Rails console - use image_tag method

How can I execute a image_tag method in a Rails console Run the console $ rails c Load helpers include …

ruby-on-rails helper irb actionview actionviewhelper