similar to: Request format.all

Displaying 20 results from an estimated 4000 matches similar to: "Request format.all"

2013 Jan 15
7
javascript flash messages gem?
Does anybody knows a gem for managing flash messages? I would want to add messages to the flash div in the client. Bootstrap support is a plus. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group,
2012 Mar 06
0
Devise/Cancan Signout User On Controller Action
I have implemented Devise for Authentication and Authorization in ROR application everything seems fine but getting one issue. I have two modals "Account" and "Transactiona" , and so two controllers respectively. My Transaction Index view call one of Account Controller method like this
2011 Feb 28
3
Feature: ActiveResource - Adding associations through reflections
Hello everyone, I''m new in contributing and i saw in the contributing-guides, that i have to write an email at this list. I hope, that''s the right place for this. If it''s not, i''M really sorry.. ;) Could someone please give me feedback about this lighthouse-ticket?
2011 Mar 02
1
Setting CanCan ability.rs model
I successfully made login system with Devise and CanCan, and I have 3 types of users. Admin, internal and global users. I created Controllers and index actions: Admin, Cpanel, Report and State, and I want to restrict access to this controllers for some users. Admin user should have privilegies to access: Reports(all), State (read), Admin (all) Global user should have privilegies to access:
2014 Mar 25
0
Looking for some glue between Strong Parameters and CanCan
Hello Rails World, does anybody know a good solution for Strong Parameters in a Rails app authorized by Cancan (or a similar authorization gem)? def user_params if current_user.admin? params.require(:user).permit! else params.require(:user).permit(:password, :password_confirmation) end end Now I want to do this the "Cancan way". My first idea looks strange to me: def
2011 Jun 05
1
Cancan redirect back at AccessDenied
Hello I have a rails 3 app and I am trying to implement the redirect back action at access denied for cancan. If I try this in my application_controller: rescue_from CanCan::AccessDenied do |exception| redirect_to :back end It gives the following error: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure
2014 Mar 25
0
cancan gem being replaced
I just came across this so I thought I would post it on this board since I see cancan come up a lot. It seems that Ryan Bates (who is primarily responsible for cancan) is taking a hiatus and the gem is no longer being actively maintained. The collaborators on that gem have formed a new team and have released the gem cancancan which is now cancan updated for Rails 4. You read more about it
2012 Apr 05
5
rspec: identical tests fails when repeated
I''m doing RSpec controller testing with CanCan authorization, and I''m seeing something I''ve never seen in RSpec before: the same test run twice fails on the second one. I am NOT doing before(:all) or other things that should cause state to persist between tests: Here''s the relevant code: context "POST create" do context "with user logged
2012 Mar 30
1
cancan breaks scoped mass assignment
Hi all, I just installed cancan on a new project and found out that it creates some problems with the new scoped mass assignment features of rails 3.2 . Basically, in my User model I create some attr_accessible attributes in order to avoid users to edit their roles or other sensitive information. From the administration I allow admins to edit those protected attributes by passing
2011 Nov 28
4
getting a subdomain name in model.
Hi all, I am facing problem in getting subdomain name inside the model. The following is my setup. I am using cancan for authorization.I wanted a specific condition in Ability.rb ( the file which is placed in models if we install cancan gem). Below is the condition I wanted: ========================================================= user ||= User.new # guest user (not logged in) if
2012 Mar 07
0
LoadError: Expected X to define on gem upgrade
I''m upgrading to the latest version of ActiveAdmin and am running into the following when trying to start the app: Expected ../app/model/store/base.rb to define Base base.rb defines base like: module MyApp class Store::Base end end I''ve done some digging and found that ActiveAdmin did some refactoring to derive everything from a BaseController. It also depends on
2011 Jul 28
0
CanCan filtering meta_search results?
At the moment, I am running meta_search, and then filtering through CanCan after I have a set of results. Is there any other way to restrict the returned objects within the initial search query? def index @search = User .search :first_name_or_last_name_or_practice_name_or_role_contains_any => params[:search].to_s.split('' '') @users =
2012 Oct 02
0
cancan and authorization on controller actions of a gem.
Hello. I''ve installed cancan and bigbluebutton_rails, https://github.com/mconf/bigbluebutton_rails. The gem bigbluebutton_rails has some models and controllers, for example has bigbluebutton/servers_controller.rb. This controller has some actions like create, join, authorize, etc. I want that only users with role admin can create. What can I do? I need to put load_resource in
2013 Nov 22
2
Cancan Rspec load_and_authorize_resource
Hello! While running bundle exec rake, I receive following error (see in attached file) However, my tests are steel passing with command rspec spec/controllers/ Some info: ads_controller.rb: class AdsController < ApplicationController load_and_authorize_resource except: :create end ads_controller_spec.rb: require ''spec_helper'' describe AdsController do render_views
2010 Sep 05
0
Responding to a non-registered MIME type?
I''m trying to figure out how attachments are supposed to work with MIME type-based responses. What makes attachments special is that in many cases they are allowed to be arbitrary files. It would be too restrictive to require that all possible types are registered (Mime::Type.register). Let''s say for GET requests on an attachment resource I want to return metadata if the
2012 May 08
1
One to many relationships
I was trying to make one to many relationships - between professors controller to rate_professors controller and used scaffold. it''s giving me this error- NoMethodError in RateProfessorsController#index undefined method `rate_professors'' for nil:NilClass app/controllers/rate_professors_controller.rb:7:in `index'' Request Parameters:
2010 Jun 23
0
Rails 3 - AJAX Response
Hi, I need help with some AJAX in rails 3. So basically, I have a select option in my index page for my User model. This select option is a form that modifies the user''s type. The " :remote => true " works and the type is changed when hit the submit button. But, nothing happens in the browser. The user is updated. I''m actually not sure where to put either my JS /
2006 Apr 08
2
respond_to causes DoubleRenderError?
I have a custom authentication plugin that redirects users to a login site if they aren''t already authenticated and their session hasn''t timed out. I had things working fine with straight http requests, but wanted to add support for ajax requests. I thought this would be a simple matter of replacing all of my "redirect_to <blah> and return false" calls with
2011 May 09
0
rails guides - getting started - section 10 security
The example doesn''t work as described for me; not sure if I haven''t followed it right, or there''s a problem with the code. Can someone help me to determine what the problem is. Specifically, after adding the authentication code to the PostsController, with this line: before_filter :authenticate, :except => [:index, :show] The guide says that "we want the user
2007 Apr 26
2
assert_select with respond_to JS or xhr?
Hi everyone, I am a bit confused with xhr? and respond_to. I have the folloing code in my view to update the ''emails'' ID link_to_remote(image_tag("refresh"), :update => "emails", :url => { :action => "list_emails" }) in the controller side i have somthing like : [..] respond_to do |type| type.html { render :action