wheels 0.1.28 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.28
1
+ 0.1.30
@@ -3,6 +3,7 @@ class PagesController < InheritedResources::Base
3
3
  ajax_loading
4
4
  before_filter :authenticate_user!, :except=>[:show]
5
5
  before_filter :authorize_resource!, :except=>[:index, :show]
6
+ helper_method :resource
6
7
 
7
8
  has_scope :tagged_with, :as => :tag
8
9
 
@@ -5,6 +5,6 @@ class Attachment < ActiveRecord::Base
5
5
  has_attached_file :file,
6
6
  :storage => :s3,
7
7
  :s3_credentials => "#{Rails.root}/config/amazon_s3.yml",
8
- :path => "/attachments/:filename"
8
+ :path => "/users/:file_owner_id/pages/:file_page_id/attachments/:filename"
9
9
  end
10
10
 
@@ -4,7 +4,7 @@ class Image < ActiveRecord::Base
4
4
  has_attached_file :image,
5
5
  :storage => :s3,
6
6
  :s3_credentials => "#{Rails.root}/config/amazon_s3.yml",
7
- :path => "/images/:user_email/:style/:filename",
7
+ :path => "/users/:image_owner_id/galleries/:image_gallery_id/:style/:filename",
8
8
  :styles => {:large=>"700x700>", :medium => "300x300>", :thumb => "100x100>" }
9
9
  end
10
10
 
@@ -1,7 +1,7 @@
1
1
  class Page < ActiveRecord::Base
2
2
  has_many :attachments
3
3
  has_many :sitemaps, :as=>:resource
4
- has_many :access_control_entries, :as=>:resource, :dependent=>:destroy
4
+ has_many :access_control_entries, :as=>:resource
5
5
  alias_attribute :name, :title
6
6
  acts_as_taggable
7
7
  end
@@ -5,7 +5,7 @@ class Sitemap < ActiveRecord::Base
5
5
  before_destroy :on_before_destroy
6
6
  belongs_to :parent, :class_name=>'Sitemap', :foreign_key=>'parent_id'
7
7
  belongs_to :resource, :polymorphic => true
8
- has_many :access_control_entries, :as => :resource, :dependent=>:destroy
8
+ has_many :access_control_entries, :as => :resource
9
9
  has_many :children, :class_name=>'Sitemap', :foreign_key=>'parent_id', :dependent => :destroy do
10
10
  def sorted
11
11
  sort{|t, u| if t.nil? || t.position.nil?; 1;
@@ -6,6 +6,6 @@
6
6
  .fieldValue= f.text_field :name
7
7
  .field
8
8
  .fieldName Value:
9
- .fieldValue.text_area= f.text_area :value, :id=>'config_value'
9
+ .fieldValue.text_area= f.text_area :value
10
10
  .field= f.submit "Save", :disable_with=>"Saving..."
11
11
 
@@ -1,3 +1,3 @@
1
- %h2= resource.name + ":"
2
- %pre.fieldValue!= resource.value
1
+ %h2= @app_config.name + ":"
2
+ %pre.fieldValue!= @app_config.value
3
3
 
@@ -1,16 +1,3 @@
1
1
  $('##{container}').#{ajax_function}(#{raw render_js('form')});
2
2
  = render :partial => "loadbehind/edit"
3
3
 
4
- editAreaLoader.init({
5
- id: "config_value" // id of the textarea to transform
6
- ,start_highlight: true
7
- ,allow_toggle: false
8
- ,language: "en"
9
- ,syntax: "html"
10
- ,toolbar: "search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help"
11
- ,syntax_selection_allow: "css,html,js,ruby"
12
- ,is_multi_files: false
13
- ,EA_load_callback: "editAreaLoaded"
14
- ,show_line_colors: true
15
- });
16
-
@@ -1,8 +1,8 @@
1
- -if resource.errors.any?
1
+ -if @attachment.errors.any?
2
2
  #errorExplanation
3
- %h2= "#{pluralize(resource.errors.count, "error")} prohibited this image from being saved:"
3
+ %h2= "#{pluralize(@attachment.errors.count, "error")} prohibited this image from being saved:"
4
4
  %ul
5
- - resource.errors.full_messages.each do |msg|
5
+ - @attachment.errors.full_messages.each do |msg|
6
6
  %li= msg
7
7
 
8
8
  = form_for [@page, Attachment.new(:page=>@page)], :remote=>true, :html=>{:multipart=>true, :id=>"upload_form"} do |f|
@@ -1,10 +1,10 @@
1
1
 
2
2
  .entry
3
- .entry-title= link_to resource.title, resource_url(resource)
3
+ .entry-title= link_to @blog.title, resource_url(@blog)
4
4
 
5
- .date Posted on #{resource.created_at}
6
- .blog_body!= resource.body
7
- .tags!= tag_list resource
5
+ .date Posted on #{@blog.created_at}
6
+ .blog_body!= @blog.body
7
+ .tags!= tag_list @blog
8
8
 
9
9
  .comments
10
10
  %a{:href => "#"} 3 comments
@@ -13,7 +13,6 @@
13
13
  %li= link_to 'Files', '#field-attachments'
14
14
  %li= link_to 'Stylesheet', '#field-stylesheet'
15
15
  = form_for resource, :remote=>true do |f|
16
- = f.submit 'Save Changes', :disable_with=>'Please wait...'
17
16
  #field-body
18
17
  .field
19
18
  = f.label :title
@@ -1,4 +1,4 @@
1
- - if resource.show_title
2
- %h1= resource.title
3
- .page_content!= resource.body
1
+ - if @page.show_title
2
+ %h1= @page.title
3
+ .page_content!= @page.body
4
4
 
@@ -1,4 +1,4 @@
1
- = form_for resource, :html=>{:id=>"sitemap_form"} do |f|
1
+ = form_for @sitemap, :html=>{:id=>"sitemap_form"} do |f|
2
2
  = f.hidden_field :resource_type
3
3
  = f.hidden_field :resource_id
4
4
  = f.label :menu_text
@@ -1,12 +1,12 @@
1
1
  %h1 Change Password
2
2
 
3
3
  .form
4
- = form_for resource do |f|
5
- -if resource.errors.any?
4
+ = form_for @user do |f|
5
+ -if @user.errors.any?
6
6
  #errorExplanation
7
- %h2= "#{pluralize(resource.errors.count, "error")} prohibited this change:"
7
+ %h2= "#{pluralize(@user.errors.count, "error")} prohibited this change:"
8
8
  %ul
9
- - resource.errors.full_messages.each do |msg|
9
+ - @user.errors.full_messages.each do |msg|
10
10
  %li= msg
11
11
  .field
12
12
  .fieldName= label_tag "Please enter your old password for verification."
@@ -1,12 +1,12 @@
1
1
  %h1 Update your personal info:
2
2
 
3
3
  .form
4
- = form_for resource do |f|
5
- - if resource.errors.any?
4
+ = form_for @user do |f|
5
+ - if @user.errors.any?
6
6
  #errorExplanation
7
- %h2= "#{pluralize(resource.errors.count, "error")} prohibited this change:"
7
+ %h2= "#{pluralize(@user.errors.count, "error")} prohibited this change:"
8
8
  %ul
9
- - resource.errors.full_messages.each do |msg|
9
+ - @user.errors.full_messages.each do |msg|
10
10
  %li= msg
11
11
  .fieldGroup
12
12
  = f.fields_for :profile do |pf|
@@ -1,8 +1,18 @@
1
- Paperclip.interpolates :user_email do |attachment, style|
2
- attachment.instance.gallery.user.email
1
+
2
+ Paperclip.interpolates :image_owner_id do |attachment, style|
3
+ attachment.instance.gallery.user_id.to_s
4
+ end
5
+
6
+ Paperclip.interpolates :image_gallery_id do |attachment, style|
7
+ attachment.instance.gallery.id.to_s
3
8
  end
4
9
 
5
- Paperclip.interpolates :page_id do |attachment, style|
6
- "page_#{attachment.instance.page_id}"
10
+ Paperclip.interpolates :file_page_id do |attachment, style|
11
+ attachment.instance.page_id.to_s
7
12
  end
8
13
 
14
+ Paperclip.interpolates :file_owner_id do |attachment, style|
15
+ attachment.instance.page.user_id.to_s
16
+ end
17
+
18
+
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wheels}
8
- s.version = "0.1.28"
8
+ s.version = "0.1.30"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyler Gannon"]
12
- s.date = %q{2010-11-01}
12
+ s.date = %q{2010-11-04}
13
13
  s.description = %q{Call rails generate wheels.}
14
14
  s.email = %q{tgannon@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 28
9
- version: 0.1.28
8
+ - 30
9
+ version: 0.1.30
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tyler Gannon
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-01 00:00:00 -07:00
17
+ date: 2010-11-04 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency