Displaying 20 results from an estimated 3000 matches similar to: "Seperate admin and public views using one controller REST CRUD"
2007 Oct 28
2
failing test with nested controller routes
I have googled and browsed through spec-users archives, but didn''t
find anything different.
I used rspec scaffold command to generate a mvc for groups, I used
nested controller so I could have a separate interface for admin.
the specs are the same as generated, so I won''t post the whole thing.
I did put the nested routes names on the calls to the name routes:
it
2007 Sep 04
7
1.05 to 1.08
Hi
We are looking at moving a project over from 1.05 to 1.08 but have a
problem with some of our helper specs
They work fine in 1.05 but error in 1.08 and it is the calls to route
helper methods that seems to be the problem.
I did some playing around .. because the code being tested is
reasonably large etc ... but this sample (using the peepcode app)
seems to boil down the problem
2008 Mar 15
4
* Please help a RoR Newbie!!*
Hi Everyone!
I''ve only just started with Ruby so am a touch lost.
THis morning i downloaded the quick win (locomotive) and, once i swith
that on, I can view the Ruby start page at localhost:3000
My problem is, I''m not that great with finding my way round terminal. I
can do basic cd .. etc to view files, but am VERY LOST!! :-)
the Ruby page says:
#
Create your databases and
2008 Jan 27
4
Rails versions and documentation, confused learning rails
Okay, I am new to rails. I see that the new release of rails does not apply
to anything on the site with regards to tutorials including screencasts.
What I don''t understand is how I am suppose to learn Rails 2.0 if there is
no docmentation for it. I did see that on peepcode there is a pdf for what
has changed but how does that help me?
How do I get an understanding of the design
2008 Oct 14
4
replace_html not working
hallo, everyone
can anybody help me? i did add my code under ENGINES as a module in a
project. before the change , all worked . and the differenz between
both is only about application''s environment,
before is
Ruby version 1.8.6 (i486-linux)
RubyGems version 1.1.1
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
2007 Feb 07
3
Upgrade to Rails 1.2.2 : RESTful routes not working anymore
Hello,
I just upgraded my app to Rails 1.2.2.
My routes are :
map.with_options :path_prefix => "/admin", :name_prefix => "admin_" do |m|
m.resources :requests, :controller => "admin/requests", :collection => {
:destroy => :delete, :search => :post } do |request|
request.resources :histories, :path_prefix =>
2006 Oct 12
7
Evil Scaffold
I read the Amy Hoy''s presentation on why scaffold is not a good thing for beginners. For admin
application, is it ok to use scaffold?
--~--~---------~--~----~------------~-------~--~----~
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
2007 Nov 02
5
RSpec, RESTful nested routes and :path_prefix
Dear list,
In the app we are making we have a rout something like this:
map.resources :projects do |projects|
projects.resources :pages, :controller
=>"Wiki::Pages", :path_prefix => "/projects/:project_id/
wiki", :name_prefix => "project_wiki_"
end
But I can''t get RSpec(I''m very new to it) to accept this. It keeps
throwing errors:
2008 Jan 21
7
undefined method error
Hello everyone,
I am following the Practical Rails: Social Networking
sites book. In chapter 7 photo gallery I am getting a
NoMethodError in Pages#show
Showing layouts/_menu.rhtml where line #12 raised:
undefined method `new_entry_path'' for #<ActionView::Base:0x52fa56c>
Extracted source (around line #12):
9: <% if is_logged_in? %>
10:
2006 Aug 14
1
Rest, routes, path_prefix and default params
I am trying to use routes with default params to have routes
''/mycompany/departments''
and
''/companies/1/departments''
mean the same thing (both restful routes).
When I set up the files as below, I get an error of
''Couldn''t find Company without an ID''
and my log file shows the following ..
Processing DepartmentsController#index (for
2006 Aug 02
1
Use Non CRUD with Simply RESTful
Hey guys,
I''m trying out the new RESTful bits in Edge Rails, and am having a bit
of trouble wrapping my brain around certain things. For instance, say I
have a page that is separated into sections with tabs at the top. I want
to replace divs on the page with RJS.
Now typically before I''d have a method on the controller that rendered
an RJS template to accomplish this.
2006 Aug 30
6
REST on rails
Hi,
I just heard about REST capabilities of rails 1.1. Does anyone know a
good tutorial, or good article to begin with?
Thank you
--
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
2006 Dec 17
2
Route generation and clash prevention
Let''s say you''re building a movie rental website. You have customers,
movies, and rentals to manage. REST style urls might look like this:
/customers/4
/movies/15
/rentals
You''d probably also want administrators to be able to view all of the
rentals done by a particular customer, and other similar details:
/customers/4/rentals
/movies/15/rentals
/rentals/529/customers
2006 Jul 27
0
Using CRUD + non-standard URLs
Hi,
Please take a look at this code:
map.with_options :controller => ''school'' do |m|
m.school_show ''e/:id'', :action => ''show''
end
map.resources :school
map.connect '':controller/:action/:id''
And then I want a school to be shown on URLs like /e/123 and show a
creation form on /school/new and have
2007 Dec 03
7
RSpec Project
Hey does anyone know of a good open source Rails project that uses
RSpec? I''d like to check out some real world code that''s drinking the
RSpec BDD koolaid.
Thanks.
--
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
2006 Jul 27
0
CRUD, REST and associations
Let''s say I have the model class Reader and Magazine, connected by join
model Subscription. It looks something like this
class Reader < ActiveRecord::Base
has_many :subscriptions, :dependent => :delete_all
has_many :magazines, :through => :subscriptions
validates_presence_of :name
end
class Magazine < ActiveRecord::Base
has_many :subscriptions, :dependent =>
2007 Sep 16
4
"Not Implemented" doesn''t show
I''m going through Peepcode''s Rspec Basics for an overview.
He''s just doing a simple spec:
class PeepCode
end
describe PeepCode do
it "should be awsome" do
end
end
So running spec spec/simple_spec.rb should produce according to his screen
cast:
1 example, 0 failures, 1 not implemented
but I only recieve:
1 example, 0 failures
Also spec
2007 Dec 06
2
Implementation of rest in ROR
Hi all,
I am new to ROR world. I know the REST conceptually but find the
difficulties in implementation can anybody guide me that which is the
best book which i have to read. also some good links of implementation
of rest in ROR.
If anybody made a small application to restful in rails please forward
me that application.
i found some demo but i didn''t understand for what purpose they
2007 Apr 28
6
RESTful web service tutorial?
Hi,
I would like to turn some of our simulation codes
out to pasture and string some of them together
by draping them in web services.
I''m looking for a RESTful Camping tutorial to get
started ... pointers appreciated.
Some simple example applications:
airfoil force calculator: feed it an airfoil
geometry, an angle of attack, and a Mach number,
and it returns the lift, drag, and
2006 Oct 16
4
has many :through, accessing join model attribute (newbie)
from the rails recipes i have a has_many through "working".
I can list a user and what magazines he subscribes to. but I can''t
seem to figure out how to get the other attributes from subscriptions.
(like last_renewed_on)
reader_controller.rb
def list_reader
@readers = Reader.find(1)
end
----------
list_readers.rhtml
<dl>
<dt><%= readers.name %> </dt>