1-day current streak·13-day longest streak
== Welcome to Rails Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Control pattern. This pattern splits the view (also called…
== Welcome to Rails
Rails is a web-application framework that includes everything needed to create
database-backed web applications according to the Model-View-Control pattern.
This pattern splits the view (also called the presentation) into "dumb"
templates that are primarily responsible for inserting pre-built data in between
HTML tags. The model contains the "smart" domain objects (such as Account,
Product, Person, Post) that holds all the business logic and knows how to
persist themselves to a database. The controller handles the incoming requests
(such as Save New Account, Update Product, Show Post) by manipulating the model
and directing data to the view.
In Rails, the model is handled by what's called an object-relational mapping
layer entitled Active Record. This layer allows you to present the data from
database rows as objects and embellish these data objects with business logic
methods. You can read more about Active Record in
link:files/vendor/rails/activerecord/README.html.
The controller and view are handled by the Action Pack, which handles both
layers by its two parts: Action View and Action Controller. These two layers
are bundled in a single package due to their heavy interdependence. This is
unlike the relationship between the Active Record and Action Pack that is much
more separate. Each of these packages can be used independently outside of
Rails. You can read more about Action Pack in
link:files/vendor/rails/actionpack/README.html.
== Getting Started
1. At the command prompt, create a new Rails application:
rails new myapp (where myapp is the application name)
2. Change directory to myapp and start the web server:
cd myapp; rails server (run with --help for options)
3. Go to http://localhost:3000/ and you'll see:
"Welcome aboard: You're riding Ruby on Rails!"
4. Follow the guidelines to start developing your application. You can find
the following resources handy:
- The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
- Ruby on Rails Tutorial Book: http://www.railstutorial.org/
== Debugging Rails
Sometimes your application goes wrong. Fortunately there are a lot of tools that
will help you debug it and get it back on the rails.
First area to check is the application log files. Have "tail -f" commands
running on the server.log and development.log. Rails will automatically display
debugging and runtime information to these files. Debugging info will also be
shown in the browser on requests from 127.0.0.1.
You can also log your own messages directly into the log file from your code
using the Ruby logger class from inside your controllers. Example:
class WeblogController < ActionController::Base
def destroy
@weblog = Weblog.find(params[:id])
@weblog.destroy
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
end
end
The result will be a message in your log file along the lines of:
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1!
More information on how to use the logger is at http://www.ruby-doc.org/core/
Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are
several books available online as well:
- Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe)
- Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
== Debugger
Debugger support is available through the debugger command when you start your
Mongrel or WEBrick server with --debugger. This means that you can break out of
execution at any point in the code, investigate and change the model, and then,
resume execution! You need to install ruby-debug to run the server in debugging
mode. With gems, use sudo gem install ruby-debug. Example:
class WeblogController < ActionController::Base
def index
@posts = Post.all
debugger
end
end
So the controller will accept the action, run the first line, then present you
with a IRB prompt in the server window. Here you can do things like:
>> @posts.inspect
=> "[#nil, "body"=>nil, "id"=>"1"}>,
#"Rails", "body"=>"Only ten..", "id"=>"2"}>]"
>> @posts.first.title = "hello from a debugger"
=> "hello from a debugger"
...and even better, you can examine how your runtime objects actually work:
>> f = @posts.first
=> #nil, "body"=>nil, "id"=>"1"}>
>> f.
Display all 152 possibilities? (y or n)
Finally, when you're ready to resume execution, you can enter "cont".
== Console
The console is a Ruby shell, which allows you to interact with your
application's domain model. Here you'll have all parts of the application
configured, just like it is when the application is running. You can inspect
domain models, change values, and save to the database. Starting the script
without arguments will launch it in the development environment.
To start the console, run rails console from the application
directory.
Options:
- Passing the -s, --sandbox argument will rollback any modifications
- Passing an environment name as an argument will load the corresponding
To reload your controllers and models after launching the console run
reload!
More information about irb can be found at:
link:http://www.rubycentral.org/pickaxe/irb.html
== dbconsole
You can go to the command line of your database directly through rails
dbconsole. You would be connected to the database with the credentials
defined in database.yml. Starting the script without arguments will connect you
to the development database. Passing an argument will connect you to a different
database, like rails dbconsole production. Currently works for MySQL,
PostgreSQL and SQLite 3.
== Description of Contents
The default directory structure of a generated Ruby on Rails application:
|-- app
| |-- assets
| |-- images
| |-- javascripts
| -- stylesheets-- views
| |-- controllers
| |-- helpers
| |-- mailers
| |-- models
|
| -- layouts-- locales
|-- config
| |-- environments
| |-- initializers
|
|-- db
|-- doc
|-- lib
| -- tasks-- unit
|-- log
|-- public
|-- script
|-- test
| |-- fixtures
| |-- functional
| |-- integration
| |-- performance
|
|-- tmp
| |-- cache
| |-- pids
| |-- sessions
| -- sockets-- vendor
|-- assets
-- stylesheets-- plugins
app
Holds all the code that's specific to this particular application.
app/assets
Contains subdirectories for images, stylesheets, and JavaScript files.
app/controllers
Holds controllers that should be named like weblogs_controller.rb for
automated URL mapping. All controllers should descend from
ApplicationController which itself descends from ActionController::Base.
app/models
Holds models that should be named like post.rb. Models descend from
ActiveRecord::Base by default.
app/views
Holds the template files for the view that should be named like
weblogs/index.html.erb for the WeblogsController#index action. All views use
eRuby syntax by default.
app/views/layouts
Holds the template files for layouts to be used with views. This models the
common header/footer method of wrapping views. In your views, define a layout
using the layout :default and create a file named default.html.erb.
Inside default.html.erb, call <% yield %> to render the view using this
layout.
app/helpers
Holds view helpers that should be named like weblogs_helper.rb. These are
generated for you automatically when using generators for controllers.
Helpers can be used to wrap functionality for your views into methods.
config
Configuration files for the Rails environment, the routing map, the database,
and other dependencies.
db
Contains the database schema in schema.rb. db/migrate contains all the
sequence of Migrations for your schema.
doc
This directory is where your application documentation will be stored when
generated using rake doc:app
lib
Application specific libraries. Basically, any kind of custom code that
doesn't belong under controllers, models, or helpers. This directory is in
the load path.
public
The directory available for the web server. Also contains the dispatchers and the
default HTML files. This should be set as the DOCUMENT_ROOT of your web
server.
script
Helper scripts for automation and generation.
test
Unit and functional tests along with fixtures. When using the rails generate
command, template test files will be generated for you and placed in this
directory.
vendor
External libraries that the application depends on. Also includes the plugins
subdirectory. If the app has frozen rails, those gems also go here, under
vendor/rails/. This directory is in the load path.
-
redux-simple-auth
A library for implementing authentication and authorization for redux applications
JavaScript ★ 20 7y agoExplain → -
spotify-react-graphql
Spotify Web Client built in React + GraphQL
TypeScript ★ 6 3y agoExplain → -
dotfiles
No description.
Lua ★ 5 2mo agoExplain → -
redwoodjs-conf-2023-workshop
Workshop content for RedwoodJSConf 2023
TypeScript ★ 4 2y agoExplain → -
dictionary-trie
A dictionary built using trie data structure
JavaScript ★ 2 9y agoExplain → -
react-native-pokedex
React Native Pokedex
JavaScript ★ 2 8y agoExplain → -
csci410-games-2012spring ⑂
Student games for the Hack platform in CSCI 410, Spring 2012
Ruby ★ 2 14y agoExplain → -
react-apollo-ssr
No description.
TypeScript ★ 1 3y agoExplain → -
react-masterclass
Collection of teachings that I have been giving of React topics at work
JavaScript ★ 1 8y agoExplain → -
phoenix-pokedex
GraphQL Pokedex written in Elixir using Absinthe
Elixir ★ 1 8y agoExplain → -
react-pokedex
React/GraphQL pokedex using the Pokemon GraphQL schema
JavaScript ★ 1 8y agoExplain → -
RealStuff
The Real Stuff Ice Cream - Rails 3
Ruby ★ 1 14y agoExplain → -
ThinkAlike_old
Think Alike Website
Ruby ★ 1 14y agoExplain → -
BenjaminHarrisCreative
No description.
Ruby ★ 1 13y agoExplain → -
RealStuffIceCream
Real Stuff website
Ruby ★ 1 15y agoExplain → -
AtTheForefront
At The Forefront website
Ruby ★ 1 14y agoExplain → -
Ben-Harris
Ben Harris
Ruby ★ 1 14y agoExplain → -
real-time-chat
No description.
JavaScript ★ 1 9y agoExplain → -
csci446
No description.
Ruby ★ 1 15y agoExplain → -
WaveCloud
No description.
PHP ★ 1 14y agoExplain → -
Fortran
Fortran Repo
FORTRAN ★ 1 14y agoExplain → -
Databases
No description.
Ruby ★ 1 14y agoExplain → -
EECS
EECS Dept At Mines
Ruby ★ 1 14y agoExplain → -
csci446-1 ⑂
aniccola's repository for Web Applications
Ruby ★ 1 15y agoExplain → -
csci446-armada_skeleton ⑂
A skeletal Rails app to help bootstrap yours.
Ruby ★ 1 15y agoExplain → -
create-react-app ⑂
Create React apps with no build configuration.
JavaScript ★ 0 9y agoExplain → -
graphiql ⑂
GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
★ 0 1mo agoExplain → -
vets-website ⑂
Beta version of Vets.gov
JavaScript ★ 0 9y agoExplain → -
jsonapi-resources ⑂
A resource-focused Rails library for developing JSON API compliant servers.
Ruby ★ 0 9y agoExplain → -
golden-path-wg ⑂
Laying out the default experience for new users that should lead to the greatest chance of success with GraphQL
★ 0 9d agoExplain → -
transform ⑂
Set of tools for transforming GraphQL results.
★ 0 8mo agoExplain → -
wryware ⑂
A collection of packages that are probably a little too clever. Use at your own wrisk.
TypeScript ★ 0 9mo agoExplain → -
graphql-js ⑂
A reference implementation of GraphQL for JavaScript
★ 0 9mo agoExplain → -
store ⑂
🤖 Framework agnostic, type-safe store w/ reactive framework adapters
★ 0 9mo agoExplain → -
apollo-angular ⑂
A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
★ 0 9mo agoExplain → -
resume
No description.
HTML ★ 0 11mo agoExplain → -
apollo-upload-client ⑂
A terminating Apollo Link for Apollo Client that fetches a GraphQL multipart request if the GraphQL variables contain files (by default FileList, File, or Blob instances), or else fetches a regular GraphQL POST or GET request (depending on the config and GraphQL operation).
★ 0 9mo agoExplain → -
apollo-absinthe-upload-link ⑂
A network interface for Apollo that enables file-uploading to Absinthe back ends.
★ 0 3y agoExplain → -
reproduction-issue-12720
No description.
JavaScript ★ 0 7mo agoExplain → -
h3 ⑂
⚡️ Minimal H(TTP) framework built for high performance and portability
★ 0 1y agoExplain → -
changesets ⑂
🦋 A way to manage your versioning and changelogs with a focus on monorepos
★ 0 1y agoExplain → -
advent-of-code-2024
No description.
TypeScript ★ 0 1y agoExplain → -
graphql-code-generator ⑂
A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
TypeScript ★ 0 9mo agoExplain → -
graphql-code-generator-community ⑂
No description.
★ 0 1y agoExplain → -
airlock-web-client ⑂
Demo app for Airlock
TypeScript ★ 0 1y agoExplain → -
client-preset-example
No description.
CSS ★ 0 1y agoExplain → -
react-use-reproduction
No description.
TypeScript ★ 0 2y agoExplain → -
react-apollo-error-template ⑂
Apollo Client issue reproduction.
★ 0 1y agoExplain → -
good-snow-tire-demo ⑂
No description.
TypeScript ★ 0 2y agoExplain → -
graphql-js-wg ⑂
Working group notes for graphql-js
★ 0 8mo agoExplain → -
actions-testing
Workspace for testing github actions
★ 0 2y agoExplain → -
apollo-lazy-query-fetch-policy-issue-reproduction ⑂
No description.
★ 0 3y agoExplain → -
issue-11201-useLazyQuery-double-call
No description.
JavaScript ★ 0 2y agoExplain → -
advent-of-code-2023
Advent of Code challenges 2023
TypeScript ★ 0 2y agoExplain → -
absinthe ⑂
The GraphQL toolkit for Elixir
Elixir ★ 0 2y agoExplain → -
apollo-client-issue-11179
No description.
TypeScript ★ 0 2y agoExplain → -
apollo-client-nextjs ⑂
Apollo Client support for the Next.js App Router
★ 0 2y agoExplain → -
apollo_graphq_check ⑂
No description.
★ 0 3y agoExplain → -
docs-website ⑂
Source code and public issue backlog for @newrelic docs. We welcome feedback on the docs in GitHub issues!
★ 0 3y agoExplain → -
graphql-wg ⑂
Working group notes for GraphQL
★ 0 7mo agoExplain → -
apollo-countries
No description.
TypeScript ★ 0 3y agoExplain → -
React_Dev
No description.
★ 0 4y agoExplain → -
advent-of-code-2021
https://adventofcode.com/
Elixir ★ 0 4y agoExplain → -
newrelic-quickstarts ⑂
New Relic One quickstarts help accelerate your New Relic journey by providing immediate value for your specific use cases.
★ 0 4y agoExplain → -
hooks-deep-dive
Deep dive hooks topic with my teammates
JavaScript ★ 0 4y agoExplain → -
elixir_agent ⑂
New Relic's Open Source Elixir Agent
★ 0 4y agoExplain → -
graphql-interface-reproduction
No description.
JavaScript ★ 0 4y agoExplain → -
tokyonight.nvim ⑂
🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
★ 0 4y agoExplain → -
elixir ⑂
Elixir is a dynamic, functional language designed for building scalable and maintainable applications
Elixir ★ 0 4y agoExplain → -
entity-synthesis-definitions ⑂
The definition files contained in this repository are mappings between the telemetry attributes NewRelic ingests, and the entities users can interact with. If you have telemetry from any source that is not supported out of the box, you can propose a mapping for it by opening a PR.
JavaScript ★ 0 5y agoExplain → -
victory-visualizations-playground
No description.
JavaScript ★ 0 5y agoExplain → -
open-source-tools ⑂
Open source templates and tools for New Relic projects.
★ 0 6y agoExplain → -
kafka_ex ⑂
Kafka client library for Elixir
★ 0 5y agoExplain → -
jerelmiller.com
No description.
JavaScript ★ 0 2y agoExplain → -
react-vr ⑂
Issues-only repo for React VR - a React Native platform to run 3D and WebVR content.
★ 0 9y agoExplain → -
documentation ⑂
The source for Datadog's documentation site.
★ 0 5y agoExplain → -
mdx ⑂
JSX in Markdown for ambitious projects
★ 0 5y agoExplain → -
gatsby ⑂
Build blazing fast, modern apps and websites with React
★ 0 5y agoExplain → -
react-magic ⑂
Automatically AJAXify plain HTML with the power of React. It's magic!
★ 0 7y agoExplain → -
nr1-github ⑂
Create more context to your entities by having access to the GitHub repository, contributors and README.
★ 0 5y agoExplain → -
elixir_workshop
No description.
Elixir ★ 0 5y agoExplain → -
gatsby-plugin-newrelic ⑂
A Gatsby plugin for instrumenting your site with New Relic's Browser Agent
★ 0 6y agoExplain → -
dev.to ⑂
Where programmers share ideas and help each other grow
Ruby ★ 0 7y agoExplain → -
ios-copy-clock
Reimplementation of the stock clock app in iOS for learning app development with SwiftUI
Swift ★ 0 6y agoExplain → -
tasky
No description.
CSS ★ 0 12y agoExplain → -
nr1-network-telemetry ⑂
NR1 Nerdpack for Network Telemetry
★ 0 6y agoExplain → -
apollo-link-json-api ⑂
Use JSON API compliant APIs with GraphQL
TypeScript ★ 0 7y agoExplain → -
router ⑂
No description.
JavaScript ★ 0 7y agoExplain → -
zen-observable ⑂
An Implementation of Observables for Javascript
JavaScript ★ 0 7y agoExplain → -
graphql-pokemon
GraphQL backend for pokedex
Ruby ★ 0 9y agoExplain → -
EpicImages
No description.
Ruby ★ 0 12y agoExplain → -
JerelLizWedding
Jerel and Liz's wedding website.
Ruby ★ 0 13y agoExplain → -
JerelMiller
a repository for the Jerel Miller website
Ruby ★ 0 13y agoExplain → -
BodyFuel
No description.
Ruby ★ 0 12y agoExplain → -
ThinkAlike
Repository for the ThinkAlike Website
Ruby ★ 0 12y agoExplain → -
apollo_upload_server-ruby ⑂
No description.
Ruby ★ 0 7y agoExplain → -
selfstarter ⑂
Roll your own crowdfunding
Ruby ★ 0 13y agoExplain → -
relay ⑂
Relay is a JavaScript framework for building data-driven React applications.
JavaScript ★ 0 8y agoExplain → -
react-fns ⑂
Browser API's turned into declarative React components and HoC's
TypeScript ★ 0 8y agoExplain → -
ex_twilio ⑂
Twilio API client for Elixir
Elixir ★ 0 9y agoExplain → -
sound-redux ⑂
A Soundcloud client built with React / Redux
JavaScript ★ 0 9y agoExplain → -
operationcode_frontend ⑂
This is the frontend repo for the Operation Code website
JavaScript ★ 0 9y agoExplain → -
f8app ⑂
Source code of the official F8 app of 2016, powered by React Native and other Facebook open source projects.
JavaScript ★ 0 9y agoExplain → -
react-blog-example ⑂
No description.
JavaScript ★ 0 9y agoExplain → -
mac-dev-playbook ⑂
Mac setup and configuration via Ansible.
★ 0 9y agoExplain → -
presentations
No description.
★ 0 9y agoExplain → -
webslides ⑂
Making HTML presentations easy —
HTML ★ 0 9y agoExplain → -
react-router-v4-playground
Play around with yarn and react-router v4
HTML ★ 0 9y agoExplain → -
MLAlgorithms ⑂
Minimal and clean examples of machine learning algorithms
Python ★ 0 9y agoExplain → -
Dash-iOS ⑂
Dash gives your iPad and iPhone instant offline access to 150+ API documentation sets
Objective-C ★ 0 9y agoExplain → -
games ⑂
:video_game: A list of popular/awesome videos games, add-ons, maps, etc. hosted on GitHub. Any genre. Any platform. Any engine.
★ 0 9y agoExplain → -
faceit-swift
FaceIt project from iTunesU CS193P iOS 9 Course
Swift ★ 0 10y agoExplain → -
open-source-ios-apps ⑂
:iphone: Collaborative List of Open-Source iOS Apps
Swift ★ 0 10y agoExplain → -
You-Dont-Need-Javascript ⑂
Css is powerful, you can do a lot of things without js.
CSS ★ 0 10y agoExplain → -
Calculator-swift
No description.
Swift ★ 0 10y agoExplain → -
hello_phoenix
No description.
Elixir ★ 0 10y agoExplain → -
my_videos ⑂
No description.
Ruby ★ 0 10y agoExplain → -
ember-practice
No description.
JavaScript ★ 0 10y agoExplain → -
rubix-rails ⑂
a blank app with rubix-theme
CSS ★ 0 11y agoExplain → -
react-calculator
Play around with React
JavaScript ★ 0 10y agoExplain → -
react_on_rails ⑂
Integration of React + Webpack + Rails to build Universal (Isomorphic) Apps
Ruby ★ 0 10y agoExplain → -
speechmatics ⑂
Ruby client for Speechmatics API: https://speechmatics.com/api-details
Ruby ★ 0 10y agoExplain → -
react-isomorphic
No description.
JavaScript ★ 0 10y agoExplain → -
react-starter-kit ⑂
React Starter Kit — a skeleton of an "isomorphic" web application / SPA built with React.js, Express, Flux, ES6+, JSX, Babel, PostCSS, Webpack, BrowserSync...
JavaScript ★ 0 10y agoExplain → -
Full-Stack-Redux-Tutorial
Walks through full stack redux tutorial on http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html
JavaScript ★ 0 10y agoExplain → -
webpack_react ⑂
From apprentice to master (CC BY-NC-ND)
JavaScript ★ 0 10y agoExplain → -
ulti-projections
No description.
VimL ★ 0 10y agoExplain → -
react-motion ⑂
A spring that solves your animation problems.
JavaScript ★ 0 10y agoExplain → -
homebrew ⑂
:beer: The missing package manager for OS X.
Ruby ★ 0 11y agoExplain → -
guard-jest
Guard::Jest wraps npm test to automatically run jest tests
Ruby ★ 0 11y agoExplain → -
TwentyFourTru ⑂
Ruby gem that provides a simple interface for the querying the 24Tru API
Ruby ★ 0 13y agoExplain → -
illacceptanything ⑂
The project where literally* anything goes
HTML ★ 0 11y agoExplain → -
smarter_csv ⑂
Ruby Gem for smarter importing of CSV Files as Array(s) of Hashes, with optional features for processing large files in parallel, embedded comments, unusual field- and record-separators, flexible mapping of CSV-headers to Hash-keys
Ruby ★ 0 11y agoExplain → -
angular-modal ⑂
Simple AngularJS service for creating modals
JavaScript ★ 0 12y agoExplain → -
csshake ⑂
CSS classes to move your DOM!
CSS ★ 0 11y agoExplain → -
typebase.css ⑂
A starting point for good typography on the web.
CSS ★ 0 12y agoExplain → -
ngAnimate.css ⑂
Animation classes for use with AngularJS
★ 0 12y agoExplain → -
bounce.js ⑂
Create tasty CSS3 powered animations in no time.
CSS ★ 0 12y agoExplain → -
javascript ⑂
JavaScript Style Guide
★ 0 12y agoExplain → -
angular-count-to ⑂
Angular directive to animate counting to a number
JavaScript ★ 0 13y agoExplain → -
try_git
No description.
★ 0 14y agoExplain → -
Stanford_CS193p_iPhone_HW
No description.
★ 0 13y agoExplain → -
iTerm2-Color-Schemes ⑂
iTerm Colors - A set of iTerm 2 color schemes/themes. Some schemes have been ported from Mac OSX's Terminal application
Shell ★ 0 13y agoExplain → -
Effeckt.css ⑂
UI-less, performant transitions & animations
JavaScript ★ 0 13y agoExplain → -
twitter-bootstrap-rails ⑂
Twitter Bootstrap for Rails 3.1 Asset Pipeline (Updated to Bootstrap 2)
Ruby ★ 0 13y agoExplain → -
textmate ⑂
TextMate is a graphical text editor for OS X 10.7+
C++ ★ 0 13y agoExplain →
No repos match these filters.