I return a form partial on a set of info like so...
Room1 Monday Tuesday Wednesday No. ppl
Blue Room $55 $55 $55 Select_tag (0-8)
Double Bed $100 $110 $200 Select_tag (0-8)
<% for room in @rooms %>
<tr>
<th scope="row" class="<%= cycle("spec", "specalt") -%>"><%=h roo...
I'm trying to use donut-caching on the Site.Master page for things like the User Login and Shopping Cart, so that we can put OutputCache on some of the more resource intensive pages in our app.
Currently, I'm using the tag and then writing out the html from the static method in the code behind.
<asp:Substitution ID="Substitutio...
When dealing with any framework with which you are not 100% familiar, I've found it advisable to attempt to understand and clean up any extraneous warnings, if only so that you have a better chance of noticing real errors when they occur.
The one I've been getting lately has been:
DEPRECATION WARNING: @model will not longer be implici...
This is probably very easy, but I'm having a hard time figuring it out.
I have a partial:
<% for room in @scrape %>
<tr id="page_<%= room.id %>">
<th scope="row" class="<%= cycle("spec", "specalt") -%>"><%=h room.name %></td>
<td class="<%=current_cycle%>"><%=h room.day1 %></td>
<td class="<%=current_cycle%>"><%=h room.da...
Hi,
I have very simple control:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ConfiguratorMVC.Models.SpecyficationController.ViewSpecyficationViewModel>" %>
<link type="text/css" rel="Stylesheet" href="/Content/shCore.css" />
<link type="text/css" rel="Stylesheet" href="/Content/shThemeDefault.css" />
<h2><%= Mod...
Are there any cases in which Rails overwrites controller instance variables on a render :partial call performed in a template? For example, let's say we have:
controller
def my_action
@widget = Widget.find(params[:id])
end
view my_action.html.erb
Hi there.
<%= render :partial => 'my_helper' %>
That's it, that's all.
view _my_he...
my problem is fprintf is only printing part of the expected output into the file.When i use printf the output is correctly printed on the output window, showing that the loop is correct but when i use it with fprintf the complete output is not printed.Only the initial part is printed.
PLease advise as to what might possibly be the pro...
I have an index view that I want to update automatically as the user types in a client id. I got something similiar to work (only it was updating just a label) - but this will not work.
What happens is the partial is just rendered by itself (not in place of the UpdateTargetID). So the data is rendered on a new page. Here is my code:
Co...
We're using a FileStreamResult to provide video data to a Silverlight MediaElement based video player:
public ActionResult Preview(Guid id) {
return new FileStreamResult(
Services.AssetStore.GetStream(id, ContentType.Preview),
"application/octet-stream");
}
Unfortunately, the Silverlight video player downloads the ...
I have a partial that I want rendered with a collection and another variable. Is it possible to pass more than one variable to a partial?
To illustrate:
Category HABTM Brands
This is just semi-pseudo-code, but I want to do something like:
<% @categories.each do |c| %>
<%= c.name %>
<%= render :partial => "mypartial", :collec...
Hi everybody.
I have a Controller called ActivationController with a LogOn action, which renders the view LogOn.aspx.
LogOn.aspx renders a partial view called LogOn.ascx:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="T...
I render a partial like so:
<%= render :partial => 'widgets/some_partial, :locals => {:foo => 'bar'} %>
So inside of _some_partial.html.erb I render two more partials like so:
<% #foo.nil? #=> false %>
<%= render :partial => 'widgets/another_partial', :locals => {:foo => foo} %>
`<%= render :partial => 'widgets/another_partial_again'...
I have called the partial file form the loop. now when i update , i do not actually get updated result but need to do refresh for getting updated result.
the code is like this :
the file1
@folders.each do |@folder|
= render :partial => 'folders/group_list'
the partial file
%div{:id => "group_list_#{@folder.id}"} // this is th...
I am using jQuery to do an ajax call to my controller, and everything is working perfectly, except I can't quite get the return value that I want.
Let's say I have a collection of items, and I have the partial:
/app/views/messages/_message.html.erb
I am trying to render it as a big string of text/html like so:
format.js { render_to_...
As a follow-up to this question: I need to decide in a class function like this:
template< typename T > bool Class::Fun <T*> ( T& variable ) {...}
whether T is a pointer or not.
In the question cited above the answer was to use partial template specialization. As far as I've found out this is not possible for class functions. Is this...
I have a bunch of data I want to instantiate in a class, and for each variable I want to ensure a specific set of methods are also defined. IE:
[TypeA] VarA
[TypeB] VarB
[TypeC] VarC
FA1() which is a function of VarA and VarB
FA2() which is a function of VarA and VarC
FB1() which is a function of VarB and VarA
FB2() which is a functio...
I have a small PHP script I wrote to help me push changes from staging to production. I run both staging and prod on the same server so my script copies changes from staging folders to prod folder.
This has been working fine until today when I had a few instances when files were only partially copied over resulting in some down time....
Hi,
In my Rails logging in functionality I use
session[:return_to] = request.request_uri
and then in the logging functionality I use:
redirect_to session[:return_to]
Which works fine except when I render a partial with AJAX. What happens is that the request.uri is for the AJAX request which screws up and doesn't render what's exp...
In a very recent questions I was having problems with this. My code was:
$("#SearchResults").load("/Invoice/InvoiceSearchResults/");
And I was advised to use this instead:
$.ajax({
url: "/Invoice/InvoiceSearchResults/",
type: 'GET',
dataType: 'html', // <-- to expect an html response
success: doSubmit...
Hi everyone,
I have a rails application that models a house. There is a house model that has many parameters and it has_many rooms. A room has a house_id and a name. I've also used http://github.com/ryanb/complex-form-examples to allow many lights and small_appliances to be added to room. complex-form-example uses RJS and partials to...