Skip to content

Commit

Permalink
Create demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Kolarik committed Nov 6, 2016
1 parent 9ca983a commit 09087b5
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 10 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.yardoc
.idea
.DS_Store
Gemfile.lock
gemfiles/*.gemfile.lock
InstalledFiles
_yardoc
Expand Down
12 changes: 12 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in x-editable-rails.gemspec
gemspec

gem 'sprockets'
gem 'sass-rails'
gem 'bootstrap-sass'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'haml'
gem 'globalize'
gem 'responders'
gem 'pg'
gem 'rails_12factor'
gem 'uglifier'
163 changes: 163 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
PATH
remote: .
specs:
x-editable-rails (1.5.5)
railties

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
autoprefixer-rails (6.0.3)
execjs
json
bootstrap-sass (3.3.5)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
builder (3.2.2)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
erubis (2.7.0)
execjs (2.6.0)
globalid (0.3.6)
activesupport (>= 4.1.0)
globalize (4.0.3)
activemodel (>= 4.0.0, < 5)
activerecord (>= 4.0.0, < 5)
haml (4.0.7)
tilt
i18n (0.7.0)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.6.2)
mini_portile (0.6.2)
minitest (5.8.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
pg (0.18.4)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
responders (2.1.0)
railties (>= 4.2.0, < 5)
sass (3.4.19)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sprockets (3.3.4)
rack (~> 1.0)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)

PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass
coffee-rails
globalize
haml
jquery-rails
pg
rails (~> 4.0)
rails_12factor
responders
sass-rails
sprockets
sqlite3
uglifier
x-editable-rails!

BUNDLED WITH
1.10.6
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: cd test/dummy && bin/rails server -p $PORT
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

X-editable for Rails

## Live demo

Checkout live demo [here](https://x-editable-rails.herokuapp.com/?denied=true)

## Installation

Add this line to your application's Gemfile:
Expand Down Expand Up @@ -77,8 +81,8 @@ And related stylesheets:

### Making Things Editable

`x-editable-rails` provides a helper method in your view to make your model values editable.
By default, you need to specify the model and property that should be editable.
`x-editable-rails` provides a helper method in your view to make your model values editable.
By default, you need to specify the model and property that should be editable.
A `span` element is rendered with `data-*` attributes used by `x-editable`.

```ruby
Expand Down Expand Up @@ -154,14 +158,14 @@ end

### "Don't Repeat Yourself" Templates

To make your views cleaner, you can specify all your options for each class and attribute in a YAML configuration file.
To make your views cleaner, you can specify all your options for each class and attribute in a YAML configuration file.
Attributes where the `title` or `placeholder` are not different except maybe capitalized can be left out because they are automatically capitalized when rendered (see above).

This example uses the `MailingList` class and its attributes.
The attribute value can be a string, which is used as the `title` and `placeholder`.
This example uses the `MailingList` class and its attributes.
The attribute value can be a string, which is used as the `title` and `placeholder`.
If you want to specify other options, create a hash of options.

Install configuration file like this: `rails g x_editable_rails:install`, this step is not necessary
Install configuration file like this: `rails g x_editable_rails:install`, this step is not necessary

```yaml
class_options:
Expand Down
4 changes: 2 additions & 2 deletions test/dummy/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
config.assets.compile = true

# Generate digests for assets URLs.
config.assets.digest = true
config.assets.digest = false

# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
Expand Down
2 changes: 1 addition & 1 deletion x-editable-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.summary = %q{X-editable for Rails}
spec.homepage = "https://github.com/werein/x-editable-rails"
spec.license = "MIT"

spec.files = Dir["{lib,vendor}/**/*"] + ["LICENSE.txt", "README.md"]
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
Expand Down

0 comments on commit 09087b5

Please sign in to comment.