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
$('#replyForm').append("<%= escape_javascript(render(@newForm)) %>"); | |
$('#newForm').attr('id', 'newid'); |
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
guinslym@ubuntu:~/Documents/programming/rails_book/rails_3_action/bonjour$ ls -la | |
total 3 | |
drwxrwxr-x 3 guinslym guinslym 1024 Jan 3 22:01 . | |
drwxrwxr-x 5 guinslym guinslym 1024 Jan 3 22:00 .. | |
drwxrwxr-x 8 guinslym guinslym 1024 Jan 3 22:01 .git | |
-rw-rw-r-- 1 guinslym guinslym 0 Jan 3 22:00 bonjour.txt | |
guinslym@ubuntu:~/Documents/programming/rails_book/rails_3_action/bonjour$ git remote add origin [email protected]:guinslym/bonjour.git | |
guinslym@ubuntu:~/Documents/programming/rails_book/rails_3_action/bonjour$ git push origin master -u | |
Warning: Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts. | |
ERROR: Repository not found. |
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
# SQLite version 3.x | |
# gem install sqlite3 | |
# | |
# Ensure the SQLite 3 gem is defined in your Gemfile | |
# gem 'sqlite3' | |
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 |
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
source 'https://rubygems.org' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.0.1' | |
# Use sqlite3 as the database for Active Record | |
gem 'sqlite3', group: [:development, :test] | |
gem 'rails_12factor', group: :production | |
gem 'pg', group: :production |
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
<%= form_for @image, html: { multipart: true } do |f| %> | |
<% if @image.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@image.errors.count, "error") %> prohibited this image from being saved:</h2> | |
<ul> | |
<% @image.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
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
guinslym@ubuntu:~/Documents$ mkdir ~/Hello-World | |
guinslym@ubuntu:~/Documents$ cd ~ | |
guinslym@ubuntu:~$ cd Hello-World/ | |
guinslym@ubuntu:~/Hello-World$ git init | |
Initialized empty Git repository in /home/guinslym/Hello-World/.git/ | |
guinslym@ubuntu:~/Hello-World$ touch README | |
guinslym@ubuntu:~/Hello-World$ git add README | |
guinslym@ubuntu:~/Hello-World$ git commit -m 'first commit' | |
[master (root-commit) db61432] first commit | |
1 file changed, 0 insertions(+), 0 deletions(-) |
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
guinslym@ubuntu:~/Documents/programming/rails_book/rails_beginner_3/bookmarks$ git push heroku master | |
The authenticity of host 'heroku.com (50.19.85.132)' can't be established. | |
RSA key fingerprint is 8b:48:5e:67:[remove by me for protection]:ad. | |
Are you sure you want to continue connecting (yes/no)? yes | |
Warning: Permanently added 'heroku.com,50.19.85.132' (RSA) to the list of known hosts. | |
Initializing repository, done. | |
Counting objects: 89, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (77/77), done. | |
Writing objects: 100% (89/89), 75.31 KiB, done. |
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
<div class="configurations form"> | |
<?php echo $this->Form->create('Configuration', array('type' => 'file')); ?> | |
<fieldset> | |
<legend><?php echo __('Edit Configuration'); ?></legend> | |
<?php | |
echo $this->Form->input('id'); | |
echo $this->Form->input('username'); | |
echo $this->Form->input('profession'); | |
echo $this->Form->input('description', array('type' => 'textarea','label' => 'Content of this Article', 'rows' => '10', 'cols' => '120')); | |
echo $this->Form->input('userphoto', array('type' => 'file')); |
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
<?php | |
App::uses('AppController', 'Controller'); | |
/** | |
* Configurations Controller | |
* | |
* @property Configuration $Configuration | |
* @property PaginatorComponent $Paginator | |
*/ | |
class ConfigurationsController extends AppController { |
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
<?php | |
App::uses('AppModel', 'Model'); | |
/** | |
* Configuration Model | |
* | |
*/ | |
class Configuration extends AppModel { | |
/** | |
* Display field |