Displaying 20 results from an estimated 100000 matches similar to: "Find or create RESTfully"
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
2007 Oct 18
0
REST help
Hi all,
I am trying to build a RESTful shopping cart and I have hit a small
wall, but before I get to that let me explain what I have done thus far.
I have two RESTful controllers, CartController and CartItemsController
with a nested routes setup like so
map.resources :carts do |carts|
carts.resources :cart_items, :collection => {:empty => :delete}
end
(I added a custom route to
2007 Feb 05
0
How do I use a RESTful helper with path_prefix?
Once upon a time I had this in my routes.rb:
map.client_home '':client/'', :controller => ''orders'', :action =>
''new''
All orders must be scoped within a client name, so this worked quite
well. I used a before_filter to scoop up the @client object by doing
a find_by_name.
Then I decided to expose the OrderController as a fully restful
2008 Aug 25
1
Error message when installing restful_authentication from github
Anybody know if I''m doing something stupidly wrong here?
$ script/plugin install git://github.com/technoweenie/restful-authentication.git
removing: /Users/jcohen/dev/rest_with_rails/theater_login/vendor/
plugins/restful-authentication/.git
Initialized empty Git repository in /Users/jcohen/dev/rest_with_rails/
theater_login/vendor/plugins/restful-authentication/.git/
remote: Counting
2007 Sep 22
4
ActiveResource, find(1) works but no find(:all)
Hi,
I''m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error
[1]. Fuser is declared here [2]. Do you know what''s happening? Thanks.
[1]
ActiveResource::ServerError: Failed with 500 Internal Server Error
from
/.../vendor/rails/activeresource/lib/active_resource/connection.rb:124:in
`handle_response''
from
2008 Oct 28
1
Old Rails app: can't find file_column gem?
Hi all
I''m trying to get some old Rails app to work. But when trying to start
it, I get the following error:
josh$ script/server
=> Booting WEBrick...
./script/../config/../config/environment.rb:5: warning: already
initialized constant RAILS_ENV
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'': no such file to load -- file_column
2007 Nov 05
3
Private API in REST
In a app RESTful, all api''s are public. How to leave a private API?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe
2007 Feb 08
1
undefined method `find' for Status:Class
Hi,
I have attempted to install radiant on my server using mongrel. I have
it working fine using lighttpd on my development box, but as soon as i
attempt to run it using mongrel I get the following error:
NoMethodError (undefined method `find'' for Status:Class):
/app/models/page.rb:49:in `status''
/app/models/page.rb:57:in `published?''
2009 Feb 21
2
ArgumentError on model create statement
I have a rails app model that I''m getting a strange error that is just
baffling me. I''ve stripped everything out of my model down to the
basics and still get the error.
So, here is the current model:
class Metric < ActiveRecord::Base
end
When I go into the console, and issue a simple "Metric.create" command I
get the following error:
>> Metric.create
2006 Sep 18
2
Datebocks and EdgeRails
Hello,
I am having trouble trying to use the Datebooks Engine with Edge Rails.
Has anybody try with it?
It seems that the problem has something with loading the layout, and
complaints about the number of arguments.
I will thank any help or guide.
Thank you very much.
=========================
I have copied the error I get
ArgumentError
wrong number of arguments (2 for 1)
RAILS_ROOT:
2007 Feb 05
2
Restful table column sorting with pagination
Anyone able to implement table column sorting and pagination with
Restful routes?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2008 Aug 27
6
Restful routes
Hi, I''m pretty new to the concept of restful routing and am struggling
to find any rails 2 info that helps with what I''m looking for.
I have a regular scaffold setup and the routes are setup as default
map.resources :pages
I would like to be able to use titles in the url rather than relying on
the id.
Eg
localhost:3000/pages/sometitle
instead of just
localhost:3000/pages/1
2008 Nov 05
1
Removed edge rails but cannot find installed rails
I removed edge-rails from a project, git rm, committed and pushed the
revised project to the shared repository, and then git pulled it onto my
Windows XPpro laptop.
Both the original host and my laptop have Rails-2.2.0RC1 installed. The
Gem environment is:
$ rails --version
Rails 2.2.0
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.7 (2008-08-11 patchlevel
2008 Aug 01
2
REST error
Hi i given in routes.rb as
map.resources :students, :member => [:departments => :get]
and rhtml i given link
<td><%=link_to "Departments", departments_student_url(student)
%></td>
in students controller
def departments
@student= Student.find params[:id]
# @departments = @student.departments
end
when i click the departments link it showing error like
2008 Sep 12
1
restful_authentication rspec failures "Mysql::Error: Incorrect datetime value:"
I am getting 193 failures that all have "Mysql::Error: Incorrect
datetime value:"
how do i fix this??? i am new to rspec and restful_auth, so if i am
doing something wrong, let me know!!!
windows xp
rails 2.1.1
rails testproject
cd testproject
# create my databases and edit database.yml
git init
git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/
rspec
git
2008 Dec 22
2
is there an activerecord method like "FIND EXISTING OR CREATE NEW IF NONE FOUND"?
Just wondering if rails has a method to look for an existing record and
return it, but if it''s not existing then create a new record. (i.e. "FIND
EXISTING OR CREATE NEW IF NONE FOUND"?)
Then when finished updating one could use the existing "save" method which
caters for either a new or updated record already
Thanks
2007 Aug 22
1
ActiveResource find method and restful controllers.
Hi,
What''s the best way to add support for the activeresource find method
in the controllers in my rails app?
As I understand it when you invoke something like:
Person.find(:all, :params => {:name = ''toby''})
this generates a request of:
GET /people.xml?name=toby
Does this mean that in my index method in PeopleController in my rails
app I have params[name] set to
2007 Feb 24
2
RESTful PUT and button_to
I''m working on a RESTful app, and I''ve hit a snag. Here''s a
simplified example of the problem. (Excuse me if this example code
isn''t strictly correct; I''m typing from memory.)
Suppose I have a table which models a simple counter. It has a single
column, "count":
class CreateCounters < ActiveRecord::Migration
def self.up
2009 Mar 08
2
RESTful nested resources and polymorphism?
With ref to my previous post: http://www.ruby-forum.com/topic/180356
I am now able to access items from topics controller. However, now I
need to add sub-item e.g.: An item itself could have many sub-items. So
my items model is like:
class Item < ActiveRecord::Base
validates_uniqueness_of :title, :scope => [:topic_id]
validates_presence_of :topic_id, :title, :owner, :position
2007 Dec 13
4
Attachment_fu problems on updates
On the creation of a member the member''s picture uploads as it should.
However, when updating the member, while selecting a new picture, an
error is thrown:
can''t convert nil into String
RAILS_ROOT: /Users/chris/Documents/Projects/Rails/CommunityCMS/trunk
Application Trace | Framework Trace | Full Trace