The migration is an easy one line fix:
class CreateCaseStudies < ActiveRecord::Migration[5.1]
def change
create_table :case_studies do |t|
t.string :title
t.text :description
t.text :short_description
t.string :slug
cjs-MBP15:auth_armistice cj$ locate /CoreServices.h | |
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdks/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/ | |
Headers/CoreServices.h | |
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h | |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Headers/CoreServices.h | |
cjs-MBP15:auth_armistice cj$ export CFLAGS="isysroot /Applications/Xcode.app/Content | |
s/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frame | |
works/CoreServices.framework/Versions/A/Headers/CoreServices.h" | |
cjs-MBP15:auth_armistice cj$ mix deps.compile |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Drawing; | |
using System.Drawing.Printing; | |
using System.Windows.Forms; | |
using BarcodeLib; | |
using QRCoder; |
public String PrinterName { get; set; } | |
public CouponPrinter(String printerName) | |
{ | |
PrinterName = printerName; | |
} | |
public void PrintReceiptForTransaction() | |
{ |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Data; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using RollbarDotNet; | |
namespace Sample |
0x05514C93e8CE4183Ac968e9fac76fAF886e874AA |
0x3DC13E32C8a6948b7C513aF9D9BEF545cD38d7D5 |
0x3DC13E32C8a6948b7C513aF9D9BEF545cD38d7D5 |
The migration is an easy one line fix:
class CreateCaseStudies < ActiveRecord::Migration[5.1]
def change
create_table :case_studies do |t|
t.string :title
t.text :description
t.text :short_description
t.string :slug
lass CreateCaseStudies < ActiveRecord::Migration[5.1] | |
def change | |
create_table :case_studies do |t| | |
t.string :title | |
t.text :description | |
t.text :short_description | |
t.string :slug | |
t.text :content | |
t.boolean :hidden, default: false | |
t.datetime :published_at |
Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.
You can get all of this information on the command line.
rails generate
with no generator name will output a list of all available generators and some information about global options.
rails generate GENERATOR --help
will list the options that can be passed to the specified generator.