similar to: Comment syntax and strange partial rendering

Displaying 20 results from an estimated 30000 matches similar to: "Comment syntax and strange partial rendering"

2010 Oct 19
33
Render partial generate unwanted spaces
Hello, I have a problem with the render :partial method in all my rails webapplications. I noticed that using render :partial will generate spaces (mainly top spaces) on the elements inserted. As all my websites are seperated by module (basicaly header, content, menu, footer) it''s quite a problem as I have to set negative margin- top to various parts for the site to display as expected
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
I''ve tried out ''acts_as_taggable'', ''acts_as_taggable_on'' and ''acts_as_taggable_on_steroids'' and all of them output "undefined method ''empty?''" with the tag_cloud action. I am following the guides precisely. Yet I can find no references to this error anywhere, so I must be doing something wrong... I am on
2010 Sep 18
11
Commenting in an ERB without generating a compiling error
Hello, I have the following: <% @projects.each do |project| %> <tr> . <td><%= link_to ''Destroy'', project, :confirm => ''Are you sure?'', :method => :delete %></td> . </tr> <% end %> How can I safely comment out the TD line above? Do I have to use the =begin way? -- You received this message because you
2010 Sep 07
2
Help on formatting some HAML
I wondered if anyone could help me with turning the following in ERB into HAML. I''m VERY new with HAML: ---- <div class="block-element span-7 colborder"> <span class="rightside blue-hue no_decor"><%= link_to "New Order", new_order_path, :remote => true %></span> <h3>Today''s Activity</h3> <hr>
2009 May 07
12
is there simpler way to export html within xml
Hi, we''re exporting a lot of html code within xml, our current method works but it''s very messy - far from perfect, is there a better way to do this. an example of our controller code is html = html + "&lt;img src=&quot;/icon/icon_email.gif&quot;
2010 Jul 19
16
Strange Error undefined method `show' for # see no way to debug, suggestions?
I changed fairly much in my app without constant testing ( my bad ) now i get an error which I cannot seem to debug point my finger on. I have a home controller which just displays a welcome page this had a index only action. Whatever controller I try to open i always get above error message ActionView::TemplateError (undefined method `show'' for
2011 Jan 20
4
Comment.all returns array of what?
I have a bad feeling asking this but I did not manage to find an answer myself :/ @comments = Comment.all @comments is an array. I can for example access comment.created_at directly, or I could do: <% @comments.each do |comment| %> <%= debug comment["created_at"] %> <% end %> I expected comment to be a hash, but comment.keys or comment.values fail, as well as an
2010 Mar 09
3
undefined method join for STRING error
Hey all, I was converting a haml file to erb and when finished, I ran the app and got this error message: NoMethodError in Students#student_fail Showing app/views/students/student_fail.erb where line #40 raised: undefined method `join'' for #<String:0x105a5e0c8> Extracted source (around line #40): 37: 38: <% fields << render(:partial =>
2010 Apr 14
35
Conditionally adding a link to a form -- how?
I''ve got two entities created by scaffolding: Expense & Vendor In Expense#new there''s a form with a Vendors-drop-down and a NewVendor- button. The latter button brings up Vendor#new. The Create button in Vendor#new brings up Vendor#show with Edit & Back links. I want to append a third link conditionally to Vendor#show: if the Expense#new form led to the Vendor#show
2011 Feb 17
16
Unindent ERB output
Hi all, I''d like to unindent a block of ERB specifically to combat the extra spacing being added to content inside <textarea> by the browser. Is there such a feature in ERB? I shall denote indentation with underscores in the pseudo code example below. Thanks in advance, Khoan. myview.erb: <html ...> __<%= render ''form'' %> </html>
2010 Oct 06
7
Passing a hash from the model to the view
I''m trying to display a drop-down menu by using an instance variable from a model. THIS WORKS... <div class="field"> <%= f.label :duration %><br /> <%= f.select ("duration", {"30 minutes" => "30", "1 hour" => "60"}, :prompt => "Select") %> </div> THIS DOESN''T
2011 Jan 13
2
razor view engine
Folks, hi! I''m on the way from asp.net to rails. But I can''t find pretty cool view engine for rails like razor for asp.net http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx Can anyone suggest me something like that before i''ve started razor for rails on github? :) -- You received this message because you are subscribed to the Google Groups
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> <%=
2010 May 25
1
Where to start debugging
Hi, I''ve adopted a project that uses some rails features I''m not quite used to yet. (ie merb, haml) There is a snippet below. I''m not even sure what other part of the code to include to help with this. I''m open to suggestions :) $ merb ... ... ... ~ Compiling routes... app/views/stretches/show.html.haml:87:in `send'': compile error (SyntaxError)
2011 Jan 11
9
Can I omit respond_with.
If I don''t want xml results but only html can I omit respond_with in some actions? For example index from: respond_with(@sectors = Sector.all) becomes only @sectors = Sector.all isn''t it? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2011 Jan 15
3
respond_with javascript
My ajax stopped working when I switched to using respond_with. For my Votes, I have the create action and the corresponding create.js.erb, and respond_to :html, :js, :xml in the controller. Heres the log when I try and create a vote: Started POST "/stories/3-asdfasdf1111/votes" for 127.0.0.1 at Fri Jan 14 20:46:36 -0800 2011 Processing by VotesController#create as */* Parameters:
2010 Jan 18
7
Ruby Array to Java Script Array
Hi, How can we use an array created in Ruby in Java script ? Regards, Prashant -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2011 Jan 05
16
Nicedit (rich text editor)
Hello, I''m trying to use Nicedit to improve my text_areas in some views of my project. I have installed jquery: ruby script/plugin install git://github.com/aaronchi/jrails.git nicEdit plugin: ruby script/plugin install git://github.com/sergio-fry/Simple-nicEdit.git Add js in layout: <%= javascript_include_tag ''nicEdit'', ''nicEditInit'' %> Use it
2011 Oct 29
2
comments on HAML ?
I have been asked a couple of times at job interviews if I am familiar with HAML or Liquid so I was wondering if maybe I should start using them and perhaps it would make the views easier to work with. If I install HAML on a machine where my app is that has alot of regular HTML in the .erb views already, will it still work with those or do I need to convert everything to HAML ? Can I have some
2009 Dec 23
8
Where did this value in a form come from?
Newb here. I have a form and a value that is being displayed ... and I have no idea where the value came from. I have done a <%= debugger; '''' %> in the form and, indeed, the debugger stops at the statement. I have tried to trace through the code to see where the value came from ... and I gave up. So ... what in Rails initializes the fields of a form? -- Posted via