We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following YAML code, ginny generates the following ruby code (with no default value for created_at):
created_at
--- name: Post description: This is an example modules: [App] parent: ApplicationRecord default_constructor: true attrs: - { name: id, type: String } - { name: created_at, type: Time, default: "Time.now()" } - { name: updated_at, type: Time }
module App # This is an example class Post < ApplicationRecord # @return [String] attr_accessor :id # @return [Time] attr_accessor :created_at # @return [Time] attr_accessor :updated_at # @param params [Hash] # @return [self] def self.create(params = {}) p = Post.new p.id = params[:id] p.created_at = params[:created_at] p.updated_at = params[:updated_at] return p end end end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given the following YAML code, ginny generates the following ruby code (with no default value for
created_at
):The text was updated successfully, but these errors were encountered: