Questions tagged [partials]

Partials are often synonym for templates, which can even also be called partial templates.

Partials are often synonym for templates, which can even also be called partial templates.

763 questions
0
votes
0 answers

can't find haml partials in rails 2.3.8 in production

The haml partials work fine in development, but are not found in production. I know 2.3.8 is pretty old, but I need to stay with it for a while. UPDATE: I found that if I remove the following line or set it to false in the production.rb…
Dave M
  • 11
  • 3
0
votes
1 answer

How to use a collection of partials to insert partials based on the url?

I'm using docpad with the eco templating engine and the partials plugin. The point of this is to insert a list of snippets into a landing page. The logical approach (to me) is to iterate through a collection of the snippets and insert each…
Metalskin
  • 3,998
  • 5
  • 37
  • 61
0
votes
2 answers

Build table dynamically depending on selection in rails

I am looking for the possibility to build a table in my view dynamically, depending on selection. Currently i have 2 combox ,2 submit buttons and a text_area in my view eg.: <%= select_tag :user_selected, options_from_collection_for_select(@user,…
dot
  • 486
  • 1
  • 8
  • 17
0
votes
0 answers

ActionView::Template::Error - undefined local variable or method

I'm trying to pass a local variable to the partial: <%= render :partial => 'bar/search_bar', :locals => { :foo => "1111" } %> but when I try to access the foo variable in the partial

<%= foo %>

I get: ActionView::Template::Error…
tokhi
  • 21,044
  • 23
  • 95
  • 105
0
votes
1 answer

Passing in variable to rails partial

Right now I have a rails partial that looks like this: <%= render :partial => "/talk/partials/comment", :collection => @comments, :locals => {:votes => @votes} %> I am passing in a collection of comments and another local variable. That comment…
user2184718
  • 675
  • 1
  • 12
  • 30
0
votes
1 answer

Toggling rails partials using jQuery

I'm trying to use jQuery in my rails application to essentially toggle between two partials on the click of a button. The desired behavior is as follows: the page renders with the user's profile and an 'edit profile' button. When the 'edit profile'…
jprince
  • 181
  • 3
  • 11
0
votes
1 answer

Loading in additional partials with angularjs

I use ng-view to pull in a partial to page. After that I would like to load in another partial to the page that would be right next to the initial partial that was brought in. How would I bring in another partial from a angular controller?
Austin Lovell
  • 1,049
  • 3
  • 17
  • 29
0
votes
1 answer

Angularjs including partials based on location

I want to include different headers in my index.html, one for when the user is logged in, and one for when he's not. This is my idea:
0
votes
1 answer

Is there a way to specify a different partial when using the nested_form gem?

Say I have the following polymorphic association: class EmailAddress < ActiveRecord::Base belongs_to :emailable, polymorphic: true end class Person < ActiveRecord::Base has_many :email_addresses, as: :emailable, dependent: :destroy …
robertwbradford
  • 6,181
  • 9
  • 36
  • 61
0
votes
2 answers

Angular.js controllers

Note: Sorry for the length of the post, but the reason I decided not to break it down in separate questions was because I find these issues hard to address without a complex problem like this. I am dazzled, and a bit afraid, that I'm trying to…
Mihaly KR
  • 2,363
  • 2
  • 19
  • 20
0
votes
1 answer

Instantiate instance variable in helper method from controller

I have a helper which instantiates a model and renders a form. This form should be available to any view in the application # support_form_helper def support_form @support_stats = SupportForm::Stat.find(get_stats_id) @enquiry =…
iNulty
  • 923
  • 8
  • 17
0
votes
1 answer

Rails: ERROR: compiling partial haml file

I'm getting the following error on the rails server when I press my 'new task' button on my app: Processing by TasksController#new as JS ERROR: compiling _app_views_tasks__task_form_html_haml__3289363938348847619_70231363971640 RAISED…
user291
  • 99
  • 1
  • 12
0
votes
1 answer

AngularJS routes and partials

I'm using AngularJS routes and partials to establish the page structure of my site. I am using HTML5 mode to avoid the hashbang. Navigation from one page to the next works through clicking on the links, but when refreshing the page or typing the url…
lynnjwalker
  • 741
  • 5
  • 11
  • 25
0
votes
1 answer

Zend view helper & partialLoop : rendering order

I have a view helper that use a partialLoop. Easy, but i want my view helper to return the content of the partialLoop inside an Html tag. So the helper would have the responsability of the html tag surrounding the generated content. class…
qdelettre
  • 1,873
  • 5
  • 25
  • 36
0
votes
1 answer

Rendering a partial in rails. Specifying the partial for a resource gives an error, but not specifying a partial works fine. What gives?

I've got this working now quite accidentally, but I don't understand what causes it to break when I explicitly specify what partials are to be used for rendering the resource/s. Can anyone explain it? The index template for my Posts controller…
Reb
  • 649
  • 1
  • 8
  • 12