similar to: Info: _flash.html.erb partial a bad idea

Displaying 20 results from an estimated 30000 matches similar to: "Info: _flash.html.erb partial a bad idea"

2010 Jun 24
0
Rails3: render_to_string of a .html.erb when request is a json request raises MissingTemplate error
I''ve the following situation (which actually works in Rails 2.3.8 and this is a result of the migration of our app to rails3): I have a partial which is rendered a few times (imagine tr''s in a table). On the clientside there''s a script that does a json request for a specific row (jQuery + ajax dataType: ''json'' and type: ''POST'') In
2007 Jul 22
1
html.erb and textmate. Cant get snippets to work.
Hello! I moved to html.erb but the snippets fail to work. eg .rhtml lia(tab) gives me link_to .html.erb lia with a tab after it =) I have tried the comment suggested here: http://ryandaigle.com/articles/2007/2/21/what-s-new-in-edge-rails-rhtml-and-rxml-to-die-a-slow-and-painful-death David Demaree: " 1. Select Bundles > Bundle Editor > Edit Languages... from the menu bar. 2. Find
2010 May 28
1
problems with render in store.html.erb
Working on Agile web development with rails, 3rd edition. Every time I put <%= render(:partial => "cart" , :object => @cart) %> in store.html.erb, it makes a "</div>" disappear(well, it doesn''t show up when I check with firebug). When I take this piece of code out, the display returns to normal. I also tried moving it to the end of the page
2010 May 19
0
render html partial from atom builder
So I have an action that results in atom: def index ... respond_to do |format| ... format.atom { render :layout => false} end end Then I have a builder template to render the atom, called index.atom.builder. Inside this builder template, I''d like to render one of my existing html partials, to put in the atom:content element, perfectly normal atom thing to do.
2008 Apr 12
1
index.html.erb
Hi Everyone, A newbie question, I have my subdomain pointing to th respective app/views folder however the browser does not default to the index.html.erb , so instead I just have file listing. When I click on the index.html.erb it does work fine. What do I need to do to get it to work so it automatically load when a user goes to that view folder. Thanks in advance Using ROR 2.2 -- Posted
2007 Jun 03
3
.html.erb
Today I did some updates, rails, and gems update, the problem is that now, insted of .rhtml files I get html.erb, it looks that they work the same, but, I''m using radrails, and It''s not doing the color syntax is there anyway to fix this? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2012 Feb 15
0
How to indent .html.erb files in sublime text 2?
Hi all, I''m now using Sublime Text 2 and it''s pretty awesome The only problem is that it has no indent support for .html.erb file type, any one here using this editor can tell me how to solve this problem? Thank you -- Keep It Simple Stupid Twitter: @ghosTM55 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2010 Sep 15
5
Hide an image in show.html.erb
I have the following "show.html.erb" script, and I get as an output TWO images since I use a method to draw an image. How can I HIDE the RESOURCE image? Thanks. Here is the script: <canvas id="line" height="512" width="512"> </canvas> <p id="notice"><%= notice %></p> <p> <b> Name </b> <%=
2011 Aug 31
0
ERB and binding in template
How to get current binding in a partial (to use helpers and local variables in erb script)? When I invoke result whithout binding, = ERB.new("script").result.html_safe all work (without vars are needed), but when I write = ERB.new("script").result(binding).html_safe (in HAML HTML partial), THE PARTIAL''S REST OF OUTPUT IS CLEAR. What is the problem? -- Posted
2011 May 21
2
How do you create a sub-layout or a partial that wraps a lot of custom html?
Basically I''d like to create a layout inside of a layout using erb. Something like this: <%= render :partial => ''support'' do %> <div id="helpDocumentView"> <h3><%= @help_document.question %></h3> <%= @help_document.content %> <div id="helpDocumentHelpful" data-help-document-id="<%=
2007 May 10
1
dfs/dce and openssh
I searched google and did not find any hits on this being solved. I want to get ssh so I can the dsa/rsa style password it in an environment that uses dfs/dce authentication if that is possible (and it has not already been solved). In other words, I want to be able to log into a host as a dfs/dce user without typing my password. Before I dig into the code and trying to do this, I wanted
2007 Dec 30
0
Exception not caught while in view
I''m running Rails 2.0.2. My controller is subclassed from RetainController (which is subclassed from ApplicationController). Retain Controller has: rescue_from Retain::LogonFailed, :with => :logon_failed rescue_from Retain::FailedMarkedTrue, :with => :failed_marked_true It works if the exception occurs before I start processing the view. If I get the exception while in
2009 Mar 30
0
Trying to bind an appended partial that has REST_in_place attached to it with jquery?
In my create.js.erb view I am creating a new model in the view. On creation I want to have the appended partial in the dom and selectable so I can click it''s name and run the plugin REST in place with Jquery. #create.js.erb $("#new_show").before(''<div id="flash_notice"><%= escape_javascript (flash.delete(:notice)) %></div>'');
2011 Oct 12
4
How to access controller's instance variable in a js.erb loaded by javascript_include_tag?
Hello! In rails 3.1 app I have a controller UsersController with ''show'' action. show.html.erb contains: <% content_for(:head) do %> <%= javascript_include_tag ''myscript'' %> <% end %> <p>Hello @user.name</p> And I have this in myscript.js.erb $jQuery(document).ready(function() { alert(<%= @user.name %>); }); @user is being
2010 Aug 06
0
adding options to erb scaffold generator to include or skip custom views / templates
created a small patch.. looking for feedback / etc.. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5319-adding-options-to-erb-scaffold-generator-to-include-or-skip-custom-views-templates#ticket-5319-2 When I was working on customizing the erb scaffold generator to match the style and design I wanted to use by creating custom templates in / lib/templates/erb/scaffold I found
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
Problem: 1. ERB and Builder template engines are heavily wired in ActionView::Base 2. Should be optional. If we use different engine - why load all their stuff if not needed? 3. There are template engines which expect files in their own locations and cache them in their own way. For instance a template engine may store templates in a database. These engines don''t need any central source
2006 Feb 20
7
Native erb lacks -%>, where is Rails'' erb?
Native ERB in ruby, and eruby, seem to lack the -%> feature for suppressing trailing newlines. Thus erb -n script gives errors. Where is Rails ERB so I can invoke it directly? Thank you Hugh
2012 Nov 21
0
What to use //= require_tree or js,css incude tag in application.erb ?
Hi , We are using reqiure_tree in our application.js and application.css. As per i know require_tree include all js and css in application.js and application.css . We include application file of both .js and .css in our application.erb. Q . We include both .js and .css application file in application.erb . Is including in application.erb, did all .js and .css file are included in
2010 Aug 19
0
Camping 2.1 - ERB, Haml, 1.9, bug fixes, new website!
{} || || ~~~~~~~~~~~~~~~ <= _whycake ~ Camping 2.1 ~ ~~~~~~~~~~~~~~~ I''m pleased to announce another release of Camping, the microframework. This time we''ve focused on improving the 1.9 support, adding (builtin) support for more template engines, refreshing the homepage and just general bug fixes. gem install camping Home:
2007 Jan 19
4
Rendering with erb
Hi, I thought it would be fun to try to write a render method that uses erb for rending. I''m not much of a programmer, but I still like to try: module Test require ''erb'' def render(m) ERB.new(IO.read("templates/layout.html")).result(binding) do ERB.new(IO.read("templates/#{m}.html")).result(binding) end end end This