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

Azure & My MVC 5 Web.Config

Everytime I do a commit and deploy(Publish) to Azure using MVC 4 or 5 in Visual Studio 2012 to my Azure Website which uses Azure SQL for my datasource (not sure what info is pertinent here). I get an Error when Visual Studio pulls up my website in…
Eric Bishard
  • 5,201
  • 7
  • 51
  • 75
0
votes
2 answers

Can you piggyback a data response to an Ajax partial rendering

I'm using ajax to update a partial, but i would like to get some data back from the server at the same time. $('<%=escape_javascript @my_params.to_json%>'); $("#partial").html('<%= escape_javascript(render partial: "view/partial" )%>'); gives me…
bobbdelsol
  • 996
  • 6
  • 21
0
votes
2 answers

Denying access to partial views with node.js/ express?

How would I go about denying access to a partial views with node.js/express? I have various different views in my single page web app and would like some pages to not be shown unless a user is logged in. How would I go about doing so? I know this…
user2615699
0
votes
0 answers

Rails Partials Refresh Javascript

I have a Rails view with 3 partials. In my index.html.erb I have the following javascript to refresh the page automatically via JS. index.html.erb
<%= render 'newstatus' %>
<%= render…
nulltek
  • 3,247
  • 9
  • 44
  • 94
0
votes
2 answers

Rails partials: Trouble finding where to put reference to new method in my partial

I'm fairly new to Rails and am trying to figure out how to add a method to the ActiveView class so I can then access a new method from the partials. Here's some sample code: %li =link_to "#{h aim_small.description.shorten} #{"(current aim)" if…
Alex Baranosky
  • 48,865
  • 44
  • 102
  • 150
0
votes
2 answers

How do I require a partial?

I'm fairly new to Rails and am trying to figure out how to add a method to the String class and have the code in my partial know that the String class has been added to. I'm not sure where I should put the require statement.
Alex Baranosky
  • 48,865
  • 44
  • 102
  • 150
0
votes
1 answer

Rails render template or partial but executing controller

I'm trying to show info into a dialog. I want such info to be loaded from a view (template). The thing is that, when i use <%= render template:'panels/product_specifications' %> it tries to load the info but, as i have global variables used in my…
JGutierrezC
  • 4,398
  • 5
  • 25
  • 42
0
votes
1 answer

Best Gruntjs Plugin for Compiling HTML Partials

I am just now getting into GruntJS, and LOVING it! I have my HTML code divided into a bunch of partials for header, navbar, footer, sidebar, etc. I use @includes to pull in the relevant partials for each page, and was using Codekit (Mac) to compile…
Michael Sheaver
  • 2,059
  • 5
  • 25
  • 38
0
votes
1 answer

Using a partial from another view while that model's routes are nested in the current view Rails 3

I've got two models/views, User and PersonalInfo and I'm trying to call the _form.html.erb partial in the 'user#show' action, but I'm getting an error: No route matches {:controller=>"personal_info"} I suspect the issue is that my PersonalInfo…
camkidman
  • 185
  • 1
  • 11
0
votes
1 answer

Force a form in a partial to put instead of post

I have a form in a partial. When the page loads the first time, it works fine. However, if the partial re-renders, then you submit the form, it tries to POST instead. I tried adding this line to force the PUT:
fatfrog
  • 2,118
  • 1
  • 23
  • 46
0
votes
0 answers

How can I give an empty array to Handlebars/Mustache partial?

I have a problem with partials in Handlebars.js. This is my template and a reuseable partial for it: Handlebars.registerPartial("children", "{{#child}}[{{age}}]{{/child}}"); var children = Handlebars.compile("{{name}} -> {{>children}}"); And here…
Laryllan
  • 41
  • 5
0
votes
1 answer

Using partials in App (How to set up Controllers properly?)

I would like to build an app (e-shop) where every block (partial) can be rendered separately (to serve these blocks with pAJAX), but at the same time, i want to get the whole page if it is requested directly. Let me explain it by example. e-shop…
0
votes
1 answer

Rails locals not defined in partial

I am sure I am missing something obvious, but I cannot figure it out. I have one partial that I am using in both the index and show views. The partial behaves as expected when called from the index, but throws a undefined variable or method…
akvallejos
  • 329
  • 5
  • 11
0
votes
1 answer

Consolidate multiple views into one view without coupling?

Let's say I have: object A, B, C each with corresponding models, views, and controllers How would you load them all into one view (site index)? You could use a partial of each model's index, but then methods of that particular controller don't get…
user117046
  • 577
  • 2
  • 5
  • 19
0
votes
1 answer

passing local variable to partial

This has been asked many times, but after trying all the solutions that I can find, I'm no closer towards a solution of my own. I have a partial, _form - here's the relevant part: <% @tournament.sub_tournaments.each do |sub| %> <%= f.fields_for…
dax
  • 10,779
  • 8
  • 51
  • 86