Displaying 20 results from an estimated 11000 matches similar to: "RESTful routes and resulting urls"
2007 Jan 16
2
RESTful routes and Mime::Type
Hi all
I''m using RESTful routes combined with the to_csv plugin and would
like to know if there''s a nicer way of generating a link to fetch the
CSV file than just making a hard link. This is what I use for the
moment (and it works btw):
<%= link_to("Export as CSV","/companies.csv") -%>
I would expect the link helper to have something like
2012 Feb 02
3
MVC questions with rails
2008 Mar 24
2
link_to_remote and restful routes/urls
is there a way to access a restful resource with mike''s new
link_to_remote helper?
something like:
<%= link_to_remote h(user.name),
:update => "div_id",
:url => user_url(user) %>
of course, that doesn''t work.
i have also been trying things like:
:url => controller.asset_host +
2007 Dec 30
6
Restful-Authentication Rspec Failure Rails 2.0.2
I am trying the Restful-Authentication (latest version, downloaded
today) and upon running the generator, doing the migration, prepping
the test system and putting the resources in routes.rb I get a Rspec
test failure:
''SessionsController logins and redirects'' FAILED
expected not nil, got nil
routes.rb has:
map.resources :users
map.resources :sessions
nothing else was
2006 Feb 21
4
File_Column w/ Dynamic Sizing
I''m running file_column 0.3.1, and having a few problems... which are:
- Uploading a 378x567 jpg, and using :magick => {:geometry =>
"100x100" }, my image ends up being 67x100 ?
Is there a way to "force" the image to be the size you specify ?
- My view has a drop-down of sizes, and I''m trying to pass in this
size into :magick =>
2007 Feb 01
12
RESTful Rails and other musings
Hi all,
I would first like to introduce myself to the Ruby on Rails (RoR)
community and to say that I hope to begin to build some relationships
with other RoR developers.
I''m a long time Java programmer (5+ years). Java was my first
experience with Object Oriented Programming (OOP). Before Java I
developed using many other languages including C, Pascal, Fortran,
BASIC, Visual Basic,
2005 Oct 18
1
rails gem update
hi all,
i just did a
''gem update --source gems.rubyonrails.org''
and then a
''gem cleanup''
and all appeared to run smoothly but now when i start up a webrick
server i get the following:
/usr/local/lib/site_ruby/1.8/rubygems.rb:204:in `report_activate_error'':
RubyGem version error: activesupport(1.2.0 not = 1.1.1) (Gem::LoadError)
from
2007 May 10
13
REST own action
I can sent my own action to a users_controller stating in routes.rb
map.resources :users, :member => { :network => get }
I defined in my users_controller the network action....
so I can have an url like
"http://localhost:3000/users/168.xml;network"
now I would like to have another action network_plus which is a little
bit different fron the network..
sure, I can state another
2007 Nov 05
6
Strange wildcard problem
Hi,
Apologies for reposting this for those who read this via ruby-forum,
but it didn''t make it to the list before, and the list seems more
active...
I''m using ferret (via acts_as_ferret) in a somewhat unorthodox
manner and am having a strange wildcard problem. Before anyone wonders
why we''re doing things this way, the answer is basically that it lets
us
2007 Aug 24
1
ActiveMerchant Paypal IPN and RESTful design
Hello,
I''m trying to go all REST of my application. But i''ve come to one problem.
How do i do payment, using IPN, in a RESTful way?
right now i have an Payments controller. With 2 actions.
action "new" shows a page with a paypal button.
action "paypal_ipn" is where paypal sends its notifications.
How would i go about doing this in a REST environment?
Thank
2007 Jan 31
1
RESTful Resources/ Caching Issue?
Hi,
I just ran into a bizarre problem when I put my site into production.
I have a resource (call it xxx), then I created with the generate
script.
I then set up page caching on the show action. But now in the
production environment, trying to call the edit action results in the
show page being retreived from the cache.
I''m assuming this has to do with the similarity of the URL
2008 Feb 01
2
Turning off InvalidAuthenticityToken for a RESTful Service
Hi,
I was trying to write a RESTful service and was planning on testing
via tools such as cURL and the basic http libs. With the
InvalidAuthenticityToken piece that is turned by default in Rails
2.0.2, I have to provide the token with each request. This is
something of a pain for a programmable client that may not make a GET
request before performing other actions, specifically POST, PUT and
2006 Feb 21
2
caching and admin area
i have created some ''public'' controllers like so:
./script/generate controller example
and an ''admin'' controller like this:
./script/generate controller admin/example
now i want to have caching in the ''public'' controllers so i add
something like this:
caches_action :show, :whatever
but i want the ''admin'' controller to do
2006 Aug 24
2
Design questions on creating digg.com-like URLs (are they considered RESTful?)
Hi everyone, I''m working on creating a site that functions similar to
digg.com (please no "no more digg clones" remarks please! :) ). One
thing I really like about digg is there URLs are very nice to read and I
would like to emulate that without having a lot of actions spread out
all over my application.
So in my app I have three main resources:
Users, Tags, and Items
2006 Apr 19
2
I need help in ActiveRecord..
I have this Product.find(:all, :include => [:brand, :category, :type],
:group =>
"description"), but it dont group by description why?
Bruno
--
Posted via http://www.ruby-forum.com/.
2006 Oct 15
14
Mongrel can''t handle some URLs that IE6 sends
IE6 happily sends unsafe* characters unencoded if you''ve typed them
into the URL bar of your IE6 window. This could happen if you copy &
paste a URL from an email or web page.
Mongrel doesn''t seem to handle these properly. In 0.3.13.3 it would
print out something like:
Sun Oct 15 23:05:38 CST 2006: BAD CLIENT (192.168.1.2): Invalid
HTTP format, parsing fails.
0.3.13.5
2007 Sep 05
8
Hi..Guys new plugin again
Hi..
Guys new plugin again
Foreign Key Associations is a plugin that automatically creates
associations based on foreign-keys. The associations are created at
runtime-ie. as your ActiveRecord models are loaded-so they will always
be up-to-date.
For example, given a foreign-key from a customer_id column in an
orders table to an id column in a customers table, the plugin
creates:
2007 Sep 22
1
Testing RESTful routes
Hi all,
The app I am making right now uses restful routing entirely. I want to
prevent people from accessing my actions without the proper HTTP verb so
I commented out the :controller/:action/:id catch all routes that were
used in pre-RESTful Rails apps. Like so:
#map.connect '':controller/:action/:id.:format''
#map.connect '':controller/:action/:id''
2007 Sep 04
2
specing helpers fails on restful routes
Hi,
I am trying to spec helper methods in a Rails project, but it seems
the specs fail with the error:
You might have expected an instance of Array.
The error occurred while evaluating nil.<<
if the restful routes helper are used either in spec files, or the helper file.
What can I be doing wrong? Or how can I fix this.
Thanks!
--
Surendra Singhi
http://ssinghi.kreeti.com,
2009 Mar 11
3
[rspec, rails] Restful Routes in controller specs
Hi,
how is it possible that I can use the restful routes helpers (e.g.
new_user_path) in controller specs? I browsed the source code but I
couldn''t find the magic. I''m just curious and would appreciate any
hint...
thanks
Andi