- requires HTTP Basic authorization
user_email-- users email required
| class Task < ActiveRecord::Base | |
| belongs_to :project | |
| validates_presence_of :project_id | |
| validate do | |
| unless project.status == 'funded' | |
| errors.add(:base, 'Project must be funded') | |
| end | |
| end |
| class Channel | |
| attr_accessor :name | |
| def initialize(name) | |
| @name = name | |
| end | |
| def silent? | |
| # code here to determine whether or not the channel is silent | |
| end | |
| end |
| <div></div> |
| <div class="box"> | |
| foo | |
| </div> | |
| <div class="panel"> | |
| hai | |
| </div> | |
| <div class="widget"> | |
| lolz |
| # Just put this into lib/, and add your methods! | |
| # Usage: Features.your_feature_name? | |
| class Features | |
| # Admin-only features? We've got that! | |
| def self.reticulate_splines? | |
| current_user && current_user.admin? | |
| end | |
| # Don't want to deploy to flip it on or off? It supports that! |
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle', | |
| model() { | |
| return {}; | |
| }, | |
| }); |