This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
production: | |
adapter: jdbc | |
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver | |
url: jdbc:sqlserver://localhost;database=database; | |
username: user | |
password: password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#content | |
%strong Person | |
%p | |
= flash[:notice] | |
- form_for(:person, :url => acms_path) do |f| | |
%p | |
name: | |
= f.text_field :name | |
%p | |
age: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person | |
include ActiveModel::Validations | |
attr_accessor :age,:name | |
validates_presence_of :name | |
def initialize(attr = {}) | |
attr.each { |n, v| send("#{n}=", v)} | |
end | |
end |
NewerOlder