Displaying 20 results from an estimated 50000 matches similar to: "Rest, Roles, Layouts"
2006 Jul 07
4
Controllers - model vs. use case centric
I am working on a reasonably large application (which happens to be my
first with rails).
I was hoping to get some input on organisation of controllers and
actions.
I am finding having used scaffolding more at the beginning my
controllers tend to be very model centric, in that they mostly contain
all the actions for management of that particular model, which may crash
across multiple use
2006 Jan 11
6
RJS and layouts
Hi all,
I''ve been using RJS more and more for my app and I have sorta run into a
possible issue. My app has different user roles that require different
layouts. So far, this has worked fine, but now that I''m using rjs more
and more I''m finding that the two don''t really work together since I
have to rails not to use a layout upon controller method
2005 Dec 30
0
Newbie multiple controllers/layouts question
Hi all,
I''m playing around with Dave Thomas'' depot project, trying to add site
search, starting with code from the search_generator gem. I got basic
search working. Now I''m trying to understand how to integrate the search
result pages more fully into the overall application and I''m having
architectural "issues". search_generator creates its own
2006 Jul 21
7
Layouts
I am trying to set the layout for certain actions within a controller,
but not others, but doing
class JoinController < ApplicationController
layout ''form''
def index
end
def add
end
end
sets layouts for all actions, and doing
class JoinController < ApplicationController
def index
layout ''form''
end
def add
end
end
returns an
2006 May 15
1
1 controller, 2 layouts
I am having an issue with a controller that needs to utilize two
different layouts, depending on the action. The entire app makes use of
the application layout, so I added this to my controller to use for all
of our reports:
class ReportsController < ApplicationController
layout "reporter", :except => :index
I was hoping that the layout would only be applied to all the
2012 Oct 25
3
Restricting DC Roles?
I have a small AD forest of two Windows 2008 R2 domain controllers. I would
like to add a Samba 4 DC to this forest. After running into some problems
with group policies, I realized that Samba 4 does not currently implement
file replication. I would like to have the Samba 4 domain controller
replicate user/computer schema with the Windows machines, but I would like
for DNS and group policy
2006 Oct 28
5
Seperate admin and public views using one controller REST CRUD
Hello,
I want to seperate my admin and public views but only use one
controller. How to seperate layouts ist clear but how can I tell the
controller to render the *.rhtml files in views/admin/ when logged in or
render the *.rhtml files in views/public/ (for example).
Thanks for any help!
PS: using REST and CRUD in edge rails
--~--~---------~--~----~------------~-------~--~----~
You received
2013 Mar 08
0
FSMO Roles / DC Deletion Errors
Hi all-
I've been polishing my Samba4 AD set-up as we get close to deploying it the office. However, one thing that I'm having issues with is FSMO roles and DCs. The gist of the situation is that I can not demote the original DC. Both DCs are implemented with Samba4, running the same version (4.0.3) and have replication working*
Here is a summary of everything I've noticed:
?
2006 Jul 06
0
Layouts, Searching/Sorting
Two questions for you all...
1. I have an admin section to a site I''m building. Here''s the pertinent
bit of the layout that all controllers are using:
<div id="main-content">
<%= @content_for_layout %>
</div>
<div id="sidebar">
</div>
I''m using @content_for_layout to display various controller actions such
as new,
2009 Aug 29
2
Users, Roles and Permissions
Hello,
I''m currently working on a text-based roleplay browser game, and i''m trying
to figure out what the best approach would be in order to create a system
that allows me to assign roles to a user, and permissions based upon the
role a user has.
I''ve been thinking about creating a model User, which has_many :roles, and
with the Role model which has_many :permissions.
2006 Jul 18
4
Multiple Layouts - Single Controller
How do I do multiple layouts for a single controller:
I am aware I can do... render(:layout =>''mylayout'') for individual
actions, however this becomes a multiple render problem.
I tried this...
layout "mylayout", :except => [:myaction, :myotheraction]
layout "myotherlayout", :only => [:myaction, :myotheraction]
However that doesn''t
2008 May 27
1
Camping Technique -- Multiple Layouts
Hey Campers,
Here''s a little technique you can use to support multiple layouts within a
Camping app.
def layout
@layout ||= ''default''
send("#{@layout}_layout") { yield }
end
The minimum you have to do after this is define a *default_layout*, but (as
you can hopefully see) you may define any number of arbitrary layouts to
wrap your content in.
Just set
2006 Aug 09
2
layouts, stupid problem :P
hi! how can i put different layouts for the actions in the same
controller?
i was putting the layout always at the beginning of the controller, and
i tought, if i put a layout in an action, it would be work, but nop.
i mean:
UserAdminController < ApplicationController
layout ''admin''
...
def edit
layout ''edit_2''
...
end
end
how can i resolve my
2006 Mar 24
3
Changing sidebar in layout per controller
I am currently using 2 layouts in my site. One is for the admin area. I
am trying to get content in my sidebar to change depending upon the
current controller.
Example:
Within admin I have a users controller and a articles controller. When
in the users view I want the sidebar to display options (like add user
delete user etc).
What is the best actionview way to do this. I don''t
2006 Jul 22
3
How to use variables in your layout views?
Let''s say I wanted to find 3 products from my database and put them
in the layouts/application.rhtml view. Where do I find these 3
products? Do I just do it in application.rhtml?
<% for product in Product.find(:all, :limit => 3) %>
Because I was under the impression that you really don''t want to do
this in your views. You should do this in your controllers and
2006 Mar 29
1
View sharing between controllers?
Good evening all....
My first Rails project is flourishing, thanks in no small part to
good advice I received from members of this mailing list (thanks!).
However, I''ve run into an interesting spot on which I''d really
appreciate your advice.
My app''s main controller currently has about a dozen views,
presenting various information about the models. This
2010 Apr 16
0
Multiple production servers with different roles?
We''ve got an app dealing with a lot of heavy disk i/o (>1GB uploads,
lots of processing, etc.). Most of the app runs great on a few
frontend servers in a xen environment but disk i/o is always a
bottleneck, so we''re offloading all the heavy stuff to a physical
asset server.
The asset server would of course serve static files (per the
environment option already in Rails), but
2006 Jul 03
0
REST vs. render vs. redirect_to w.r.t. create error messages, efficiency and the desired URL
Hi,
Something has been bothering me for a long time and I''d like to know
what other think about this common situation with Rails.
Someone is looking at http://example.com/user/new where there is a
form that POSTs the data to the user/create action. The controller
might look like
def new
@user = User.new
end
def create
@user = User.new(params[:entry])
if @user.save
2006 Oct 16
0
Restful routes, not repeating yourself and non-standard rest actions best practices
So I''ve recently started playing with the restful routes support in
edge rails, converting a few of my controllers to support all the
standard operations.. One thing that''s been bothering me, however, is
the following:
Before using restul routes, I would define an edit method in my
controller which would be responsible for both creating new objects as
well as editing
2006 Jul 31
0
Rest and Mime Types
Been thinking about something lately and wanted to hear what others
thought. After watching the video[1] of DHH with the slides[2] I really
liked some of the ideas presented. Many people have noted the ugliness
of needing secondary actions since HTTP actions do not cover the full
range of CRUDness (i.e. the "GET /people;new" and "GET /people/1;edit").
Also the need for