andypike / rectify

Build maintainable Rails apps
MIT License
596 stars 48 forks source link

Allow id to be string to support not integer ids (postgresql uuid) #41

Open galetahub opened 7 years ago

galetahub commented 7 years ago

Record identifier type can be anything else, so it's better to use String type

srghma commented 6 years ago

awesome, I need new_record? method like the air. I'm using cocoon gem, and it requires this method to be present on simple_form_builder.object

@andypike when this will be merged?

dskecse commented 5 years ago

@galetahub for your specific case you could simply add a BaseForm to your app:

class BaseForm < Rectify::Form
  def persisted?
    id.present?
  end
end

and then derive your actual forms off of it.