similar to: specifying partial layout with a block to render

Displaying 20 results from an estimated 70000 matches similar to: "specifying partial layout with a block to render"

2012 Aug 07
4
how to do render partial on jquery ajax success method with rails 3
I''m using rails 3.2.1 with jquery for an ajax call. My juqery code is : jQuery.ajax({ url: "/org_pages", data: ''org_id=''+ org_id, type: "POST", success: function(result){ jQuery("#image_center").html("<%= escape_javascript(render(:partial =>
2010 Oct 27
0
"Missing partial layouts/application" error on render :partial => "index", :layout => "application" - Rails3
This is the second time I have seen this error, and been googling around and cant find an explanation. This error is happening with Rails 3/1.9.2 and was not with Rails 2.3.8/1.8.7: *Template is missing Missing partial layouts/application with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths
2012 Jul 26
2
Using the :layout option when calling render @variable
Hey everybody, I wanted to use the :layout option when calling render @variable (where @variable is some ActiveRecord class instance with a corresponding variables/_variable.html.erb partial view), but as far as I know, Rails doesn''t support this. Here''s a quick patch that allows to use the :layout function: In partial_renderer.rb, add the following elsif block: if
2013 Mar 06
2
Refresh a partial onClick using ajax call in rails 3.x
Hi All, I want to refresh a partial onClick, onClick i am making ajax call and getting the data but i am unable to refresh the partial. here is the code IN views: home.html.erb $(document).ready(function() { var currentCellText; $(".inline").click(function() { currentCellText = $(this).text(); $.ajax({ type: ''GET'', dataType: "json",
2012 Jul 19
6
Rendering Partial
I am a bit confused when coming from layout and partials. To start of I have a file called application.html.erb which has my layout such has follow <html> <head> <body> <%= render ''layouts/footer'' %> </body </html> This call a new file _footer.html.erb This file his has follow <footer class="footer"> <nav> <%=
2006 Aug 11
0
Calling find method on partial render
I want to add a display of personal links to my users. Is there a way I can call a .find method when a partial is rendered? This is in my website''s template: <% if !session[:user_id].nil? %> <%= render :partial => "/layouts/personal_links" %> <% end %> The contents of the partial are: <ul id="user_links"> <li>My Links <ul
2006 Dec 30
0
[811] trunk/wxsugar/lib/wx_sugar/layout.rb: Yield the sizer rather than the underlying parent to an ''arrange'' block
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!-- #msg dl { border: 1px #006 solid; background: #369; padding:
2013 Jul 25
0
Reported timing aren't thread-safe, are they?
I was taking a look at the implementation for reporting the time spent on each part of an action processing. Rails, by default will report timing for the view and db (ActiveRecord). Both use class attributes for storing the timing (or accumulating them in the case of AR), which are shared among all threads. This is fine if you''re deploying using the fork approach, like done by
2006 Jul 19
3
render :partial inserting new line in RJS
Struggling a bit with rendering a partial in an RJS template. I''m having to feed the javascript directly to the page object as couldn''t find a way to have insert_html work directly on the proxy object returned by select. However, that''s not the problem. The code for doing that is below and it all works fine, except that a new line is being inserted after the
2006 Jul 13
6
Render partial questions
Hello, what is the preferred way to do this... I have 2 controllers. Each has an index action. Now I want to include the rendered index view from TwoController in the index view of OneController. But a render :partial doesn''t execute the TwoController index action which sets variables for its index view. So maybe you can give me a short example how to do it. Thank you Markus
2012 Sep 05
2
Partials and helpers
Hi, Is there any reason why helpers cannot render partials? I would like to do something like this in the layout: <body> <%= magic_header %> <%= yield %> </body> and then have a magic_header helper def magic_helper ...do some magic... render partial: "magic_helper" end Why is this wrong? Cumprimentos, Luís Ferreira -- You received this
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines : partial = render_to_string( :partial => "#{file}", :formats => [:html] ) to the pagination_partials function. ================================================= WORKING CODE: ================================================= def render_format_search_partial(file, options={}) # TODO remove this line to use the one
2006 Jan 04
4
HOWTO: Render partial in div
Hey- I''m using ROR 1.0 and script.aculo.us 1.5.1. I''ve been trying unsuccessfully to render a partial in a DIV, but can''t seem to get the right combination of stuff to make it work. There seems to be a few different ways of going about it. Right now I can render a partial. What do I need to to render the partial in a div? Here is what it looks like so far: #
2006 Mar 14
5
Best way to use partial rendering in global layout
I have a global layout in application.rhtml and I''d like to render a partial template within it. Currently, I have this: <%= render (:partial => ''side_nav'') %> but it seems to be looking in the controller specific view directory. What is the best way to do handle controller - global partial rendering? Wes -- Posted via http://www.ruby-forum.com/.
2012 Aug 13
2
Render collection of objects
Hello! I''m trying to render a template this way (below), but the object is nil at _category.html.erb file. index.html.erb <%= render @categories %> _category.html.erb <%=category.name %> error: undefined method `name'' for nil:NilClass With show.html.erb file it''s render. Thanks -- You received this message because you are subscribed to the
2006 Feb 05
6
render partial -- show certain content only if...
i''m working on a _post.rhtml partial, and it displays one blog post. i''m accessing this partial on the list.rhtml and the show.rhtml what i''d like is to only show the "link" link on the list.rhtml and not on the show page. <%= post.title%> <br /> <%= post.body%> <%= link_to
2013 Feb 19
3
Specifying multple nodes with mcollective-puppet-agent Host Filters
If I want to run Puppet agent only on two nodes out of ten, how can I specify this with the Host Filters? I tried mco puppet runall 10 -I node1,node2 and different other variations, but this does not work. Is this at all possible? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving
2008 May 15
4
render partial
hallo! momentan steht meine seite so, dass ich gewisse dinge mit link_to_remote auf bedarf nachlade. was mach ich jetzt, wenn javascript deaktiviert ist? kann ich das irgend wie mit render partial lösen? kann ich mit rails prüfen, ob javascript aktiviert/deaktiviert ist und dann dahingehend alle sachen sofort laden? hat da jemand ansätze/strategien/lösungen parat? danke! -- Posted via
2013 Nov 15
0
Please, take a look at PR #10848 "Allow to pass a block to `cattr_reader`."
Allow to pass a block to cattr_reader . cattr_accessor already accepts defaults using a block. So just unify the interface. Example: class A cattr_reader(:defr) { ''default_reader_value'' } end A.defr # => ''default_reader_value'' https://github.com/rails/rails/pull/10848 -- You received this message because you are subscribed to the Google Groups
2008 May 06
1
specifying output of render call
Hello again, First of all, thanks much for everyone''s input on my question last week about spec''ing an invocation of super. Here''s another question that seems resistant to my Google searching: With this helper method (defined in a module and included in Rails controllers): def render_rjs_redirect(url = ''/'') render :update do |page| page