module Txtblx
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/txtblx.rb, line 6 def self.config @config ||= Configuration.new end
configure() { |config| ... }
click to toggle source
# File lib/txtblx.rb, line 10 def self.configure yield(config) end
Public Instance Methods
create()
click to toggle source
Calls superclass method
# File lib/txtblx/admin/textblocks.rb, line 54 def create result = super resource.publish if resource.valid? result end
find_resource()
click to toggle source
# File lib/txtblx/admin/textblocks.rb, line 60 def find_resource Textblock.drafts.where(perma_id: params[:id]).first! end
permitted_params()
click to toggle source
# File lib/txtblx/admin/textblocks.rb, line 43 def permitted_params params.permit(:utf8, :_method, :authenticity_token, :commit, :id, textblock: [:key, :perma_id, :description, :text]) end
scoped_collection()
click to toggle source
# File lib/txtblx/admin/textblocks.rb, line 64 def scoped_collection Textblock.drafts end
update()
click to toggle source
Calls superclass method
# File lib/txtblx/admin/textblocks.rb, line 48 def update result = super resource.publish if resource.valid? result end