Displaying 20 results from an estimated 7000 matches similar to: "overriding rest show route but not delete"
2011 May 09
4
[LLVMdev] Path profiling command
Hi members,
I am a LLVM newbee. I am working in path profiling. I got an error message when
reading the path profile data
I made a sample source named foo.c
The command chain to make llvm path profiling as follows:
1. Compile to LLVM Bitcode
llvm-gcc –emit-llvm foo.c –c –o foo.bc
2. Insert Path Instruments
opt –insert-path-profiling foo.bc –o foo_path.bc
3. Link with profile
2007 Oct 10
1
form builder
hi,
I''m creating a custom form_builder and
i''m trying to figure out how would helpers like text_field know if
the field has an error message so I can highlight it and show the
message text
thanks
linoj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2012 Oct 10
8
link_to with additional data
Hi,
rails 3.2.8
I must be missing something basic (and it''s been driving me mad) because I
am trying to send one additional data attribute to my controller from a
link, but I can''t seem to get it into the params received by the controller.
I have looked around and found answers, but none seem to affect my links.
I''ve set up a dummy app with a home page and a single
2006 Jul 22
12
Community request - can someone show me REST?
I mentioned this in another thread, but I''ve got a formal request now.
After reading tons of stuff about REST, I don''t really get it. I
need to see an example.
I''d like someone to write up an example blog app with these requirements
- RESTful using the simply_restful plugin (or edge rails)
- allows posting of comments to articles
- has categories for posts
No need
2008 Feb 29
3
How to DRY REST admin path in URLs?
Hi everyone...
For almost all of my objects I put a series of classic REST admin links
in views. For example, for a ''user'', I have
<%= link_to "Show", user_path(user) %>
<%= link_to "Edit", edit_user_path(user) %>
<%= link_to "Destroy", user_path(user), :confirm => "Are you sure",
:method => :delete %>
I am tired
2008 Mar 19
2
rescue
Hi, whats the correct way to spec a rescue? This will raise it but
doesnt test my code''s response
# controller
def edit
@foo = Foo.find(params[:id])
rescue
flash[:notice] = "Unknown foo #{params[:id]}"
redirect_to foos_path
end
# spec
it "should flash error if not found" do
Foo.should_receive(:find).and_raise
get :edit, :id
2007 Jul 31
11
helper spec not finding rails core helpers
Hi,
My helper specs were going ok until I added a call to a rails
DateHelper method in one of my helpers
http://api.rubyonrails.com/classes/ActionView/Helpers/
DateHelper.html#M000574
The helper runs fine from my view templates, just dies in the spec test.
I boiled my question down to a simple (not too useful) example. I''m
not sure what I''m missing.
#
2008 May 19
4
REST urls and Authenticity Token
Hi,
I have a few questions regarding REST and the Authenticity Token. I''m
using a RESTful aproach for my small project and everything worked fine
untill I wanted to destroy a record.
Lets say we have a listing of folder (a folder is just a record) and I
want to destroy one by using this link:
<%= link_to image_tag(''icons/folder_delete.png''), {:url =>
2009 Apr 19
1
Overriding html generated for submit_tag and selected links
Hi,
Probably something simple, but I''m trying to change my submit_tag and
other buttons to CSS based buttons based on the article at
http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html
Basically this needs the following HTML markup:
<a class="button" href="#"><span>Button Text</span></a>
So, the question is how can
2008 Jan 21
8
Polymorphic URL helpers documentation and fixes
Yesterday I answered a question regarding polymorphic URL helpers on Core ML
and noticed that the module has no documentation. I''ve documented it and
rewritten unit tests using Mocha. I also optimized some of the code slightly
(nothing major, though). The patch also includes two fixes by Geoff Buesing,
who has done awesome work in this area in the past.
2005 Jan 24
1
how can i override the show view to capture show/n , show/n+1, etc.
Hi -
Yet another rails newbie ...
I have a simple list view rhtml with data returned from a db and
displayed within a table. Each row has a show action link_to based on
the id field in the table row.
i.e.
http://127.0.0.1:3000/myapp/show/1
http://127.0.0.1:3000/myapp/show/2
http://127.0.0.1:3000/myapp/show/3
I want to override the default show view but I don''t understand how I
can do
2008 Dec 14
2
custom REST action - template question
Hallo phorum,
i have custom rest action.
routes.rb:
map.resources :schools, :collection => { :graduations => :get }
SchoolsController:
def graduations
@schools = School.graduation(true)
end
link somewhere in navigation:
<%= link_to ''Schools with graduation'', graduations_schools_path %>
All works OK for me, but Rails needs (of course) a template for
controller
2007 Sep 14
6
Need help in View Spec
Hello everyone:
I am kind of puzzled in writing spec on view partials. I can not find much
information about the "should have_tag" syntax in Rspec. Can rspec test a
particular attribute of a tag (e.g. input tag)? Let me put an example here:
#../view/group/_index
<div id="test">
<input type="button" value="update" onclick="update()"
2007 Jun 11
2
not response
(rails)
I was making a model called Survey and another called Response
hehe, don''t use a model named Response...
it really messes up the mocks and stubs
:)
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
2004 Nov 27
4
very newbie question
Hi everyone!
I have very simple question, how to limit SIP phone user making
calls to for example longdistant calls?
Maybe:
Put in his context in sip.conf
context which don't provide possibility to make such calls?
Is it correct?
thanks for any help,
regards,
Corvin
2004 Aug 02
1
Win2000 DUN via Asterisk (Is it possible)
All,
What i'm trying to do is setup a windows DUN connection via my asterisk box
and over PSTN or VOIP to my work. What I hoped i'd find was a vitual modem
driver for windows 2000 that wouldtalk over sip to my asterisk box and then
act like a normal modem so I can dial out from that to our RAS service at
work.
Any One got any ideas as VPN is not an option for security reasons the DUN
2007 Mar 25
1
RFC: I would like to contribute with SoC
[Resending since I sent my first mail before subscribing and I think
it didn't went through. I apologize if you got this twice.]
Hello everyone,
I would like to participate as a student in google Summer of Code and
I was very excited to discover that Xiph is one of the mentoring
organizations, because I am a big fan of both Vorbis and Theora.
So I would love to contribute to a Xiph.org
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
2009 May 28
1
Update on HTML5 video support in browsers and websites
FYI, Anne van Kesteren (he's an Opera developer) has written an update
about the state of the HTML5 <video> element in browsers and big
websites:
http://annevankesteren.nl/2009/05/web-video
Two bits from the post:
1) the YouTube demo uses the H.264 codec, but I guess this will
change if they want compatibility with Firefox 3.5;
2) Chrome uses FFmpeg for the decoding; can this