Different services I can suggest when a non-tech friend or family member asks me how they can cheaply make a website and possibly use it to sell stuff online.
Website Hosting
| # This is an incomplete implementation. | |
| module MongoMapper | |
| module NestedAttributes | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| base.send :include, InstanceMethods | |
| end | |
| module ClassMethods | |
| def accepts_nested_attributes_for(*attr_names) |
Different services I can suggest when a non-tech friend or family member asks me how they can cheaply make a website and possibly use it to sell stuff online.
Website Hosting
| # Original Rails controller and action | |
| class EmployeesController < ApplicationController | |
| def create | |
| @employee = Employee.new(employee_params) | |
| if @employee.save | |
| redirect_to @employee, notice: "Employee #{@employee.name} created" | |
| else | |
| render :new | |
| end |