similar to: Engine's Application Controller

Displaying 20 results from an estimated 20000 matches similar to: "Engine's Application Controller"

2012 Sep 05
2
Partials and helpers
Hi, Is there any reason why helpers cannot render partials? I would like to do something like this in the layout: <body> <%= magic_header %> <%= yield %> </body> and then have a magic_header helper def magic_helper ...do some magic... render partial: "magic_helper" end Why is this wrong? Cumprimentos, Luís Ferreira -- You received this
2013 Mar 15
5
link_to should have its body and url arguments reversed
I think the link_to helper method is quite confusing with its arguments order: link_to body, url link_to "Click me", @person Why is it thay way round? I want to make a "link to [the] person", so I would expect the order to be: link_to @person, "Click me" It reads much more natural. You don''t "link to [the] body", you "link to
2012 May 25
2
Typecast values on change_column for postgresql
Hello, Currently if you have a string column that have only number values (think a year column using string by mistake) and you want to change to integer, you can''t. If you apply this monkey-patch will be possible: https://gist.github.com/1393441 Note: if some value can''t be casted by postgresql (if have a letter for example), the migration will fail as expected. I think
2005 Dec 22
11
rforum engine
Here''s a question for those well-versed in rforum or engines -- or both, ideally :) I''ve spent some time today turning RForum into an engine, using rails 1.0, engines trunk, and rforum 0.1 (as rforum trunk didn''t appear to work out of the box). My rforum engine works, but only when I do two things that I found by trial and error: 1) All rforum controllers subclass
2008 Nov 25
3
Cannot use "Application" as a model?
I tried creating an application that has an "Application" model. This seems to collide with the "ApplicationController" defined in application.rb. For example... rails appgoboom cd appgoboom script/generate scaffold Application name:string script/console Loading development environment (Rails 2.2.2) >> Application.find(:all) LoadError: Expected
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
2006 Aug 08
1
Suggestion: environment.rb Includes
I like the idea of "instant functionality" Engines can offer, but practical implementation issues make adding and removing more tedious than it should be. The process typically requires: - manual modifications to environment.rb ( e.g., adding engine configuration and "Engine.start :myengine" - manual modification to app/controllers/application_controller.rb This should be
2013 Apr 02
10
Suggested strategies for testing a gem against Rails 3.x and Rails 4?
I''ve seen a few examples of dummy Rails apps (for testing, so they live under test or spec dirs, typically) for use with the Appraisals gem that supposedly work with both Rails 3.x and Rails 4, but they seem hackish and not fully functional. It is somewhat expected, as it is a stripped down Frankenstein monster that is trying to be compatible with various versions of Rails 3 as well
2011 Oct 04
9
Postgresql adapter not working
Hello everyone. I''m starting with Rails going through the obvious "Getting Started with Rails" guide: http://guides.rubyonrails.org/getting_started.html Everything goes smoothly until the rake db:create command, which returns this strange error message referring to a gem that apparently doesn''t exist: Please install the postgresql adapter: `gem install activerecord-
2012 Aug 28
4
ArgumentError in HomeController#index
Hey guys, I''m new to ruby/rails and trying to sort something... I just created an app with composer, http://railsapps.github.com/rails-composer/ I used the command: rails new myapp -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb I set up the rails server, and tried to load the app on localhost:3000 However, I end up with: ArgumentError in HomeController#index
2008 Mar 28
10
Inheriting from AdminController intstead from ApplicationController
Hi I would like to do the following: I have created an admin namespace and the required folders app/admin views/admin etc. And then I wanted all controllers under app/admin to inherit from a controller named AdminController which resists under app/admin/admin.rb instead of inhereting from ApplicationController, so I could better separate between admin and public section. The AdminController
2010 Feb 09
4
Rails3 pre and protect_from_forgery
I''ve almost entirely converted a rails 2.3.5 app to 3pre. I''m having some trouble with protect_from_forgery. I had protect_from_forgery set in application_controller.rb, but run some uploadify ajax stuff in one of my controllers, where I had protect_from_forgery, :except => :add_file set. In rails 3 I''m getting ActionController::InvalidAuthenticityToken on the ajax
2010 Jul 02
6
making something available application wide
I''d like to display a banner on every page. Ultimately I''ll be tweaking which banner is displayed via different controllers but initially I''d just like to set a single banner application wide and display it in my "_header", a partial I include in all layouts. I''ve got a BannerAdvert model, simple. If I''m in my welcome controller index action
2010 Jul 27
4
Ruby on Rails 3 RC and files in "lib" directory
In Rails 3b4 my ruby files in the lib directory of my application were automaticaly loaded/required. In Rails 3rc1, there are not anymore. Is this normal? Where is the commit that changed this? What is the best prefered way to load the files in "lib"? Thanks for your answers. Nicolas. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed
2012 Feb 01
6
Does Devise make use of a "status" method? Weird bug.
So I''ve inherited a legacy application and I''m trying to work around the edges as I put an admin tool interface on top of the existing code base. I install Devise for user authentication, since I''ve used it in the past. I change none of the default code. And yet, on successful sign in, I get an error: Render and/or redirect were called multiple times in this action.
2010 Jun 02
14
ARP problems with xen 4.0 with pvops kernel
Hello, Finally I managed to get a xen 4.0 working on ubuntu 10.04 with pvops kernel and libvirt. However I am having some problems with networking... after initial installation with netinstall image in hvm mode, when I transform the vm in xen pv (via pygrub with the current ubuntu kernel), networking startEd to act weird... Basically I''m not using a network script from xen. I define a
2010 Jun 02
14
ARP problems with xen 4.0 with pvops kernel
Hello, Finally I managed to get a xen 4.0 working on ubuntu 10.04 with pvops kernel and libvirt. However I am having some problems with networking... after initial installation with netinstall image in hvm mode, when I transform the vm in xen pv (via pygrub with the current ubuntu kernel), networking startEd to act weird... Basically I''m not using a network script from xen. I define a
2017 Jul 05
3
MSP430 code generation from LLVM IR
Hello, While trying to find out why the LDC compiler refuses to generate object code for MSP430 targets (but generates MSP430 assembly or LLVM IR/bitcode), I came across the following apparent inconsistency. This works: $ clang --target=msp430 -c test.c This doesn't work: $ clang --target=msp430 -S -emit-llvm test.c $ llc -filetype=obj test.ll /opt/msp430/bin/llc: target does not support
2020 Jun 24
2
Over-alignment of globals?
Hi, If we specify an explicit alignment attribute for globals (either at the Clang or LLVM IR level) we get asm alignment directives with values that seem to be `max(natural_alignment, specified_alignment)`. This seems to happen for multiple archs. GCC instead just emits the asked-for alignment. Is there a good reason for this LLVM behavior? Example: https://godbolt.org/z/B5ZcN_ (Clang)
2011 Jun 09
8
Fail to call
Hi, I''m trying create a user system for a future project but I have a problem when I want give to my users the "Welcome". This is my code: #application_controller class ApplicationController < ActionController::Base protect_from_forgery helper_method :current_user private def current_user_session return @current_user_session if defined?(@current_user_session)