##References
##Create Models
Create tables:
rails g model Location
rails g model User
rails g model Checkin
##References
##Create Models
Create tables:
rails g model Location
rails g model User
rails g model Checkin
render :text => @body #renders without layout as text/plain | |
# GET /page | |
def page | |
render :layout => 'layout_file_name' | |
end |
##Create a boring view at app/views/static/monitor.html.erb
Monitoring Page
##Create a boring template at app/views/layouts/monitor.html.erb <title>IndyCar Laps</title> <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %>
##Get the files
###Download or clone the rails-aa-heroku-bootstrap repo on Github
###Set up terminal command to clone bootstrap:
git clone git://github.com/wrburgess/rails-aa-heroku-bootstrap.git [app-name]terminal command to switch to app dir:
cd [app-name]terminal command:git remote set-url origin [new-github-repo-url]
##References
##Create a Rake Command file at lib/tasks/scheduler.rake
desc "This task is called by the Heroku scheduler add-on"
task :method_name => :environment do
puts "starting method_name process"
def process_mdn(mdn) | |
return "0" if mdn.nil? || mdn.length != 10 | |
unless mdn.nil? | |
mdn = mdn[1..-1] #remove the leading "1" | |
else | |
"0" | |
end |
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
<?php | |
$block = module_invoke('views', 'block_view', 'slider-block'); | |
print render($block); | |
?> | |
<?php | |
$block = module_invoke('block','block_view','1'); | |
print render($block['content']); | |
?> |
target / context = result
ex. 30px / 10px = 3em