Search Results

Search found 4141 results on 166 pages for 'render'.

Page 33/166 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • How Can I Bypass the X-Frame-Options: SAMEORIGIN HTTP Header?

    - by Daniel Coffman
    I am developing a web page that needs to display, in an iframe, a report served by another company's SharePoint server. They are fine with this. The page we're trying to render in the iframe is giving us X-Frame-Options: SAMEORIGIN which causes the browser (at least IE8) to refuse to render the content in a frame. First, is this something they can control or is it something SharePoint just does by default? If I ask them to turn this off, could they even do it? Second, can I do something to tell the browser to ignore this http header and just render the frame?

    Read the article

  • Html.EditorFor, Html.DisplayFor not working on MVC1.0 -> MVC2.0 manual migration

    - by lawrence-chase
    Has anyone encountered this problem? I manually migrated a MVC1.0 application to MVC2.0 and everything so far seems to be working fine. Today I wanted to try out the Html.EditorFor helper and it doesn't render the template. I set it up the same way in a fresh MVC2.0 application and the template does render. Is there anything other (or specifically needed when mirgrating to activate this behavior) than throwing the partial view like DateTime.ascx into Views/Shared/EditorTemplates and using the helper methods to render the model objects? I'm stumped.

    Read the article

  • asp.net RenderControl and html

    - by kusanagi
    i use such code protected override void Render(System.Web.UI.HtmlTextWriter writer) { writer.AddAttribute("class", "dd0"); if (!String.IsNullOrEmpty(this.LiLeftMargin)) { writer.AddAttribute("style", string.Format("margin-left: {0}px", this.LiLeftMargin)); } writer.RenderBeginTag("li"); writer.AddAttribute("id", "dt1"); writer.RenderBeginTag("div"); writer.AddAttribute("class", "ddlink"); this.HyperLink.RenderControl(writer);//i wand that render html <b>name</b> writer.RenderEndTag(); writer.RenderEndTag(); } my HyperLink name contain html tags, like <b>name</b> but it render like this &lt;B&gt;name how can i make text bold (tagn not ekraned)

    Read the article

  • Spring Webflow: cannot get flow execution url at action phase of portlet

    - by tabdulin
    The following exception is thrown: Caused by: java.lang.IllegalStateException: A flow execution action URL can only be obtained in a RenderRequest using a RenderResponse at org.springframework.webflow.context.portlet.PortletExternalContext.getFlowExecutionUrl(PortletExternalContext.java:2 06) at org.springframework.webflow.engine.impl.RequestControlContextImpl.getFlowExecutionUrl(RequestControlContextImpl.java :178) at org.springframework.webflow.mvc.view.AbstractMvcView.render(AbstractMvcView.java:172) at org.springframework.webflow.engine.ViewState.render(ViewState.java:282) at org.springframework.webflow.engine.ViewState.refresh(ViewState.java:241) at org.springframework.webflow.engine.ViewState.resume(ViewState.java:219) at org.springframework.webflow.engine.Flow.resume(Flow.java:545) at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259) ... 62 more It seems for me like resuming execution of flow at action phase tries to do render phase's stuff. Any ideas?

    Read the article

  • Rendering formatted text in a direct3d application

    - by Fire Lancer
    I need to render some formatted text (colours, different font sizes, underlines, bold, etc) however I'm not sure how to go about doing it. D3DXFont only allows text of a single font/size/weight/colour/etc to be rendered at once, and I cant see a practical way to "combine" multiple calls to ID3DXFont::DrawText to do such things... I looked around and there doesn't seem to be any existing libraries that do these things, but I have no idea how to implement such a text renderer, and I couldn't even find any documentation on how such a text render would work, only rendering simple fixed width, ASCII bitmap fonts which looking at it is probably an entirely different approach that is only suitable for rendering simple blocks of text where Unicode is not important. If there's no direct3d font renders capable of doing this, is there any other renderers (eg for use in rendering rich text in a normal window), and would rendering those to a texture in RAM, then uploading that to the video card to render onto the back buffer yield reasonable performance?

    Read the article

  • c# gridview row click

    - by Martijn
    When i click on a row in my gridview, i want to go to a other page with the id i get from the database. In my RowCreated event i have the following line: e.Row.Attributes.Add("onClick", ClientScript.GetPostBackClientHyperlink(this.grdSearchResults, "Select$" + e.Row.RowIndex)); To prevent error messages i have this code: protected override void Render(HtmlTextWriter writer) { // .NET will refuse to accept "unknown" postbacks for security reasons. Because of this we have to register all possible callbacks // This must be done in Render, hence the override for (int i = 0; i < grdSearchResults.Rows.Count; i++) { Page.ClientScript.RegisterForEventValidation(new System.Web.UI.PostBackOptions(grdSearchResults, "Select$" + i.ToString())); } // Do the standard rendering stuff base.Render(writer); } My question is, how can i give a row a unique id (from the DB) and when i click the row, another page is opened (like clicking on a href) and that page can read the id. Thnx

    Read the article

  • What's the best method to be overloaded in ViewPage for inserting some script to all ViewPage?

    - by Soul_Master
    I want to insert some script that is required for my JavaScript library in all view pages. I know that Asp.net MVC is built on Asp.net Framework. Therefore, I can override many methods in “System.Web.UI.Page” class that is a parent of “System.Web.Mvc.ViewPage” class. Nevertheless, I can do it by override Render method but it makes all view pages be invalid for XHTML 1.0 strict. Correct JavaScript must be placed in header tag of HTML document. public class ViewPage<TModel> : ViewPage where TModel : class { protected override void Render(System.Web.UI.HtmlTextWriter writer) { base.Render(writer); writer.Write("<script type='text/javascript>applicationPath = window.applicationPath = 'somePath';</script>"); } } Thanks, PS. I know I can create some code in each master page for doing that. However, it is a quite complicate for other developers to start using my JavaScript source code.

    Read the article

  • ASP.NET CompositeControl with child controls that contain children

    - by tomfanning
    I am building an ASP.NET server control which extends CompositeControl. I need fine grained control over the rendering, so I override Render() and output the child controls myself, interspersed with HTML generation code: writer.AddStyleAttribute("float", "left"); writer.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div); writer.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Strong); writer.Write("Table"); writer.RenderEndTag(); // strong writer.WriteBreak(); tableList.RenderControl(writer); writer.RenderEndTag(); // div This works really well for user controls that just contain simple controls without children of their own. However, if I want to use something like a MultiView or an UpdatePanel I run into problems, since I can't override Render() on View or UpdatePanel without extending them, and if I do extend them the implementation would presumably have to depend on FindControl() voodoo to get references to the right controls during render. That doesn't sound like the right way to do this - is there a better way?

    Read the article

  • Django, making a page activate for a fixed time

    - by Hellnar
    Greetings I am hacking Django and trying to test something such as: Like woot.com , I want to sell "an item per day", so only one item will be available for that day (say the default www.mysite.com will be redirected to that item), Assume my urls for calling these items will be such: www.mysite.com/item/<number> my model for item: class Item(models.Model): item_name = models.CharField(max_length=30) price = models.FloatField() content = models.TextField() #keeps all the html content start_time = models.DateTimeField() end_time = models.DateTimeField() And my view for rendering this: def results(request, item_id): item = get_object_or_404(Item, pk=item_id) now = datetime.now() if item.start_time > now: #render and return some "not started yet" error templete elif item.end_time < now: #render and return some "item selling ended" error templete else: # render the real templete for selling this item What would be the efficient and clever model & templete for achieving this ?

    Read the article

  • PHP-GD: Dealing with Unicode characters

    - by sehugg
    I am developing a web service that renders characters using the PHP GD extension, using a user-selected TTF font. This works fine in ASCII-land, but there are a few problems: The string to be rendered comes in as UTF-8. I would like to limit the list of user-selectable fonts to be only those which can render the string properly, as some fonts only have glyphs for ASCII characters, ISO 8601, etc. In the case where some decorative characters are included, it would be fine to render the majority of characters in the selected font and render the decorative characters in Arial (or whatever font contains the extended glyphs). It does not seem like PHP-GD has support for querying the font metadata sufficiently to figure out if a character can be rendered in a given font. What is a good way to get font metrics into PHP? Is there a command-line utility that can dump in XML or other parsable format?

    Read the article

  • .Net 3.5 Chart Controls Exception

    - by ChrisHDog
    I am using the new free .net chart controls and they appear to work fine when I run the project up in visual studio, but when hitting the same via IIS I get and exception: [HttpException (0x80004005): No http handler was found for request type 'GET'] System.Web.HttpApplication.MapIntegratedHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig, Boolean convertNativeStaticFileModule) +529 System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +947 [HttpException (0x80004005): Error executing child request for ChartImg.axd.] System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +4120098 System.Web.UI.DataVisualization.Charting.ChartHttpHandler.EnsureInitialized(Boolean hardCheck) +266 System.Web.UI.DataVisualization.Charting.Chart.GetImageStorageMode() +25 System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer) +133 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Page.Render(HtmlTextWriter writer) +38 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240 Any idea what I'm doing wrong? Thanks!

    Read the article

  • Why use multiple OpenGL context

    - by Luca
    For rendering I have a current GL context, associated to a window. In the case the application render multiple scenes (for example using accumulation or different viewports) I think it is ok to reuse the same context. My question, indeed, is: why should I use multiple GL context? I red on ARB_framebuffer_object extension spec that MakeCurrent call could be expansive, and in the case the ARB_framebuffer_object extension is present I can render on a generic buffer without using MakeCurrent. Apparently the only reason to use multiple GL context is to avoid to setup context state (pixel store, transfer, point size, polygon stipple...) or to have avaialable multiple render buffers configuration (one context with accumulation, another without). How to determine when is better an alternative context instead of setting context state? Thankyou all!

    Read the article

  • Add JSON support to Rails app

    - by Meltemi
    I am experimenting with Rails and was wondering what's needed to allow/add support for JSON requests? I have a vanilla installation of Rails 2.3.5 and the default scaffolding seem to provide support for HTML & XML requests but not JSON. class EventsController < ApplicationController # GET /events # GET /events.xml def index @events = Event.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @events } end end # GET /events/1 # GET /events/1.xml def show @event = Event.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @event } end end ... I'm new to this but it would appear as though i would need to add a format line in each method along the lines of: format.js { render :js => @event.json } couldn't this be done automatically? perhaps there's a template somewhere i need to update...or a flag i can set? Or perhaps, and most likely, I've missed the boat entirely?!?

    Read the article

  • How to achieve a palette effect on iPhone using OpenGL

    - by Joe
    I'm porting a 2d retro game to iPhone that has the following properties: targets OpenGL ES 1.1 entire screen is filled with tiles (textured triangle strip tile textured using a single 256x256 RGBA texture image the texture is passed to OpenGL once at the start of the game only 4 displayed colours are used one of the displayed colours is black The original game flashed the screen when time starts to run out by toggling the black pixels to white using an indexed palette. What is the best (i.e. most efficient) way to achieve this in OpenGL ES 1.1? My thoughts so far: Generate an alternative texture with white instead of black pixels, and pass to OpenGL when the screen is flashing Render a white poly underneath the background and render the texture with alpha on to display it Try and render a poly on top with some blending that achieves the effect (not sure this is possible) I'm fairly new to OpenGL so I'm not sure what the performance drawbacks of each of these are, or if there's a better way of doing this.

    Read the article

  • How to customize flash message based on success or failure with Inherited Resources Rails plugin?

    - by wgpubs
    I'm using the inherited resources plugin in a 2.3.5 Rails application and was wondering how to change the flash[:notice] (or any other flash) based on the success OR failure in my create and update actions. So given the below, how do I add flash[:notice] = "All good" if success ... and flash[:notice] = "All bad" if failure? Thanks class ArticleController < InheritedResources::Base actions :show, :create, :update respond_to :html, :json before_filter :authorize_upsert, :only => [:create, :update] def create #init new game @article = Article.new set_article_attributes_from_app @article.is_published = params[:article_publish_to_web] || false @ article.game_source = @client_application create! do |success, failure| success.html {redirect_to(@article)} success.json {render :json => {:id=>@article.id, :created_at=>@article.created_at, :picture_urls=> @article.assets.map { |a| root_url.chop + a.photo.url}}} failure.html {render :action => "show"} failure.json {render :json=>@article.errors, :status => :unprocessable_entity} end end

    Read the article

  • Interpreting WPF Dependency properties as a set.

    - by moogs
    So, I have a control. It displays an image based some xml document and an optional parameter "Document" - XML document "RenderingOption" - optional image-rendering ( sharpen, soften ) So: <XMLRenderingWidget Document="xxxxxx"/> The above will render the document once <XMLRenderingWidget Document="xxxxxx" RenderingOption="Sharpen"/> The above will, sometimes render the document once, more oftentimes: Perform the rendering of the document as if no Rendering was set then, re-render the document with the Sharpen option I do the rendering on the PropertyChangedCallback assigned to the property. How do I tell the control to "hey, before doing the rendering, apply the changes on the other properties being set, too" Is this not possible? Should I bundle them up as one property instead?

    Read the article

  • How do I properly load the jQuery fullcalendar plugin in a hidden div

    - by Jens Alm
    I'm using the jQuery tools tabs to divide my page into tabs. One of those tabs contain a jQuery Fullcalendar. Because I load JavaScript last in the page for speed and to avoid flash of unstyled content, I hide the initially unseen tabs using display:none. When doing this, the fullcalendar doesn't render properly. It shows the proper buttons, but until I press the today-button, no calendar is shown. If I allow it to render into a visible div, it displays properly. I can work around this using the tab-select events to render the calendar or by moving the calendar and tab scripts to the head, but I'd rather if there was a more proper solution.

    Read the article

  • Ruby on Rails - f.error_messages not showing up

    - by Brian Roisentul
    Hi, I've read many posts about this issue but I never got this to work. My model looks like this: class Announcement < ActiveRecord::Base validates_presence_of :title, :description end My controller's create method(only its relevant part) looks like this: def create respond_to do |format| if @announcement.save flash[:notice] = 'Announcement was successfully created.' format.html { redirect_to(@announcement) } format.xml { render :xml => @announcement, :status => :created, :location => @announcement } else @announcement = Announcement.new @provinces = Province.all @types = AnnouncementType.all @categories = Tag.find_by_sql 'select * from tags where parent_id=0 order by name asc' @subcategories= '' format.html { render :action => "new" } #new_announcement_path format.xml { render :xml => @announcement.errors, :status => :unprocessable_entity } end end end My form looks like this: <% form_for(@announcement) do |f| %> <%= error_messages_for 'announcement' %> <!--I've also treid f.error_messages--> ... What am I doing wrong?

    Read the article

  • AJAX response inside jqplot not working

    - by JuanGesino
    I'm trying to render data from an AJAX response as a bar chart with jqplot. To render this bar chart I use two variables: s1 which contains the numbers ex: s1 = [22,67,32,89] ticks which contains the name corresponding to a number inside s1 ex: ticks = ["Jack", "Mary", "Paul", "John"] So my AJAX returns two variables, data1 and data2. When I console.log(data1) I get 22,67,32,89 When I console.log(data2) I get "Jack", "Mary", "Paul", "John" I then add the square brackets and change variable: s1 = [data1] ticks = [data2] When I console.log(s1) I get ["22,67,32,89"] When I console.log(ticks) I get "Jack", "Mary", "Paul", "John" And the graph does not render, this is my code: s1 = [data]; ticks = [data]; plot4 = $.jqplot('chartdiv4', [s1], { animate: !$.jqplot.use_excanvas, series:[{color:'#5FAB78'}], seriesDefaults:{ renderer:$.jqplot.BarRenderer, pointLabels: { show: true } }, axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, ticks: ticks }, yaxis:{min:0, max:100, label:'%',labelRenderer: $.jqplot.CanvasAxisLabelRenderer} }, highlighter: { show: false } }); });

    Read the article

  • Can 'locals' be used with 'collection' when rendering partials in Rails?

    - by Gav
    Everything works okay when I try to render a partial like this: = render :partial => "/shared/enquiry/car_type", :collection => @enquiry.available_car_types However, if I also want to pass a variable (in this case 'path', because I'm sharing this partial across two forms), the path is not available to me: = render :partial => "/shared/enquiry/car_type", :collection => @enquiry.available_car_types, :locals => {:path => customers_enquiry_path} I've tried moving things around, but nothing appears to work, leading me to believe one cannot use locals with collections. Any help would be appreciated. Gav

    Read the article

  • Can I have an XHTML document with an XML declaration in standards mode for IE6?

    - by user225643
    I've been reading about this for the last half hour, and here's what I understand: IE 6 will render a page in standards mode if there's a valid DTD, but not if there are any comments above the DTD. The XML declaration is a comment that goes above the DTD. If the XML declaration is wrapped in a conditional comment, the page will render in IE 6 in quirks mode but be invalid XHTML. Are there any workarounds to getting valid XHTML with an XML declaration to render in standards mode in IE6? If not, what are the disadvantages of removing the XML declaration entirely? Thanks.

    Read the article

  • Too Few Arguments

    - by NoahClark
    I am trying to get some Javascript working in my Rails app. I want to have my index page allow me to edit individual items on the index page, and then reload the index page upon edit. My index.html.erb page looks like: <div id="index"> <%= render 'index' %> </div> In my index.js.erb I have: $('#index').html("<%=j render 'index' %>"); and in my holders_controller: def edit holder = Holder.find(params[:id]) end def update @holder = Holder.find(params[:id]) if @holder.update_attributes(params[:holder]) format.html { redirect_to holders_path } #, flash[:success] = "holder updated") ## ^---Line 28 in error format.js else render 'edit' end end When I load the index page it is fine. As soon as click the edit button and it submits the form, I get the following: But if I go back and refresh the index page, the edits are saved. What am I doing wrong?

    Read the article

  • webgl adding projection doesnt display object

    - by dazed3confused
    I am having a look at web gl, and trying to render a cube, but I am having a problem when I try to add projection into the vertex shader. I have added an attribute, but when I use it to multiple the modelview and position, it stops displaying the cube. Im not sure why and was wondering if anyone could help? Ive tried looking at a few examples but just cant get this to work vertex shader attribute vec3 aVertexPosition; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; void main(void) { gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); //gl_Position = uMVMatrix * vec4(aVertexPosition, 1.0); } fragment shader #ifdef GL_ES precision highp float; // Not sure why this is required, need to google it #endif uniform vec4 uColor; void main() { gl_FragColor = uColor; } function init() { // Get a reference to our drawing surface canvas = document.getElementById("webglSurface"); gl = canvas.getContext("experimental-webgl"); /** Create our simple program **/ // Get our shaders var v = document.getElementById("vertexShader").firstChild.nodeValue; var f = document.getElementById("fragmentShader").firstChild.nodeValue; // Compile vertex shader var vs = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vs, v); gl.compileShader(vs); // Compile fragment shader var fs = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fs, f); gl.compileShader(fs); // Create program and attach shaders program = gl.createProgram(); gl.attachShader(program, vs); gl.attachShader(program, fs); gl.linkProgram(program); // Some debug code to check for shader compile errors and log them to console if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS)) console.log(gl.getShaderInfoLog(vs)); if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS)) console.log(gl.getShaderInfoLog(fs)); if (!gl.getProgramParameter(program, gl.LINK_STATUS)) console.log(gl.getProgramInfoLog(program)); /* Create some simple VBOs*/ // Vertices for a cube var vertices = new Float32Array([ -0.5, 0.5, 0.5, // 0 -0.5, -0.5, 0.5, // 1 0.5, 0.5, 0.5, // 2 0.5, -0.5, 0.5, // 3 -0.5, 0.5, -0.5, // 4 -0.5, -0.5, -0.5, // 5 -0.5, 0.5, -0.5, // 6 -0.5,-0.5, -0.5 // 7 ]); // Indices of the cube var indicies = new Int16Array([ 0, 1, 2, 1, 2, 3, // front 5, 4, 6, 5, 6, 7, // back 0, 1, 5, 0, 5, 4, // left 2, 3, 6, 6, 3, 7, // right 0, 4, 2, 4, 2, 6, // top 5, 3, 1, 5, 3, 7 // bottom ]); // create vertices object on the GPU vbo = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, vbo); gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW); // Create indicies object on th GPU ibo = gl.createBuffer(); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ibo); gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indicies, gl.STATIC_DRAW); gl.clearColor(0.0, 0.0, 0.0, 1.0); gl.enable(gl.DEPTH_TEST); // Render scene every 33 milliseconds setInterval(render, 33); } var mvMatrix = mat4.create(); var pMatrix = mat4.create(); function render() { // Set our viewport and clear it before we render gl.viewport(0, 0, canvas.width, canvas.height); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); gl.useProgram(program); // Bind appropriate VBOs gl.bindBuffer(gl.ARRAY_BUFFER, vbo); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, ibo); // Set the color for the fragment shader program.uColor = gl.getUniformLocation(program, "uColor"); gl.uniform4fv(program.uColor, [0.3, 0.3, 0.3, 1.0]); // // code.google.com/p/glmatrix/wiki/Usage program.uPMatrix = gl.getUniformLocation(program, "uPMatrix"); program.uMVMatrix = gl.getUniformLocation(program, "uMVMatrix"); mat4.perspective(45, gl.viewportWidth / gl.viewportHeight, 1.0, 10.0, pMatrix); mat4.identity(mvMatrix); mat4.translate(mvMatrix, [0.0, -0.25, -1.0]); gl.uniformMatrix4fv(program.uPMatrix, false, pMatrix); gl.uniformMatrix4fv(program.uMVMatrix, false, mvMatrix); // Set the position for the vertex shader program.aVertexPosition = gl.getAttribLocation(program, "aVertexPosition"); gl.enableVertexAttribArray(program.aVertexPosition); gl.vertexAttribPointer(program.aVertexPosition, 3, gl.FLOAT, false, 3*4, 0); // position // Render the Object gl.drawElements(gl.TRIANGLES, 36, gl.UNSIGNED_SHORT, 0); } Thanks in advance for any help

    Read the article

  • Undefined method 'total_entries' after upgrading Rails 2.2.2 to 2.3.5

    - by Trevor
    I am upgrading a Rails application from 2.2.2 to 2.3.5. The only remaining error is when I invoke total_entries for creating a jqgrid. Error: NoMethodError (undefined method `total_entries' for #<Array:0xbbe9ab0>) Code snippet: @route = Route.find( :all, :conditions => "id in (#{params[:id]})" ) { if params[:page].present? then paginate :page => params[:page], :per_page => params[:rows] order_by "#{params[:sidx]} #{params[:sord]}" end } respond_to do |format| format.html # show.html.erb format.xml { render :xml => @route } format.json { render :json => @route } format.jgrid { render :json => @route.to_jqgrid_json( [ :id, :name ], params[:page], params[:rows], @route.total_entries ) } end Any ideas? Thanks!

    Read the article

  • Passing markup into a Rails Partial

    - by 1ndivisible
    Is there any way of doing something equivilant to this: <%= render partial: 'shared/outer' do %> <%= render partial: 'shared/inner' %> <% end %> Resulting in <div class="outer"> <div class="inner"> </div> </div> Obviously there would need to be a way of marking up 'shared/outer.html.erb' to indicate where the passed in partial should be rendered: <div class="outer"> <% render Here %> </div>

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >