ruby on rails - RoR: partials with resources -
I have a problem, with mini notation for resorts while attempting to present partly in Ruby in Railway . In some way, ROR does not show anything which is partially done, but I do not get any errors, I mean, as a result HTML is partly like a call that there will not be. I am also confused, because I can see in the log, the train sang in part 2 times (which would be fine, I have two test entries in Dev DB), but I did not get any output in the browser. What am I doing wrong? Thanks in advance! This is my code:
App / View / Tutorial / _tutorial.html.erb:
& lt; Div class = "tutorial" & gt; & Lt; H3 & gt; & Lt;% = link_to tutorial.title, Tutorial% & gt; & Lt; / H3 & gt; & Lt; Span class = "person" & gt; & Lt;% = h Tutorial Tutor% & gt; & Lt; / Span & gt; & Lt; Span class = "time" & gt; & Lt;% = h german_time (Tutorial. Starsts_at)% & gt; & Lt; / Span & gt; & Lt; Span class = "location" & gt; & Lt;% = h Tutorial Location% & gt; & Lt; / Span & gt; & Lt; Div class = "description" & gt; & Lt;% = hTutorial Decryption% & gt; & Lt; / Div & gt; & Lt;% If the administrator? & Gt%; & Lt;% = link_to 'edit', edit_tutorial_path (tutorial)%> | & Lt;% = link_to 'Delete', Tutorial ,: Confirmation = & gt; 'Are you sure?' ,: method = & gt; :% & Gt; Remove & lt;% end% & gt; & Lt; / Div & gt; & Lt ;! - the ending. Tatorium - & gt;
App / View / Tutorials / index.html.erb:
& lt; H2 & gt; Tutorial & lt; / H2 & gt; & Lt;% render: partial = & gt; @ Tutorial% & gt; & Lt;% If the administrator? & Gt%; & Lt;% = link_to 'New Tutorial', new_tutorial_path% & gt; & Lt;% end% & gt;
console log:
processing tutorial controller # index (for 127.0.0.1 2009-12-07 at 23:39:00) [GET] Tutorial Load (0.6 mms) Select from "Tutorial" Layout / Template by Template Template Presentation / Index Rendering Tutorial / _ Tutorial (7.1 m) Rated Tutorial / _ Tutorial (3.7 MMS) Complete in 22 MMS (View: 17) , DB: 1). 200 OK [http: // local host / tutorial]
Try it with equal :
& lt;% = render: partial = & gt; @ Tutorial% & gt;
Comments
Post a Comment