Fixed registrar module helper

This commit is contained in:
Priit Tark 2015-04-13 11:23:56 +03:00
parent 9bb20365c9
commit 8df6b3bdd1
4 changed files with 19 additions and 17 deletions

View file

@ -1,5 +1,9 @@
class Registrar::SessionsController < ::SessionsController class Registrar::SessionsController < ::SessionsController
layout 'registrar/application' layout 'registrar/application'
helper_method :depp_controller?
def depp_controller?
false
end
def create def create
@user = ApiUser.first if params[:user1] @user = ApiUser.first if params[:user1]

View file

@ -1,5 +1,4 @@
module Registrar module Registrar::ApplicationHelper
module ApplicationHelper
def env_style def env_style
return '' if unstable_env.nil? return '' if unstable_env.nil?
"background-image: url(#{image_path("registrar/bg-#{unstable_env}.png")});" "background-image: url(#{image_path("registrar/bg-#{unstable_env}.png")});"
@ -12,4 +11,3 @@ module Registrar
[limit, offset] [limit, offset]
end end
end end
end

View file

@ -6,17 +6,17 @@ feature 'Root', type: :feature do
Fabricate(:api_user) Fabricate(:api_user)
end end
fit 'should redirect to registrar login page' do it 'should redirect to registrar login page' do
visit '/registrar/login' visit '/registrar/login'
current_path.should == '/registrar/login' current_path.should == '/registrar/login'
end end
fit 'should redirect to registrar login page' do it 'should redirect to registrar login page' do
visit '/registrar' visit '/registrar'
current_path.should == '/registrar/login' current_path.should == '/registrar/login'
end end
fit 'should redirect to registrar login page' do it 'should redirect to registrar login page' do
visit '/registrar/' visit '/registrar/'
current_path.should == '/registrar/login' current_path.should == '/registrar/login'
end end