Module: SocialStream::Controllers::Objects::UpperInstanceMethods
- Defined in:
- lib/social_stream/controllers/objects.rb
Overview
Methods that should be included after the included block
Instance Method Summary collapse
Instance Method Details
#allowed_params ⇒ Object
25 26 27 |
# File 'lib/social_stream/controllers/objects.rb', line 25 def allowed_params [] # This should be overriden in controllers to allow extra params end |
#destroy ⇒ Object
41 42 43 44 45 |
# File 'lib/social_stream/controllers/objects.rb', line 41 def destroy @post_activity = resource.post_activity destroy! end |
#search ⇒ Object
35 36 37 38 39 |
# File 'lib/social_stream/controllers/objects.rb', line 35 def search collection_variable_set self.class.model_class.search(params[:q], ) render :layout => false end |
#whitelisted_params ⇒ Object
29 30 31 32 33 |
# File 'lib/social_stream/controllers/objects.rb', line 29 def whitelisted_params return {} if request.present? and request.get? all_allowed_params = allowed_params + [ :created_at, :updated_at, :title, :description, :author_id, :owner_id, :user_author_id, :_activity_parent_id, :relation_ids ] params.require(self.class.model_class.to_s.underscore.to_sym).permit( *all_allowed_params ) end |