Skip to content

Commit

Permalink
updating content pieces for Rails 4
Browse files Browse the repository at this point in the history
  • Loading branch information
drobin03 committed Feb 4, 2015
1 parent 399d843 commit b70d04c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/controllers/smithy/content_pieces_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def create
@record.save
flash.notice = "Your #{klass_name} was created" if @record.persisted?
respond_with @record do |format|
format.html { @record.persisted? ? redirect_to([:edit, @record]) : render(:action => 'new') }
format.html { @record.persisted? ? redirect_to(:action => :index) : render(:action => 'new') }
end
end

Expand Down Expand Up @@ -92,6 +92,6 @@ def readable_attributes
end

def accessible_attributes
klass.accessible_attributes.select(&:present?).map(&:to_sym)
permitted_params.send("#{klass.name.sub(/^Smithy::/, '').underscore}_attributes".to_sym)
end
end
8 changes: 0 additions & 8 deletions lib/smithy/content_pieces/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,3 @@ def register(content_piece)
end
end
end

Smithy::Engine.routes.draw do
namespace :smithy do
scope "/content_pieces" do
resources :store_locations
end
end
end
1 change: 1 addition & 0 deletions smithycms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Gem::Specification.new do |s|
s.add_dependency 'json', '~> 1.8.1'
s.add_dependency 'kaminari', '~> 0.16.1'
s.add_dependency 'liquid', '~> 2.6.1'
s.add_dependency 'sass-rails'
s.add_dependency 'slodown'
s.add_dependency 'rack-cache'

Expand Down

0 comments on commit b70d04c

Please sign in to comment.