Displaying 20 results from an estimated 9000 matches similar to: "Can we have have protected methods in our REST controllers?"
2006 Jul 12
6
So what is REST? I don''t get how it fits in Rails
Does someone have an actual example of this? I saw DHH''s slides where
he said that you could have your app automatically respond with HTML,
XML, atom, whatever. So far I''ve found tons of discussion on REST and
CRUD in Rails, but I haven''t seen anything that actually shows me what
it all is. There''s simply_restful, which apparently makes things
easier...I
2006 Aug 14
1
Testing CRUD/Rest Controllers
I have a few simple controllers doing plain, simple crud in a standard way.
now it''s not very DRY to write a funtcional test for each controller, since
they are all doing the same (apart from a few variable names, but that could
be easily inflected or so).
is there a way to do this?
e.g. does inheritance work with tests, so i define a base test first,
inherit my other tests and add a few
2006 Nov 04
0
How do CRUD and REST work for a wizard-style application?
I''m rewriting an application with the intention to use the elegant
CRUD and REST design principles as outlined by DHH in his RailsConf
Keynote[1].
The question is: how do you use those principles for an application
that is of a sequential nature?
The application works much like an MS Windows wizard: user begins at
screen foo. After doing (or not) some stuff in screen foo, he is taken
to
2006 Sep 14
4
AWDWR 2nd edition and REST
Question, and I''ll preface it by asking if this is the right list to
be posting questions regarding anything past Rails 1.1.6 , (i.e.
edgerails) ?
In the latest revision of AWDWR there is a sample REST based app.
During the creation of the controller and actions, there is a foot
note that says:
"7. By the time you''re reading this, there may well be support build
into Rails
2006 Jan 08
9
URL/Site structure
Greetings,
I''m fairly noob with rails and making my first DB driven site with it.
I''m using the scaffold generator to develop the admin side of my site
(admin_controller)
I have three sections that I want to have the administrator edit, and I
want to call these from the admin controller that has a layout with
navigation to these three sections.
When using the scaffold
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all
We all know the model-controller-paradigm: I have a model "News" which
has a corresponding CRUD-controller "NewsController".
But now I''m quite unsure about the following...
Guess we have normal visitors that visit our site www.??.com/news and we
have administrators that create and modify news items.
The admin should see an "Edit" link and a
2006 Jan 30
14
RoR admin system
I''m preety new at RoR (and programming), I tried a few tutorials, and
really like the RoR simplicity, but my knowledge of the framework still
isn''t very good (to be true, i understand the basics, but not everything
that''s in the tutorials).
But still I''d like to create a website which has:
- front end interface (with no edit functions)
- admin interface
2007 May 22
2
Refactoring controllers vs. actions
I just completed an exercise of breaking down an existing project and
mapping out the controllers and actions, then re-factoring them into
some perhaps more RESTful. Though I could be wrong since I am still
grasping REST.
Most of the controllers mapped perfectly into a REST structure, except
for a few.
I have Messages, which can respond to all the usual actions, plus a few
more. The extras are
2010 Jul 02
6
making something available application wide
I''d like to display a banner on every page. Ultimately I''ll be tweaking
which banner is displayed via different controllers but initially I''d
just like to set a single banner application wide and display it in my
"_header", a partial I include in all layouts.
I''ve got a BannerAdvert model, simple. If I''m in my welcome controller
index action
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
2008 Mar 03
3
Admin and standard controllers RESTFully
Hello. I will appreciate the opinion.
What is the standard way of separating admin functions from normal-
user functions?
before_filter in one controller?
Use two controllers, i.e. ProductController and Admin/
ProductController?
I want to use map.resources so RESTFul would be better.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to
2006 Aug 04
4
REST
I''ve been looking into RESTful approaches lately. Everything I know
my dog, Lelu, taught me.
REST (REpresentational State Transfer) is an architectural technique
for networked applications first described by Roy Fielding in his
dissertation at UC Irvine-- excellent work, especially considering
the tempting proximity of Newport Beach. As Lelu described it to me,
REST strives
2006 Jul 26
5
Restricting before_filter to certain actions?
Can you restric before_filter to specific actions?
--
Posted via http://www.ruby-forum.com/.
2006 May 02
4
Alternatives to components?
I''m about to start work on sidebars for my app, but I''ve heard a number
of people express doubts about them as the way to go (they are slow &
apparently DHH regretted coming up with them components). What other
solutions are people using for this type of need (i.e.needing to call an
action/view combo from within a view)?
2006 Jun 28
0
ActiveResource (was: 1.1.3 available.)
2006/6/28, Paul Barry <mail@paulbarry.com>:
> Where can I find info about the "CRUD/resource-based features" that will be
> in 1.2.0?
In blogs. Especially about Railsconf and DHH''s keynotes.
In trunk : http://dev.rubyonrails.org/browser/trunk/activeresource
In DHH slides :
Transcription of some slides from DHH''s talk at RubyKaigi 2006
(I suppose it must
2009 Jan 15
3
Unique URLs for authentication
I''ve set up a route like this
map.connect ''confirm/:id/:full_name/'', :controller => "users", :action
=> "confirm"
and I''m wondering what is the best way to verify in the confirm method.
full_name created in the model and it''s not in the database.
This doesn''t work because it doesn''t parse one, then the
2006 Jul 21
2
New Generator: hasmanythrough
To the aide of anyone whose had to create new models, migrations and
unit tests for the common many-to-many relationship, using "has_many
:through" (that''s almost everyone).
I''ve created a new generator that generates two model classes, plus a
many-to-many relationship class, e.g. User, Group, plus the Membership
model between them. It also generates the migrations
2007 Jun 30
2
REST Route how to avoid hacking routes
what''s the best protection against someone trying to modify an URL in a
named route
/users/25/posts
if the user enter another URL /users/26/posts, he can get acces to user
26 posts unless ..
a before_filter is checking the current_user ID
but is there any other way to do it ?
thanks for your lights
kad
--
Posted via http://www.ruby-forum.com/.
2006 Jul 04
0
Multiple and nested controllers or routing
Hi,
I''m new to Ruby and Rails and I''m making a simple application to help me
learn how to use it. At the moment I have an admin controller. When the user
goes here I want them to be presented with 3 choices: manage photos, news
and pages. From there I want them to be able to CRUD each type.
At the moment in the admin controller I''ve defined actions "photo",
2006 Aug 03
1
strange before_filter error. is this a bug i have found?
...
before_filter :find_regression_test
def find_regression_test
@regression_test=RegressionTest.find(8)
end
....
The above seems like perfectly normal before_filter syntax, but it gives
this error. Aldo is no application trace, just a framework trace:
Any idea what is wrong?
NoMethodError in Regression testsController#modify_regression_test
private method `equal?''