Module: RequestMethods
- Included in:
- KalibroGem::Entities::Model
- Defined in:
- lib/kalibro_gem/helpers/request_methods.rb
Overview
You should have received a copy of the GNU General Public License along with this program. If not, see <www.gnu.org/licenses/>.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#destroy_action ⇒ Object
26 27 28 |
# File 'lib/kalibro_gem/helpers/request_methods.rb', line 26 def destroy_action "delete_#{instance_class_name.underscore}".to_sym end |
#destroy_params ⇒ Object
30 31 32 |
# File 'lib/kalibro_gem/helpers/request_methods.rb', line 30 def destroy_params {"#{instance_class_name.underscore}_id".to_sym => self.id} end |
#save_action ⇒ Object
22 23 24 |
# File 'lib/kalibro_gem/helpers/request_methods.rb', line 22 def save_action "save_#{instance_class_name.underscore}".to_sym end |
#save_params ⇒ Object
18 19 20 |
# File 'lib/kalibro_gem/helpers/request_methods.rb', line 18 def save_params {instance_class_name.underscore.to_sym => self.to_hash({except: [:kalibro_errors]})} end |