A combination of Railscast 032 Time in Text Field and a demo for the StringifyTime Gem modeled after Railscast 033 Making a plugin
Ruby CSS JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Gemfile
Gemfile.lock
README.md
Rakefile
config.ru

README.md

032/033 Time In Text Field & Making a plugin

Created a the basic app shown in Railscast 032 Time in Text, then installed the StringifyTime gem I modeled after the StringifyTime plugin made in 033 Making a Plugin

Blog Post @ PatrickPerey.com

<div class="field">
  <%= f.label :due_at_string %><br>
  <%= f.text_field :due_at_string %>
</div>
class Task < ActiveRecord::Base
  validates_presence_of :name
  stringify_time :due_at

  def validate
    errors.add :due_at, 'is invalid' if due_at_invalid?
  end
end