Activity
Posted in Multitenancy with Apartment Gem
It sounds like you may not be passing in the right database username. You should put in the username that you use to login to the database. It will be the same username in your config/database.yml
file. For example, mine is -U chris
in the command.
Awesome! :) Let me know if there's anything I could cover that would be helpful too.
I believe I covered a bit more of this in a following episode, but you're absolutely right. This is where a form object of some sort makes a lot of sense. You can have it wrapping these things and then translate it to errors in the UI. This being a rake task makes that hard, but a controller variable for a form object would help that.
Posted in Setup MacOS 10.10 Yosemite Discussion
Haha! Thanks :)
Posted in How can I grow this search object?
What are the collection_id and selected images parts? I could use a little more context to determine what I'd suggest but I don't think you're far from a good solution.
[Edited]
So all the Time instances in Rails include a date with the Time. It will default to January 1st, 2000 as you can see but you can safely ignore that portion of the output.
You should be able to query the database just by doing this and it should ignore the Date portion of the time. Check the development logs for the SQL query to make sure it does.
Fpclass.where('start_time>?', Time.zone.now)
Posted in File Uploads with Refile Discussion
Check out this section in the Readme which should get you sorted out. https://github.com/refile/r...
If you're trying to customize something like bootstrap, you can do this: Instead of doing the *= require bootstrap
, you can do @import "bootstrap"
to import the file using SASS and put your custom variables above the import to override the defaults.
Basically it doesn't change from how you would normally do it, but it can be a little unclear since they don't give you any instructions. Does that make sense though?
You are correct. It'll use that latest version of the library. And thanks! :D
I believe it works by just setting the version on the gem you include.
gem "rails-assets-bootstrap", "1.0.0"
Awesome post! Thanks for sharing that Mohnish.
Posted in Page Specific Javascript
That's actually what I would recommend doing. If you set up your JS to look for data-behavior
tags like I covered in this episode you can load things into those tags.
The best way is not to really have page specific javascript, but instead to have these little widgets that can be reused anywhere by detecting things on the page. It'll keep the JS and Rails code very separate and the flexibility of making it not tied to specific pages helps a lot in the future.
If you haven't tried this already, you'll probably want to include bourbon with @import instead of the require statements so you can use it in your sass code.
It should, but with more complex things like ckeditor, you might have to have those lang/en.js files compiled separately. Something like this based upon the filename in the Rails Assets gem.
config.assets.precompile += %w( lang/en.js )
This is definitely one part where the documentation with Rails Assets is poor.
Definitely. This is where form objects tend to make a lot more sense because it's that much more complicated. An intermediate step of uploading, processing, and finding errors before doing the actual import can be a good thing for this too.
It's really, really well done. Props to the authors!
I'm definitely migrating over some older apps too! :)
Posted in Page Specific Javascript
This is a really great question Michael. Do you have examples of what kind of Javascript you intend to run on specific pages? I can give you some generic advice, but it's always easier to understand with some examples.
Posted in Multitenancy with Apartment Gem
Are you executing pg_dump
manually from the command line? I've noticed that when it's run without the user option, it defaults to the current operating system username. Wondering if that is what's happening.
I haven't had the time to find any solution to that recently. Hopefully someone can leave a comment if they find a solution!