search for: layouts_and_rend

Displaying 6 results from an estimated 6 matches for "layouts_and_rend".

2009 Aug 06
13
Redirect after login
Hi, I''m new to Ruby/RoR so please bare with me! I''m trying to adapt a ruby setup where someone logs in to a bonjour service via a web browser. I have the login screen which asks for host and password. There is only one user per host and i can log in fine. It''s suppose to redirect me to /list in my browser but doesn''t. Once i''ve entered the correct
2010 Dec 25
6
undefined local variable or method?
I have: <%= form_for(@supplier) do |f| %> ....... ...... <%= render ''sector_categories'', :locals => {:f => f} %> in _sector_categories partial I have: <div class="field"> <div id="category_update"> <% for category in @categories %> <%= f.check_box :category_ids[], category.id,
2010 Jan 24
1
how to build a welcome page?
I am describing what I am trying to accomplish: I want to create a main welcome page. So I ran script/generate admin/welcome. This created welcome controller Then I wanted to attach this welcome controller to the main application.html.erb In the application.html.erb file I want to show a ‘login’ control and two action buttons: ‘suppliers’ and ‘contractors’. This means somehow I have to create
2010 Jul 12
1
newbie: what is preferred approach for including javascript files?
Hi, What is the cost of not cacheing javascript? If that cost is serious, do I prefer to selectively include javascript files only for view where they are needed? In other words I see four options: 1) Cache everything in layouts/application.html.erb and don''t worry about selective inclusion of .js files where they are needed; 2) cache some things in (e.g., dependencies like jquery) and
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="<%=
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All, just in a spot of bother with this gem, I am trying to create a new location and get the above msg. here is my controller: class LocationsController < ApplicationController # GET /locations # GET /locations.json def index @locations = Location.all @json = Location.all.to_gmaps4rails end respond_to do |format| format.html # index.html.erb