Displaying 13 results from an estimated 13 matches for "resourcecontroller".
Did you mean:
resource_controller
2008 Mar 16
3
undefined method `redirect_to'
...I''m getting the following error in my app:
undefined method `redirect_to'' for ActionController::Base:Class
I''m using Windows 2000, Rails 2.0.2 and resource_controller (from
James Golick).
My controller:
class CommentsController < ApplicationController
include ResourceController::Controller
belongs_to :post, :article, :photo
create do
ActionController::Base.redirect_to :back
end
end
I''ve been also trying to use the following:
class CommentsController < ResourceController::Base
belongs_to :post, :article, :photo
create do
ActionCon...
2008 Oct 25
1
Returning a variable to before_filter
I know its probably doesnt sound right, but I am trying to call a
before_filter method that will check whats the user role and then
based on that return a string / hash / array to the before_filter
something like this:
class MonqiClassesController < ResourceController::Base
before_filter :check_user_access_level , grant_access
def check_user_access_level
if current_user.has_role?(''staff'')
return grant_access = {:only => :index}
end
end
end
i am planing on using case and then return the set of actions they can
preform...
2010 Jan 25
9
skinny Controllers, fat models with REST?
Hi,
I''m really new to rails, so i programmed some stuff and today i read
some things about skinny Controllers, fat models.
My Controllers are really fat now. So i''m asking myself how can i
shrink my controllers and move the code to the models, especially in
fact of REST e.g. in focus on error codes?
code example:
# POST /tasks
# POST /tasks.xml
def create
@authorized
2007 Dec 27
6
ActiveResource and (polymorphic) associations
Hi,
I''m just playing with ActiveResource and I did''nt find anything about
the support of (polymorphic) associations.
Is there a support at all?
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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
2018 Nov 12
1
virsh reboot "in shutdown" state?
Hi all,
I've got a weird issue, and I'm trying to confirm if it's a bug, and if so, if there is a workaround until it is fixed.
The situation is this: If I virsh reboot <domain> --mode acpi, it will actually reboot the domain cleanly (watching from the console allows me to see the full shutdown messages, followed by a bootup). However, after this point, virsh domstate
2008 May 14
7
A copy of XX has been removed from the module tree but is still active!
I have a class in my /lib/ directory called tracker.rb
It''s function is to receive an array of URLs and then perform 4
separate tasks on each URL
Each of the 4 tasks gets it''s own thread.
the class is called from my controller like:
output = Tracker.go([array_of_urls])
Sometimes, when it hits an exception, instead of just dieing
gracefully, my logs repeatedly display:
A
2006 Oct 07
0
should_have_tag: What am I doing wrong?
My spec contains:
response.should_have_tag "<legend>", :content => "Add new Contact"
The output is:
Spec::Expectations::ExpectationNotMetError in ''The ResourceController
should do something when I try to edit contacts''
..
<legend>Add new Contact</legend>
..
should include [[{:content=>"Add new Contact", :tag=>"<legend>"}]]
This looks right to me...
Jay Levitt
2020 Oct 14
2
scsi passthrough differs between guests
Greetings,
I have two machines running the same distro, both running qemu 5.1.0, one runs libvirt 6.7.0, the other 6.8.0.
I've decided to test the viability of passing through my sata cdrom into a vm, so I went to the libvirt docs, read a bit and added the following to a debian10 uefi vm running on libvirt 6.8.0:
<controller type='scsi' index='0'
2020 Oct 15
2
Re: scsi passthrough differs between guests
Greetings Peter,
> Sent: Thursday, October 15, 2020 at 9:52 AM
> From: "Peter Krempa" <pkrempa@redhat.com>
> To: "daggs" <daggs@gmx.com>
> Cc: "libvirt-usersredhat.com" <libvirt-users@redhat.com>
> Subject: Re: scsi passthrough differs between guests
>
> I don't see anything wrong with you configs. There were some changes
2008 Jan 26
0
RSpec and resource_controller plugin
...end
# DELETE /hardways/1
# DELETE /hardways/1.xml
def destroy
@hardway = Hardway.find(params[:id])
@hardway.destroy
respond_to do |format|
format.html { redirect_to(hardways_url) }
format.xml { head :ok }
end
end
end
To this:
class EasywaysController < ResourceController::Base
end
And the helpers make it dead easy to use these resource controllers
polymorphically (i.e. with multiple parent resources using for example
AR polymorphic associations) or in both nested and unnested forms.
Anyway, in case you can''t tell, I''m pretty pumped about the
pos...
2020 May 13
0
Running libvirtd inside chroot (mock to be precise)
Hi,
I was wondering whether it's possible to run libvirtd inside a chroot
environment.
The assumption is that only one instance of libvirtd would be running on
the machine at a time, but still, inside chroot.
Currently in my chroot env I have:
- /dev/kvm added with mknod
- /dev/vhost-net added with mknod
- mounted:
- /dev/net
- /dev/shm
- /run/dbus
When I run libvirtd in
2020 Aug 15
2
unable to migrate non shared storage in tunneled mode
Hey all,
With libvirt 6.5.0 and qemu 5.1.0 migration of non shared disks in
tunneled mode does not work for me:
virsh # migrate alpinelinux3.8 qemu+tls://ratchet.lan/system --live
--persistent --undefinesource --copy-storage-all --tunneled --p2p
error: internal error: qemu unexpectedly closed the monitor: Receiving
block device images
Error unknown block device
2020-08-15T21:21:48.995016Z
2009 Jun 22
1
getting error can't modify frozen hash
Hi,
When I upgraded my rails application to rails 2.3.2 I am getting
error ''can''t modify frozen hash'' on using
@something.update_attribute(params[:something]).
Can anyone help me who is familiarize with this bug?
Thanks,