new stuff
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ GIT
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
cmtool (0.0.1)
|
cmtool (0.4.0)
|
||||||
bourbon
|
bourbon
|
||||||
coffee-script
|
coffee-script
|
||||||
devise
|
devise
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ module Cmtool
|
|||||||
t('cmtool.action.destroy.title', model: obj.class.model_name.human)
|
t('cmtool.action.destroy.title', model: obj.class.model_name.human)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_button_text(obj)
|
def create_button_text(obj = nil)
|
||||||
t('cmtool.action.create.label', model: obj.class.model_name.human)
|
t('cmtool.action.create.label', model: obj ? obj.class.model_name.human : '')
|
||||||
end
|
end
|
||||||
def update_button_text(obj)
|
def update_button_text(obj = nil)
|
||||||
t('cmtool.action.update.label', model: obj.class.model_name.human)
|
t('cmtool.action.update.label', model: obj ? obj.class.model_name.human : '')
|
||||||
end
|
end
|
||||||
def link_separator
|
def link_separator
|
||||||
' | '
|
' | '
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ module Cmtool
|
|||||||
end
|
end
|
||||||
|
|
||||||
def engine
|
def engine
|
||||||
|
return @options[:engine] if @options[:engine].present?
|
||||||
base = @options[:scope].presence
|
base = @options[:scope].presence
|
||||||
base ||= @resource.name.split('::').first if @resource.name.index('::')
|
base ||= @resource.name.split('::').first if @resource.name.index('::')
|
||||||
return Rails.application unless base
|
return Rails.application unless base
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
# Put your acceptance spec helpers inside spec/acceptance/support
|
||||||
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
module HelperMethods
|
||||||
|
# Put helper methods you need to be available in all acceptance specs here.
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
RSpec.configuration.include HelperMethods, :type => :acceptance
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
module NavigationHelpers
|
||||||
|
# Put helper methods related to the paths in your application here.
|
||||||
|
|
||||||
|
def homepage
|
||||||
|
"/"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
RSpec.configuration.include NavigationHelpers, :type => :acceptance
|
||||||
Reference in New Issue
Block a user