Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Error rails mercury:install:images #457 #494

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ capybara*
.sass-cache
public/system
public/assets

.idea/
2 changes: 2 additions & 0 deletions app/assets/javascripts/mercury/modals/insertmedia.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@focus('#media_image_url')
@initializeForm()

Mercury.trigger('mediaModalReady')

# build the image or embed/iframe on form submission
@element.find('form').on 'submit', (event) =>
event.preventDefault()
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/_mercury-sass.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ $linkColorHover: darken($linkColor, 15%) !default;
background-color: $linkColor;
border: 1px solid $linkColorHover;
}

1 change: 1 addition & 0 deletions app/assets/stylesheets/mercury.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
*= require mercury/mercury
*/


4 changes: 4 additions & 0 deletions app/assets/stylesheets/mercury/modal.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/*
* Modal
*----------------------------------------------------------------------------*/
.img-border {
border: 3px solid blue !important;
}

.mercury-modal-overlay {
position: fixed;
z-index: 10040;
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/mercury/install/images/images_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def copy_models
if options[:orm] == 'mongoid'
copy_file 'mongoid_paperclip_image.rb', 'app/models/mercury/image.rb'
else
copy_file 'ar_paperclip_image.rb', 'app/models/mercury/image.rb'
copy_file 'ar_paperclip_image.rb.erb', 'app/models/mercury/image.rb'
template 'ar_paperclip_image.rb.erb', 'app/models/mercury/image.rb'
migration_template 'ar_paperclip_image_migration.rb', 'db/migrate/create_mercury_images.rb'
end
Expand Down