Displaying 15 results from an estimated 15 matches for "no_cont".
Did you mean:
no_cong
2012 May 08
1
One to many relationships
...ofessors/1.json
def update
@professor = Professor.find(params[:id])
respond_to do |format|
if @professor.update_attributes(params[:professor])
format.html { redirect_to @professor, notice: ''Professor was
successfully updated.'' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @professor.errors,
status: :unprocessable_entity }
end
end
end
# DELETE /professors/1
# DELETE /professors/1.json
def destroy
@professor = Professor.find(params[:id])...
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
...location = Location.find(params[:id])
@json = Location.all.to_gmaps4rails
respond_to do |format|
if @location.update_attributes(params[:location])
format.html { redirect_to @location, notice: ''Location was
successfully updated.'' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @location.errors, status:
:unprocessable_entity }
end
end
end
# DELETE /locations/1
# DELETE /locations/1.json
def destroy
@location = Location.find(params[:id])
@l...
2012 Sep 17
1
require current_password to update user information
...ntication that comes with it.
def update
@user = User.find(params[:id])
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to users_url, notice: "User #{@user.name}
was successfully updated." }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @user.errors, status:
:unprocessable_entity }
end
end
end
here''s my form view
<% if params[:action] == "edit" %>
<...
2012 Jun 09
7
ActiveRecord::AssociationTypeMismatch in UsersController#update
...er.find(params[:id])
respond_to do |format|
if @user.update_attributes(params[:user])
format.html { redirect_to(users_url,
:notice => "The information for #{@user.first_name}
#{@user.last_name} was successfully updated.") }
format.json { head :no_content }
else
format.html { render :action => "edit" }
format.json { render :json => @user.errors, :status =>
:unprocessable_entity }
end
end
end
user.rb
class User < ActiveRecord::Base
belongs_to :team
attr_accessible :team
team.rb
class...
2008 Feb 09
0
a problem with before_create and validations
I stumble across some strange problem.
I have a model with a virtual attribute file_contents that is a string.
The model has validates_format_of :file_contents, :on => create, :unless
=> no_contents? (The method that returns file_contents.nil?)
Then, I have a before_create callback, where I get my model''s title and
description by parsing file_contents, and do write_attribute for title
and description.
The problem is, that it hangs the server. Forever. Looks like
write_attribute tr...
2013 Sep 23
1
redirect on browser success, but redirect on functional test is error
...dependent: :destroy
line_item.rb:
belongs_to :product
belongs_to :cart
line_item_controller.rb:
def destroy
@line_item = LineItem.find(params[:id])
@cart = @line_item.cart
@line_item.destroy
respond_to do |format|
format.html { redirect_to @cart }
format.json { head :no_content }
end
end
line_item_controller_test.rb:
setup do
@line_item = line_items(:one)
end
test "should destroy line_item" do
@cart = @line_item.cart
assert_difference(''LineItem.count'', -1) do
delete :destroy, id: @line_item
en...
2012 Dec 13
23
make rails connect with database
i''m newbie in rails. i have problem with how to connect rails with
database. before i can connect it with command
"rake db:create" to create database.
and "rake db:migrate" to migrate schema to database.
but, i want to connect rails with database that i have before, not
create it via rails. can you help me?
--
Posted via http://www.ruby-forum.com/.
--
You received
2018 Mar 26
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
....
> > > > + if h['can_zero']:
> > > > + h['needs_auth'] = False
> >
>
> In older proxy, we do support OPTIONS, used for allowing access
> from enigne UI, but it does not return any content. Fortunately, we
> return httplib.NO_CONTENT so it is easy to detect.
>
> So we need to handle gracefully r.status = 204
OK done.
> > > >
> > >
> > > If we got here, we are working with new daemon or proxy, and both
> > > of them do not need auth, so we can set 'needs_auth' to False
&...
2018 Mar 25
6
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...ever needs the Authorization header.
> > > + if h['can_zero']:
> > > + h['needs_auth'] = False
>
In older proxy, we do support OPTIONS, used for allowing access
from enigne UI, but it does not return any content. Fortunately, we
return httplib.NO_CONTENT so it is easy to detect.
So we need to handle gracefully r.status = 204
> > >
> >
> > If we got here, we are working with new daemon or proxy, and both
> > of them do not need auth, so we can set 'needs_auth' to False
> > if OPTIONS returned 200 OK.
&g...
2013 Feb 10
0
Nested attributes doesnt get updated
..."Active"
@a_w_request.updated_by=@remote_user
respond_to do |format|
if @a_w_request.update_attributes(params[:a_w_request])
format.html { redirect_to @a_w_request, notice: ''Request was
successfully updated.'' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @a_w_request.errors, status:
:unprocessable_entity }
end
end
end
*Models:*
*a_w_request.rb*
class AWRequest < ActiveRecord::Base
set_primary_key :request_id...
2010 Nov 01
0
Vimeo API Error.
...ady initialized constant ACCEPTED
/usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/http.rb:22:
warning: already initialized constant NON_AUTHORITATIVE_INFORMATION
/usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/http.rb:23:
warning: already initialized constant NO_CONTENT
/usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/http.rb:24:
warning: already initialized constant RESET_CONTENT
/usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/http.rb:25:
warning: already initialized constant PARTIAL_CONTENT
/usr/local/lib/ruby/gems/1.8/g...
2018 Mar 26
0
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...ader.
>> > > + if h['can_zero']:
>> > > + h['needs_auth'] = False
>>
>
> In older proxy, we do support OPTIONS, used for allowing access
> from enigne UI, but it does not return any content. Fortunately, we
> return httplib.NO_CONTENT so it is easy to detect.
>
> So we need to handle gracefully r.status = 204
>
>
>> > >
>> >
>> > If we got here, we are working with new daemon or proxy, and both
>> > of them do not need auth, so we can set 'needs_auth' to False
>>...
2012 Jun 04
13
Nested Resource Route Helpers
Hello all,
I''m working on a Rails app and I have resources nested three deep - let''s
call them user, project, and issues. The route helpers now look like
user_project_issue_path(@user, @project, @issue). Would it make sense for
Rails to guess the @user <https://github.com/user> and @project<https://github.com/project> relations
from @issue
2018 Mar 24
4
Re: [PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
On Thu, Mar 22, 2018 at 5:25 PM Richard W.M. Jones <rjones@redhat.com>
wrote:
> PROBLEMS:
> - -of qcow2 does not work, with multiple problems
> * needs to set NBD size to something larger than virtual size
>
How is this related to the actual file size specified when you create a
disk?
In block storage, qcow2 image is always on a thin provisioned disk, which
in oVirt is a
2005 Jul 03
0
RE: CentOS Digest, Vol 6, Issue 3
...);
%recipient_alias = ();
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER
HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = '/css/nms.css';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
Sincerely,
Melinda Odom
www.designhosting.biz
479-471-0891
-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces...